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
# pylint: disable=W0511 # 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 version 2 of the License, or (at your option) any later # version. # # This program is distributed in the hope that...
isohybrid/dotfile
vim/bundle/git:--github.com-klen-python-mode/pylibs/pylint/checkers/misc.py
Python
bsd-2-clause
2,594
0.003084
import factory import factory.django from faker import Faker from machina.core.db.models import get_model from machina.test.factories.auth import UserFactory from machina.test.factories.conversation import TopicFactory faker = Faker() TopicPoll = get_model('forum_polls', 'TopicPoll') TopicPollOption = get_model('fo...
ellmetha/django-machina
machina/test/factories/polls.py
Python
bsd-3-clause
1,023
0
import math as mth import numpy as np #---------------------- # J Matthews, 21/02 # This is a file containing useful constants for python coding # # Units in CGS unless stated # #---------------------- #H=6.62606957E-27 HEV=4.13620e-15 #C=29979245800.0 #BOLTZMANN=1.3806488E-16 VERY_BIG=1e50 H=6.6262e-27 HC=1.98587e-...
jhmatthews/panlens
constants.py
Python
gpl-2.0
1,157
0.057044
import math import random import GameData from Util.TileTypes import * from Util import Line, StarCallback def initializeRandom( x, y ): dist = math.sqrt( x ** 2 + y ** 2 ) angle = math.atan2( x, y ) / math.pi * 5 rand = ( random.random() * 7 ) - 3.5 val = ( ( dist + angle + rand ) % 10 ) if val ...
KevinVDVelden/7DRL_2015
Game/MapGen.py
Python
gpl-2.0
4,996
0.055244
#!/usr/bin/env python3 from argparse import ArgumentParser from os import environ from sys import argv from requests import put def read_file(file_path): # pragma: no cover with open(file_path, 'rb') as f: return f.read() def upload(file_path, repository, repository_path, url, username, password): ...
bjuvensjo/scripts
vang/nexus3/upload.py
Python
apache-2.0
1,766
0.003964
# -*- coding: utf-8 -*- import sys import os import logging import random import PyQt4 from PyQt4.QtCore import * #from PyQt4.QtCore import QAbstractTableModel import constants class Model(QAbstractTableModel): keys = list() modelType = None def __init__(self, parent = None): ''' ''' ...
CaesarTjalbo/musictagger
mp3names/model_classes.py
Python
gpl-3.0
3,029
0.028722
from n5a import make_type from n5a.generate import generate from .test_definitions import get_pos3d_definition def test_generate_string(): s = generate(get_pos3d_definition()) assert 'struct Pos3D' in s def test_generate_file(): s = generate(get_pos3d_definition()) with open('test/test_cpp/generated/...
sschaetz/n5a
test/test_generate.py
Python
mit
361
0.00831
# Version 5 '''This takes a base MineCraft level and adds or edits trees. Place it in the folder where the save files are (usually .../.minecraft/saves) Requires mcInterface.py in the same folder.''' # Here are the variables you can edit. # This is the name of the map to edit. # Make a backup if you are experimenting...
DragonQuiz/MCEdit-Unified
stock-filters/Forester.py
Python
isc
51,634
0.000562
import re from coalib.bearlib.abstractions.Lint import Lint from coalib.bears.LocalBear import LocalBear from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY class InferBear(LocalBear, Lint): executable = 'infer' arguments = '-npb -- javac {filename}' output_regex = re.compile( r'(.+):' ...
chriscoyfish/coala-bears
bears/java/InferBear.py
Python
agpl-3.0
896
0
from __future__ import absolute_import, unicode_literals from django.template import Context, Template from django.utils.translation import ugettext_lazy as _ from time import time from .base import CallRecordingPanel from ..utils.function_wrapper import FunctionWrapper from ..utils.patch_context import PatchContext ...
looker/sentry
src/sentry/debug/panels/redis.py
Python
bsd-3-clause
2,952
0.000678
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
GoogleCloudPlatform/terraform-python-testing-helper
test/test_args.py
Python
apache-2.0
4,448
0.002248
#-- GAUDI jobOptions generated on Mon Jul 20 10:20:49 2015 #-- Contains event types : #-- 11134011 - 42 files - 900254 events - 251.92 GBytes #-- Extra information about the data processing phases: #-- Processing Pass Step-125836 #-- StepId : 125836 #-- StepName : Stripping20-NoPrescalingFlagged for Sim08...
Williams224/davinci-scripts
ksteta3pi/Consideredbkg/MC_12_11134011_MagUp.py
Python
mit
4,905
0.026911
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('contacts', '0020_unset_suspend_from_dynamic'), ] operations = [ migrations.AddField( model_name='contact', ...
xkmato/casepro
casepro/contacts/migrations/0021_contact_is_stopped_pt1.py
Python
bsd-3-clause
745
0.002685
# Copyright 2015, 2016 OpenMarket Ltd # # 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 ...
matrix-org/synapse
synapse/replication/slave/storage/directory.py
Python
apache-2.0
767
0
# ============================================================================= # Copyright (C) 2014 Ryan Holmes # # This file is part of pyfa. # # pyfa 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...
DarkFenX/Pyfa
service/port/multibuy.py
Python
gpl-3.0
3,507
0.001426
"""Generic wrapper for read-eval-print-loops, a.k.a. interactive shells """ import os.path import signal import sys import re import pexpect PY3 = (sys.version_info[0] >= 3) if PY3: def u(s): return s basestring = str else: def u(s): return s.decode('utf-8') PEXPECT_PROMPT = u('[PEXPECT_PROMPT>') PEXPEC...
Wakeupbuddy/pexpect
pexpect/replwrap.py
Python
isc
4,604
0.002389
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, François-Xavier Thomas. # # 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 limi...
bbsan2k/nzbToMedia
libs/beetsplug/badfiles.py
Python
gpl-3.0
4,564
0
# Copyright 2022 Google LLC. 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 applicable law o...
GoogleCloudPlatform/declarative-resource-client-library
python/services/monitoring/service.py
Python
apache-2.0
7,348
0.001225
# # Copyright (c) 2008--2018 Red Hat, Inc. # Copyright (c) 2010--2011 SUSE Linux Products GmbH # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FO...
renner/spacewalk
backend/satellite_tools/reposync.py
Python
gpl-2.0
62,750
0.002343
# -*- coding:utf_8 -*- import urllib2 from bs4 import BeautifulSoup from Bangumi import Bangumi class Youku(Bangumi): link = "http://comic.youku.com" name = u'优酷' def getBangumi(self): """Youku processing function""" # Get Youku bangumi HTML req = urllib2.Request(self.link) ...
MrWhoami/WhoamiBangumi
Youku.py
Python
mit
1,140
0.00088
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2015-12-12 16:07 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tocayoapp', '0007_gender_description'), ] operations = [ migrations.AlterField...
philpot/tocayo
tocayoproj/tocayoapp/migrations/0008_auto_20151212_1607.py
Python
apache-2.0
455
0
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GL import _types as _cs # End users want this... from OpenGL.raw.GL._types import * from OpenGL.raw.GL import _errors from OpenGL.constant import Constant as _C import ctypes _...
stack-of-tasks/rbdlpy
tutorial/lib/python2.7/site-packages/OpenGL/raw/GL/ARB/texture_swizzle.py
Python
lgpl-3.0
781
0.025608
"""This module provides REST services for Scenario""" import werkzeug.exceptions as WEXC from LmCommon.common.lmconstants import HTTPStatus from LmWebServer.common.lmconstants import HTTPMethod from LmWebServer.services.api.v2.base import LmService from LmWebServer.services.common.access_control import check_user_perm...
lifemapper/core
LmWebServer/flask_app/scenario.py
Python
gpl-3.0
3,342
0.00389
# coding=utf-8 import logging from urllib import urlencode import datetime import mimetypes import cgi from ckan.common import config from paste.deploy.converters import asbool import paste.fileapp import ckan.logic as logic import ckan.lib.base as base import ckan.lib.i18n as i18n import ckan.lib.maintain as maint...
dadosgovbr/ckanext-dadosabertos
ckanext/dadosgovbr/controllers/scheming.py
Python
agpl-3.0
12,430
0.001853
import os import re import stat import mimetypes try: from io import UnsupportedOperation except ImportError: UnsupportedOperation = object() import cherrypy from cherrypy._cpcompat import ntob, unquote from cherrypy.lib import cptools, httputil, file_generator_limited mimetypes.init() mimetypes.types_map['...
deadRaccoons/TestAirlines
tabo/cherrypy/cherrypy/lib/static.py
Python
gpl-2.0
14,778
0
# ############################################################################ # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core business i...
uclouvain/OSIS-Louvain
program_management/tests/ddd/service/read/test_get_program_tree_version_from_node_service.py
Python
agpl-3.0
2,219
0.003607
# -*- test-case-name: twisted.test.test_sip -*- # Copyright (c) 2001-2009 Twisted Matrix Laboratories. # See LICENSE for details. """Session Initialization Protocol. Documented in RFC 2543. [Superceded by 3261] This module contains a deprecated implementation of HTTP Digest authentication. See L{twisted.cred.cred...
Donkyhotay/MoonPy
twisted/protocols/sip.py
Python
gpl-3.0
41,973
0.003502
from django.db import models from django.db.models.signals import post_delete, post_save from django.dispatch import receiver from django.utils.translation import ugettext_lazy as _ from jsonfield import JSONField from model_utils import Choices from model_utils.models import TimeStampedModel from crate.web.packages....
crateio/crate.web
crate/web/history/models.py
Python
bsd-2-clause
2,810
0
""" Testing for enumerate_param, enumerate_params, and enumerate_keyed_param """ import unittest import mws # pylint: disable=invalid-name class TestParamsRaiseExceptions(unittest.TestCase): """ Simple test that asserts a ValueError is raised by an improper entry to `utils.enumerate_keyed_param`. """ ...
Bobspadger/python-amazon-mws
tests/test_param_methods.py
Python
unlicense
4,345
0.000921
from main import Board import collections import unittest class ClassicBoardTests(unittest.TestCase): def test_tile_iterator(self): options = { 'randomize_production': False, 'randomize_ports': False} board = Board(options) self.assertEqual([t.value for t in board....
fruitnuke/catan
tests.py
Python
gpl-3.0
714
0.001401
#! /usr/python ''' /////////////////////////////////////////////////////////// // 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...
RobertIan/ethoStim
individualtesting/trial.py
Python
mit
7,935
0.008696
import os path = os.path.dirname(os.path.realpath(__file__)) sbmlFilePath = os.path.join(path, 'MODEL1310160000.xml') with open(sbmlFilePath,'r') as f: sbmlString = f.read() def module_exists(module_name): try: __import__(module_name) except ImportError: return False else: ret...
biomodels/MODEL1310160000
MODEL1310160000/model.py
Python
cc0-1.0
427
0.009368
def extractImpatientmtlreader533234643WordpressCom(item): ''' Parser for 'impatientmtlreader533234643.wordpress.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('PRC', 'PRC', ...
fake-name/ReadableWebProxy
WebMirror/management/rss_parser_funcs/feed_parse_extractImpatientmtlreader533234643WordpressCom.py
Python
bsd-3-clause
594
0.031987
# # cocos2d # http://python.cocos2d.org # from __future__ import division, print_function, unicode_literals # This code is so you can run the samples without installing the package import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) # import cocos from cocos.director import directo...
dangillet/cocos
samples/demo_multiple_scenes.py
Python
bsd-3-clause
3,011
0.001993
#!/usr/bin/env python import rethinkdb as r from optparse import OptionParser def run(rql): try: return rql.run() except r.RqlRuntimeError: return None def main(port, include_deleted): conn = r.connect('localhost', port, db='materialscommons') cursor = r.table('project2datadir') \ ...
materials-commons/materialscommons.org
backend/scripts/admin/check_for_top_dir.py
Python
mit
1,695
0.00295
# Copyright 2013 IBM Corp. # 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 app...
petrutlucian94/nova
nova/tests/unit/api/openstack/compute/contrib/test_multiple_create.py
Python
apache-2.0
22,783
0.000088
#!/usr/bin/env python # Copyright (C) 2012,2013,2015(H),2016 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or mo...
cgchemlab/chemlab
tools/convert_gromacs2espp.py
Python
gpl-3.0
4,036
0.005699
""" The symbols and rules for the CFG of C. I generated these myself by hand, so they're probably not perfectly correct. """ from rules_obj import * from lexer import * import tokens ### Symbols ### # Most symbols are either self-explanatory, or best understood by examining the # rules below to see how they're used....
ShivamSarodia/ShivC
rules.py
Python
gpl-2.0
15,247
0.00164
#!/usr/bin/env python3 """ * Copyright (c) 2015 BEEVC - Electronic Systems This file is part of BEESOFT * 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...
beeverycreative/beeconnect
WaitForConnection.py
Python
gpl-2.0
8,838
0.009391
""" tokenizer for tweets! might be appropriate for other social media dialects too. general philosophy is to throw as little out as possible. development philosophy: every time you change a rule, do a diff of this program's output on ~100k tweets. if you iterate through many possible rules and only accept the ones t...
ewan-klein/nltk_twitter
twokenise.py
Python
apache-2.0
6,480
0.013622
import numpy as np import cv2 import math # Calculates rotation matrix to euler angles # The result is the same as MATLAB except the order # of the euler angles ( x and z are swapped ). def rot_vec_to_euler(r): # Rotate around x axis by 180 degrees to have [0, 0, 0] when facing forward R = np.dot(np.array([[1...
JustusSchwan/MasterThesis
trash/utility_positional.py
Python
mit
4,965
0.000604
import fileinput def str_to_int(s): return([ int(x) for x in s.split() ]) # args = [ 'line 1', 'line 2', ... ] def proc_input(args): pass def solve(args, verbose=False): r = proc_input(args) def test(): assert(str_to_int('1 2 3') == [ 1, 2, 3 ]) if __name__ == '__main__': from sys import argv if argv.pop() =...
cripplet/practice
hackerrank/quora/skeleton.py
Python
mit
393
0.045802
def extractAtarutranslationBlogspotCom(item): ''' Parser for 'atarutranslation.blogspot.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('PRC', 'PRC', 'translated'...
fake-name/ReadableWebProxy
WebMirror/management/rss_parser_funcs/feed_parse_extractAtarutranslationBlogspotCom.py
Python
bsd-3-clause
570
0.033333
from invoke import task, Collection @task def toplevel(ctx): pass @task def subtask(ctx): pass ns = Collection( toplevel, Collection('a', subtask, Collection('nother', subtask) ) )
mkusz/invoke
tests/_support/deeper_ns_list.py
Python
bsd-2-clause
212
0.023585
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('tfm', '0004_auto_20151124_1307'), ] operations = [ migrations.AlterField( model_name='patient', name...
potray/TFM-Web
tfm/migrations/0005_auto_20151124_1311.py
Python
gpl-2.0
467
0.002141
"""autogenerated by genpy from arm/cartesian_moves.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import arm.msg import genpy import std_msgs.msg class cartesian_moves(genpy.Message): _md5sum = "56c11a250225b8cc4f58b0e6670caaa1" _type = "arm/car...
uml-robotics/manus_arm
arm/src/arm/msg/_cartesian_moves.py
Python
bsd-2-clause
9,235
0.015268
# Ivysalt's sentry module. It keeps track of people who join and leave a chat. # LICENSE: This single module is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. # @category Tools # @copyright Copyright (c) 2018 dpc # @version 1.1 # @author dpc import asyncio i...
retrodpc/Bulbaspot-Cogs
sentry/sentry.py
Python
apache-2.0
11,849
0.005233
# -*- mode: python; indent-tabs-mode: nil; tab-width: 3 -*- # vim: set tabstop=3 shiftwidth=3 expandtab: # # Copyright (C) 2001-2005 Ichiro Fujinaga, Michael Droettboom, # and Karl MacMillan # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU...
DDMAL/Gamera
gamera/fudge.py
Python
gpl-2.0
2,585
0.001161
"""Module for helper functions.""" import os import tempfile def tmpfile(suffix='', prefix='tmp', directory=None): """Wrapper around tempfile.mkstemp that creates a new temporary file path. """ filehandle, filename = tempfile.mkstemp(suffix, prefix, directory) os.close(filehandle) return filena...
c-w/GettyArt
getty_art/util.py
Python
mit
488
0
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals import os import shutil from unittest import TestCase, TestSuite, TestLoader, TextTestRunner from babelfish import Language from subliminal import list_subtitles, download_subtitles, save_subtitles, download_best_subtitles, scan_video...
ravselj/subliminal
subliminal/tests/test_subliminal.py
Python
mit
8,711
0.002296
from BOX.box_lib import requests import os import configparser import traceback import functools import threading configfile = os.path.join(os.path.dirname(__file__), 'EpicRace.ini') config = configparser.ConfigParser() config.read(configfile) def async(func): @functools.wraps(func) def wrapper(*args, **kwar...
Marocco2/EpicRace
update.py
Python
lgpl-3.0
2,289
0.004806
""" Test objconfig.writer.AbstractWriter """ import pytest from objconfig.exception import RuntimeException from objconfig.writer import WriterInterface from objconfig.writer import AbstractWriter from objconfig import Config import os def test_methods_abstractwriter(): writer = AbstractWriter() conf = Confi...
asherwunk/objconfig
tests/writer/test_abstractwriter.py
Python
mit
728
0.008242
""" Tests for student enrollment. """ from mock import patch, Mock import ddt from django.core.cache import cache from nose.tools import raises import unittest from django.test import TestCase from django.test.utils import override_settings from django.conf import settings from course_modes.models import CourseMode f...
10clouds/edx-platform
common/djangoapps/enrollment/tests/test_api.py
Python
agpl-3.0
10,138
0.002071
import unittest import os import sys import copy import nose from numpy.testing import * from numpy import array, alltrue, ndarray, asarray, can_cast,zeros, dtype from numpy.core.multiarray import typeinfo import util wrap = None def setup(): """ Build the required testing extension module ...
beiko-lab/gengis
bin/Lib/site-packages/numpy/f2py/tests/test_array_from_pyobj.py
Python
gpl-3.0
21,255
0.017549
#!/usr/bin/python3 # # Copyright (c) 2014-2022 The Voxie Authors # # 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,...
voxie-viewer/voxie
ext/RawDataTestScript.py
Python
mit
1,854
0.001618
# -*- coding: utf-8 -*- from __future__ import absolute_import import re from collections import OrderedDict from uuid import uuid4 from warnings import warn from numpy import object as np_object from numpy import array, inf, isinf from six import string_types from cobra.core import Metabolite, Model, Reaction from...
zakandrewking/cobrapy
cobra/io/mat.py
Python
lgpl-2.1
11,174
0.000179
from catkin_pkg.python_setup import generate_distutils_setup from setuptools import setup d = generate_distutils_setup( packages=['catkin'], package_dir={'': 'python'}, scripts=[ 'bin/catkin_find', 'bin/catkin_init_workspace', 'bin/catkin_make', 'bin/catkin_make_isolated', ...
ros/catkin
setup.py
Python
bsd-3-clause
416
0
"""Command Line Interface""" import os import re import codecs import logging from holland.core.exceptions import BackupError from holland.lib.compression import open_stream, lookup_compression from holland.lib.mysql import MySQLSchema, connect, MySQLError from holland.lib.mysql import include_glob, exclude_glob, \ ...
m00dawg/holland
plugins/holland.backup.mysqldump/holland/backup/mysqldump/plugin.py
Python
bsd-3-clause
21,830
0.002199
__author__ = 'Aditya Vikram Agarwal' import pygame from random import randint import random import player import princess import donkey import block import fireball import coin import ladder class Board: def __init__(self, screen, testmode): self.MODE = testmode self.blocks = [] self.ladd...
adityavagarwal/DonkeyKong
board.py
Python
mpl-2.0
19,483
0.00272
from django.shortcuts import render from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from djforms.music.theatre.summer_camp import BCC, TO_LIST, REG_FEE from djforms.processors.models import Contact, Order from djforms.processors.forms import TrustCommerceForm from djfor...
carthagecollege/django-djforms
djforms/music/theatre/summer_camp/views.py
Python
unlicense
3,884
0.002317
import facebook from functools import update_wrapper, wraps from django.contrib.auth import REDIRECT_FIELD_NAME from django.http import HttpResponse, HttpResponseRedirect, HttpResponseBadRequest from django.utils.decorators import available_attrs from django.utils.http import urlquote from django.conf import settings ...
srijanmishra/django-facebook
django_facebook/decorators.py
Python
mit
2,793
0.003222
from django.conf.urls import include, url from django.contrib.staticfiles.templatetags.staticfiles import static from django.core import urlresolvers from django.utils.html import format_html from wagtail.wagtailcore import hooks from modeladminutils import admin_urls @hooks.register('register_admin_urls') def regi...
nott/next.filmfest.by
modeladminutils/wagtail_hooks.py
Python
unlicense
891
0
#!/usr/bin/env python #****************************************** #collection of handy tools when dealing with fits and search pahse #****************************************** #import stuff import sys, os, math, ROOT #****************************************** def simpleFit(fileName, histDir, histName, hmin=1100., ...
guescio/toolbox
searchPhaseTools.py
Python
gpl-2.0
2,268
0.019841
from setuptools import setup, find_packages setup( name = 'project', version = '1.0', packages = find_packages(), entry_points = {'scrapy': ['settings = bgmapi.settings']}, )
wattlebird/Bangumi_Spider
setup_bgmapi.py
Python
bsd-2-clause
207
0.057971
data = [set(open(i).read().split()) for i in ('C:\\Users\\Aliwka\\Desktop\\ДЗ-курсы\\Homework6\\first.txt', 'C:\\Users\\Aliwka\\Desktop\\ДЗ-курсы\\Homework6\\second.txt')] diff = data[0].difference(data[1]) if diff: print(diff, 'слова которые есть в первом файле, но нет во втором') print(data[1],data[0],'слова...
Torkvamedo/smx
Homework/lesson 6/second.py
Python
unlicense
414
0.01173
# encoding: utf-8 from django.apps import AppConfig class ManagerConfig(AppConfig): name = 'manager'
valdergallo/raidmanager
manager/apps.py
Python
mit
107
0
# I'm pretty sure this idea is going to end up being a lot of code so its going in a separate file # # The idea is simple, don't create a new search tab but instead narrow down the library view as we type. # Each letter typed should narrow down the library view instantly and without causing any interruption to the user...
TheRealBanana/bLyrics
src/dialogs/logic/active_filtering_search.py
Python
gpl-2.0
4,055
0.008878
# -*- coding: utf-8 -*- import time import mock import datetime import unittest from nose.tools import * # noqa import httplib as http import jwe import jwt import furl import itsdangerous from modularodm import storage, Q from framework.auth import cas from framework.auth import signing from framework.auth.core im...
wearpants/osf.io
tests/test_addons.py
Python
apache-2.0
40,457
0.002027
# gizela # # Copyright (C) 2010 Michal Seidl, Tomas Kubin # Author: Tomas Kubin <tomas.kubin@fsv.cvut.cz> # URL: <http://slon.fsv.cvut.cz/gizela> # # $Id$ """ module with functions for gama-data-obs.py and gama-data-adj.py scripts """ import sys def read_configuration_file(configFile, localSystem2D, localSyst...
gizela/gizela
gizela/util/gama_data_fun.py
Python
gpl-3.0
1,739
0.00575
# coding: utf-8 """ Trakerr API Get your application events and errors to Trakerr via the *Trakerr API*. OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file...
severr/severr-python
trakerr_client/models/app_event.py
Python
apache-2.0
18,881
0.000371
### BEGIN GPL LICENSE BLOCK ##### # # 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 version 2 # of the License, or (at your option) any later version. # # This program is distributed...
Microvellum/Fluid-Designer
win64-vc/2.78/Python/bin/2.78/scripts/addons_contrib/data_overrides/util.py
Python
gpl-3.0
3,986
0.006021
""" relation between the length of material coiled around cylinder and its width (toilet paper) http://math.stackexchange.com/questions/1633704/the-length-of-toilet-roll """ import numpy as np x = 1 # width of one sheet w = 80 #partial radius (total radius - minus radius of paper tube) r = 30 # radius of paper tub...
jboissard/mathExperiments
toiletRoll.py
Python
apache-2.0
357
0.016807
""" Support for Velbus Binary Sensors. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/binary_sensor.velbus/ """ import logging from homeassistant.components.binary_sensor import BinarySensorDevice from homeassistant.components.velbus import ( DOMAIN...
PetePriority/home-assistant
homeassistant/components/velbus/binary_sensor.py
Python
apache-2.0
1,110
0
#!/usr/bin/python import sys text = sys.stdin.read() print 'Text:',text words = text.split() print 'Words:',words wordcount = len(words) print 'Wordcount:',wordcount
MarsBighead/mustang
Python/somescript.py
Python
mit
167
0.023952
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-05 15:01 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('loginapp', '0001_initial'), ] operations = [ migrations.RenameField( mo...
sailuh/perceive
Websites/Experiments/loginapp/migrations/0002_auto_20170205_1501.py
Python
gpl-2.0
427
0
from Plugins.Plugin import PluginDescriptor from Screens.Console import Console from Screens.ChoiceBox import ChoiceBox from Screens.MessageBox import MessageBox from Screens.Screen import Screen from Screens.Standby import TryQuitMainloop from Screens.Ipkg import Ipkg from Screens.SoftwareUpdate import UpdatePlugin fr...
popazerty/dvbapp2-gui
lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
Python
gpl-2.0
81,566
0.028676
"""Test the split module""" from __future__ import division import warnings import pytest import numpy as np from scipy.sparse import coo_matrix, csc_matrix, csr_matrix from scipy import stats from itertools import combinations from itertools import combinations_with_replacement from sklearn.utils.testing import asser...
vortex-ape/scikit-learn
sklearn/model_selection/tests/test_split.py
Python
bsd-3-clause
57,882
0.000017
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] PROJECT_CATKIN_DEPENDS = "".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] PROJECT_NAME = "commanding_velocity" PROJECT_SPACE_DI...
lukeexton96/Robotics
catkin_ws/build/commanding_velocity/catkin_generated/pkg.installspace.context.pc.py
Python
gpl-3.0
386
0
import collections import glob import os import re import sys import traceback if 'mtimes' not in globals(): mtimes = {} if 'lastfiles' not in globals(): lastfiles = set() def make_signature(f): return f.func_code.co_filename, f.func_name, f.func_code.co_firstlineno def format_plug(plug, kind='', lpa...
FrozenPigs/Taigabot
core/reload.py
Python
gpl-3.0
5,824
0.001545
import datetime import logging import hashlib import random import sys import pymongo import scrapelib from .mongolog import MongoHandler from .storage import engines from celery.execute import send_task class Kernel(object): """ oyster's workhorse, handles tracking """ def __init__(self, mongo_host='local...
jamesturk/oyster
oyster/core.py
Python
bsd-3-clause
10,992
0.000455
# Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the Apache 2.0 License. # See the LICENSE file in the project root for more information. import unittest from iptest.type_util import * from iptest import run_test class ComplexTest(unittest.TestCase...
slozier/ironpython2
Tests/test_complex.py
Python
apache-2.0
2,104
0.008555
from __future__ import division from __future__ import print_function import logging import os import sys import time from redis import StrictRedis from redis_lock import Lock from conf import TIMEOUT from conf import UDS_PATH if __name__ == '__main__': logging.basicConfig( level=logging.DEBUG, ...
ionelmc/python-redis-lock
tests/helper.py
Python
bsd-2-clause
2,211
0.000905
from planning.models import TeachingCapability, PlanningCourse from courselib.auth import requires_role from coredata.models import Person from django.shortcuts import render_to_response from django.template import RequestContext @requires_role('PLAN') def view_capabilities(request): instructors = Person.objects....
sfu-fas/coursys
oldcode/planning/views/view_capabilities.py
Python
gpl-3.0
1,166
0.002573
print "Creating downloadable package" # Remove unwanted files s=os.path.join(conf.t.dir,'timing') rmrf(s) os.rmdir(s) # Recursively remove the .git files for root, dirs, files in os.walk(conf.t.dir, topdown=False): for name in files: if name in ['.gitattributes','.gitignore','desktop.ini']: ...
hagenw/ltfat
mat2doc/mat/release_keep_tests.py
Python
gpl-3.0
654
0.010703
# Copyright (C) 2009 Canonical Ltd # # 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 version 2 of the License, or # (at your option) any later version. # # This program is distributed in ...
Distrotech/bzr
bzrlib/tests/per_workingtree/test_check.py
Python
gpl-2.0
2,606
0.000767
import logging logging.getLogger('azure.storage.common.storageclient').setLevel(logging.WARNING)
ewbankkit/cloud-custodian
tools/c7n_mailer/c7n_mailer/azure_mailer/__init__.py
Python
apache-2.0
101
0.009901
from __future__ import absolute_import from builtins import str from processing.core.GeoAlgorithm import GeoAlgorithm from processing.core.Processing import Processing from processing.core.ProcessingLog import ProcessingLog from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException from p...
sourcepole/qgis-wps-client
processingwps/WpsAlgorithm.py
Python
gpl-2.0
11,916
0.005874
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
tst-mswartz/earthenterprise
earth_enterprise/src/server/wsgi/search/plugin/coordinate_search_handler.py
Python
apache-2.0
10,743
0.003165
# Copyright 2005-2010 Wesabe, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
wesabe/fixofx
lib/ofxtools/csv_converter.py
Python
apache-2.0
14,873
0.004034
# # iso2022_jp_1.py: Python Unicode Codec for ISO2022_JP_1 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_iso2022, codecs import _multibytecodec as mbc codec = _codecs_iso2022.getcodec('iso2022_jp_1') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode c...
zwChan/VATEC
~/eb-virt/Lib/encodings/iso2022_jp_1.py
Python
apache-2.0
1,100
0.006364
import os from copy import deepcopy from shapely.geometry import LineString import mappyfile import sys, os sys.path.append(os.path.abspath("./docs/examples")) from helper import create_image def dilation(mapfile): line = LineString([(0, 0), (1, 1), (0, 2), (2, 2), (3, 1), (1, 0)]) ll = mappyfile.find(mapfil...
geographika/mappyfile
docs/examples/geometry/geometry.py
Python
mit
1,786
0.004479
#-*-coding:utf-8-*- ''' @author: Hung-Hsin Chen @mail: chenhh@par.cse.nsysu.edu.tw @license: GPLv2 ''' import functools def symbol(sym): ''' Decorator that assigns a symbol to a function. The symbol is stored in the function.symbol attribute. @param sym: symbol to a function ''' def decorator(...
chenhh/PyMOGEP
src/PyMOGEP/decorator.py
Python
gpl-2.0
2,384
0.005872
# coding=utf-8 from __future__ import print_function import cmd import inspect import sys from panshell.base import FS class Shell(cmd.Cmd): def __init__(self): cmd.Cmd.__init__(self) self.stack = [] self.fsmap = {} self.fs = None self._funcs = [] self._keyword...
alingse/panshell
panshell/core.py
Python
apache-2.0
2,543
0
# secretkey.py: secret-key cryptographic functions """ Secret-key functions from chapter 1 of "A Working Introduction to Cryptography with Python". """ import Crypto.Cipher.AES as AES import Crypto.Hash.HMAC as HMAC import Crypto.Hash.SHA384 as SHA384 import Crypto.Random.OSRNG.posix as RNG import pbkdf2 import streql...
kisom/crypto_intro
src/secretkey.py
Python
isc
2,939
0
# ---------------------------------------------------------- # Introdução a Programação de Computadores - IPC # Universidade do Estado do Amazonas - UEA # Prof. Jucimar Jr # Edson de Lima Barros 1715310043 # Gabriel Nascimento de Oliveira 1715310052 # Luiz Daniel Raposo Nunes de Mello ...
jucimarjr/IPC_2017-1
lista02/lista02_exercicio01_questao05.py
Python
apache-2.0
883
0.002291
from rpython.annotator import model as annmodel from rpython.rlib import jit from rpython.rtyper import rint from rpython.rtyper.error import TyperError from rpython.rtyper.lltypesystem.lltype import Signed, Bool, Void, UniChar from rpython.rtyper.lltypesystem import lltype from rpython.rtyper.rmodel import IteratorRep...
oblique-labs/pyVM
rpython/rtyper/rstr.py
Python
mit
35,786
0.000643
#- # Copyright (c) 2011 Steven J. Murdoch # All rights reserved. # # This software was developed by SRI International and the University of # Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 # ("CTSRD"), as part of the DARPA CRASH research programme. # # @BERI_LICENSE_HEADER_START@ # # Licensed ...
8l/beri
cheritest/trunk/tests/branch/test_raw_bltzall_lt_back.py
Python
apache-2.0
1,853
0.003238
# -*- coding: utf-8 -*- """ eve.io.mongo.geo ~~~~~~~~~~~~~~~~~~~ Geospatial functions and classes for mongo IO layer :copyright: (c) 2017 by Nicola Iarocci. :license: BSD, see LICENSE for more details. """ class GeoJSON(dict): def __init__(self, json): try: self['type'] ...
bcrochet/eve
eve/io/mongo/geo.py
Python
bsd-3-clause
3,352
0
from ChannelSelection import ChannelSelection, BouquetSelector, SilentBouquetSelector from Components.ActionMap import ActionMap, HelpableActionMap from Components.ActionMap import NumberActionMap from Components.Harddisk import harddiskmanager from Components.Input import Input from Components.Label import Label from...
ssh1/stbgui
lib/python/Screens/InfoBarGenerics.py
Python
gpl-2.0
119,400
0.029414
# -*- coding: utf-8 -*- # !/usr/bin/python ################################### PART0 DESCRIPTION ################################# # Filename: def_get_ngram_2_db.py # Description: # # Author: Shuai Yuan # E-mail: ysh329@sina.com # Create: 2015-8-17 22:17:26 # Last: __author__ = 'yuens' ################################...
ysh329/wordsDB
mydef/def_get_ngram_2_db.py
Python
apache-2.0
6,600
0.01