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
# -*- coding: utf-8 -*- # Amara, universalsubtitles.org # # Copyright (C) 2013 Participatory Culture Foundation # # This program 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 #...
ofer43211/unisubs
apps/subtitles/admin.py
Python
agpl-3.0
6,564
0.001219
# -*- coding:utf-8 -*- ## src/common/connection_handlers_events.py ## ## Copyright (C) 2010-2014 Yann Leboulanger <asterix AT lagaule.org> ## ## This file is part of Gajim. ## ## Gajim is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published ## by the ...
irl/gajim
src/common/connection_handlers_events.py
Python
gpl-3.0
94,929
0.00316
# 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 it will be useful, # but...
cnewcome/sos
sos/plugins/xen.py
Python
gpl-2.0
3,945
0
# -*- coding: utf-8 -*- ## Copyright © 2012, Matthias Urlichs <matthias@urlichs.de> ## ## 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 3 of the License, or ## (at your op...
smurfix/HomEvenT
irrigation/rainman/models/env.py
Python
gpl-3.0
3,941
0.041921
import csv from dateutil.parser import parse from adoptarbol.tree.models import Tree def load(filename): with open(filename, encoding='utf-8') as f: reader = csv.reader(f) header = next(reader) def pos_for(field): return header.index(field) def float_or_none(string)...
icarito/arbio-azucar-adoptarbol
loader.py
Python
gpl-3.0
2,243
0.002675
from .endpoint import Endpoint from .exceptions import MissingRequiredFieldError from .fileuploads_endpoint import Fileuploads from .. import RequestFactory, DatasourceItem, PaginationItem, ConnectionItem import os import logging import copy import cgi from contextlib import closing # The maximum size of a file that c...
Talvalin/server-client-python
tableauserverclient/server/endpoint/datasources_endpoint.py
Python
mit
6,780
0.003835
#!/usr/bin/env python import argparse import ConfigParser import sys import os import multiprocessing import itertools import copy import subprocess from pprint import pprint from benchmark.benchmarker import Benchmarker from setup.linux.unbuffered import Unbuffered from setup.linux import setup_util from ast import l...
PermeAgility/FrameworkBenchmarks
toolset/run-tests.py
Python
bsd-3-clause
11,680
0.009589
from Cython.Compiler.ModuleNode import ModuleNode from Cython.Compiler.Symtab import ModuleScope from Cython.TestUtils import TransformTest from Cython.Compiler.Visitor import MethodDispatcherTransform from Cython.Compiler.ParseTreeTransforms import ( NormalizeTree, AnalyseDeclarationsTransform, AnalyseExpressi...
JulienMcJay/eclock
windows/Python27/Lib/site-packages/Cython/Compiler/Tests/TestVisitor.py
Python
gpl-2.0
2,228
0.002693
""" Copyright (C) 2016 ECHO Wizard : Modded by TeamGREEN 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 3 of the License, or (at your option) any later v...
OptimusGREEN/repo67beta
OGT Installer/plugin.program.ogtools/downloader.py
Python
gpl-3.0
2,845
0.011951
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2012 Andrea Cometa. # Email: info@andreacometa.it # Web site: http://www.andreacometa.it # Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>) # Copyright (C) 2012 ...
abstract-open-solutions/l10n-italy
l10n_it_ricevute_bancarie/models/account_config.py
Python
agpl-3.0
2,038
0
from notifications_utils.clients.antivirus.antivirus_client import ( AntivirusClient, ) from notifications_utils.clients.redis.redis_client import RedisClient from notifications_utils.clients.zendesk.zendesk_client import ZendeskClient antivirus_client = AntivirusClient() zendesk_client = ZendeskClient() redis_cli...
alphagov/notifications-admin
app/extensions.py
Python
mit
340
0
#!/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 ...
taschik/ramcloud-load-manager
scripts/recoverymetrics.py
Python
isc
32,500
0.003692
""" Classes used to model the roles used in the courseware. Each role is responsible for checking membership, adding users, removing users, and listing members """ from abc import ABCMeta, abstractmethod from django.contrib.auth.models import User, Group from xmodule.modulestore import Location from xmodule.modulest...
mjg2203/edx-platform-seas
lms/djangoapps/courseware/roles.py
Python
agpl-3.0
7,324
0.001912
#!/usr/bin/python3 # -*- encoding: utf-8 -*- import unittest from model import * from example_data import expenses, payments, participations, persons, events kasse = Gruppenkasse.create_new() kasse.fill_with(expenses, payments, participations) class TestGruppenkasse(unittest.TestCase): def setUp(self): ....
RincewindWizzard/gruppenkasse-gtk
src/tests/test_model.py
Python
lgpl-3.0
1,143
0.0035
import mock import pytest from rest_framework import exceptions from addons.wiki.models import WikiPage from addons.wiki.tests.factories import WikiFactory, WikiVersionFactory from api.base.settings.defaults import API_BASE from api_tests.wikis.views.test_wiki_detail import WikiCRUDTestCase from framework.auth.core i...
mfraezz/osf.io
api_tests/nodes/views/test_node_wiki_list.py
Python
apache-2.0
19,731
0.001977
from __future__ import division # Read two integers from STDIN a = int(raw_input()) b = int(raw_input()) # Print integer division, a//b print(a // b) # Print float division, a/b print(a % b) # Print divmod of a and b print(divmod(a, b))
nhquiroz/hacker-rank
python/introduction/mod-div-mod.py
Python
mit
239
0
"""Primare amplier control. This module allows you to control your Primare I22 and I32 amplifier from the command line using Primare's binary protocol via the RS232 port on the amplifier. """ from __future__ import with_statement import binascii import logging import struct import time # from twisted.logger import ...
ZenithDK/mopidy-primare
mopidy_primare/primare_serial.py
Python
apache-2.0
17,724
0
from monitor import monitor_qlen from subprocess import Popen, PIPE from time import sleep, time from multiprocessing import Process from argparse import ArgumentParser import sys import os parser = ArgumentParser(description="CWND/Queue Monitor") parser.add_argument('--exp', '-e', dest="exp", ...
TheArbiter/Networks
lab4/lab4exercise2/exp_monitor.py
Python
gpl-3.0
1,212
0.008251
# -*- coding: utf-8 -* from pymeasure.instruments.pyvisa_instrument import PyVisaInstrument from pymeasure.case import ChannelRead from pymeasure.instruments.oxford import OxfordInstrument import time class _QxfordILMChannel(ChannelRead): def __init__(self, instrument): ChannelRead.__init__(self) ...
t--wagner/pymeasure
instruments/oxford_ilm.py
Python
gpl-3.0
1,931
0.004661
# # The Python Imaging Library. # $Id: MicImagePlugin.py,v 1.2 2007/06/17 14:12:15 robertoconnor Exp $ # # Microsoft Image Composer support for PIL # # Notes: # uses TiffImagePlugin.py to read the actual image streams # # History: # 97-01-20 fl Created # # Copyright (c) Secret Labs AB 1997. ...
arpruss/plucker
plucker_desktop/installer/osx/application_bundle_files/Resources/parser/python/vm/PIL/MicImagePlugin.py
Python
gpl-2.0
2,334
0.002571
#------------------------------------------------------------------------------ # Copyright (C) 2009 Richard Lincoln # # This program 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; version 2 dated June...
rwl/openpowersystem
cdpsm/iec61970/wires/disconnector.py
Python
agpl-3.0
1,912
0.004184
from __future__ import absolute_import, unicode_literals import os from appconf import AppConf from django.conf import settings # noqa class SessionRedisConf(AppConf): HOST = '127.0.0.1' PORT = 6379 DB = 0 PREFIX = 'django_sessions' PASSWORD = None UNIX_DOMAIN_SOCKET_PATH = None U...
hellysmile/django-redis-sessions-fork
redis_sessions_fork/conf.py
Python
bsd-3-clause
932
0
""" Compute class """ import numpy as np import matplotlib matplotlib.use('Agg') import pylab as pl #TODO: Take care of the looks of these plots class Compute(object): """ Abstract compute class. It will never be used, but is parent of all the different computes. """ def __init__(self): """ Construc...
pabloalcain/lammps-python
pylammps/Computes/Compute.py
Python
gpl-3.0
1,563
0.007038
from django.core.files.storage import default_storage from django.forms import widgets from django.urls import reverse from repanier.const import EMPTY_STRING from repanier.picture.const import SIZE_M from repanier.tools import get_repanier_template_name class RepanierPictureWidget(widgets.TextInput): template_n...
pcolmant/repanier
repanier/widget/picture.py
Python
gpl-3.0
1,573
0
"""This will perform basic enrichment on a given IP.""" import csv import json import mmap import os import socket import urllib import dns.resolver import dns.reversename from geoip import geolite2 from IPy import IP from joblib import Parallel, delayed from netaddr import AddrFormatError, IPSet torcsv = 'Tor_ip_li...
zebde/RobIP
iplookup.py
Python
gpl-3.0
6,811
0.000147
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # Copyright (c) 2019 The ungoogled-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. """ Module for the downloading, checking, and unpacking of necessary files into the source tree....
Eloston/ungoogled-chromium
utils/downloads.py
Python
bsd-3-clause
17,917
0.003628
# -*- coding: utf-8 -*- # Copyright 2022 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
googleapis/python-speech
samples/generated_samples/speech_v1p1beta1_generated_speech_recognize_async.py
Python
apache-2.0
1,643
0.000609
#!/usr/bin/env python2 # # Copyright (C) 2013-2017(H) # Max Planck Institute for Polymer Research # # This file is part of ESPResSo++. # # ESPResSo++ 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,...
niktre/espressopp
testsuite/pi_water/water.py
Python
gpl-3.0
8,192
0.007935
# encoding: utf-8 from __future__ import absolute_import, division, print_function import numpy as np import tables from liam2.data import merge_arrays, get_fields, index_table_light, merge_array_records from liam2.utils import timed, loop_wh_progress, merge_items __version__ = "0.4" def get_group_fiel...
liam2/liam2
liam2/merge_h5.py
Python
gpl-3.0
4,745
0.000211
# -*- coding: utf-8 -*- # # Copyright (C) 2008-2011 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://babel.edgewall.org/wiki/License. # # This software consists...
cloudera/hue
desktop/core/ext-py/Babel-2.5.1/tests/messages/test_checkers.py
Python
apache-2.0
12,538
0
# -*- coding: utf-8 -*- from Components.ActionMap import ActionMap, HelpableActionMap, NumberActionMap from Components.Harddisk import harddiskmanager, findMountPoint from Components.Input import Input from Components.Label import Label from Components.MovieList import AUDIO_EXTENSIONS from Components.PluginComponent i...
Mariusz1970/enigma2
lib/python/Screens/InfoBarGenerics.py
Python
gpl-2.0
140,459
0.031426
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- from collections import namedtuple from typing import List, Union import numpy as np from astropy.io import fits TimeChunk = namedtuple('TimeChunk', 'start_time num_of_samples') def split_time_range(time_length: float, num_of_chunks: int, ...
ziotom78/stripeline
stripeline/timetools.py
Python
mit
11,654
0.001974
class C: ''' <caret> '''
asedunov/intellij-community
python/testData/editing/spaceDocStringStubInClass.after.py
Python
apache-2.0
28
0.071429
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
AutorestCI/azure-sdk-for-python
azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/operation_list_result.py
Python
mit
955
0
import autograd.numpy as np from autograd.scipy.misc import logsumexp from features import num_atom_features, num_bond_features from util import memoize, WeightsParser from mol_graph import graph_from_smiles_tuple, degrees from build_vanilla_net import build_fingerprint_deep_net, relu, batch_normalize def fast_array...
HIPS/neural-fingerprint
neuralfingerprint/build_convnet.py
Python
mit
6,508
0.005532
# encoding: 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 'DamageScenario.customlandusegeoimage' db.add_column('lizard_damage_damagescenario', 'custo...
lizardsystem/lizard-damage
lizard_damage/migrations/0012_auto__add_field_damagescenario_customlandusegeoimage.py
Python
gpl-3.0
9,306
0.007629
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tully.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that the ...
evonove/urt-tully
django-tully/manage.py
Python
mit
803
0
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'mainwindow.ui' # # Created: Wed May 25 13:43:28 2016 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf...
psvnl/podb
ui_mainwindow.py
Python
gpl-3.0
28,313
0.002508
# Copyright 2015, 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 required by applicable law or agreed to in writing, s...
clarko1/Cramd
bigquery/api/getting_started_test.py
Python
apache-2.0
808
0
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, 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 ...
StackStorm/st2
st2common/st2common/persistence/rule_enforcement.py
Python
apache-2.0
920
0
""" This module contains some assorted functions used in tests """ from __future__ import absolute_import import os from importlib import import_module from twisted.trial.unittest import SkipTest from scrapy.exceptions import NotConfigured from scrapy.utils.boto import is_botocore def assert_aws_environ(): """...
umrashrf/scrapy
scrapy/utils/test.py
Python
bsd-3-clause
3,020
0.002649
## @package csnStandardModuleProject # Definition of the methods used for project configuration. # This should be the only CSnake import in a project configuration. import csnUtility import csnProject import csnBuild import os.path import inspect from csnProject import GenericProject class StandardModuleProject(Gener...
csnake-org/CSnake
src/csnStandardModuleProject.py
Python
bsd-3-clause
7,313
0.012033
# This file is part of the MapProxy project. # Copyright (C) 2010 Omniscale <http://omniscale.de> # # 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...
procrastinatio/mapproxy
mapproxy/test/unit/test_collections.py
Python
apache-2.0
3,064
0.001305
#!/usr/bin/env python ######################################### # # fasta2tax.py # ######################################## import sys,os import argparse import pymysql as MySQLdb import json py_pipeline_path = os.path.expanduser('~/programming/py_mbl_sequencing_pipeline') #my $rdpFile = "$inputfile.rdp"; print "...
avoorhis/vamps-node.js
public/scripts/rdp/rdp_fasta2tax.py
Python
mit
6,320
0.024525
""" Project additional elements """ from .menu_button import * from .new_key_qframe import *
MindLoad/MonkeyManager
widgets/__init__.py
Python
gpl-3.0
94
0
#!/usr/bin/python3 # -*- coding: utf-8 -*- # # This software is licensed as described in the README.rst and LICENSE # files, which you should have received as part of this distribution. import setuptools # noinspection PyPep8Naming from raspi_pir import __version__ as VERSION DEPS = ['RPi.Sensor>=0.5.3'] CLASSIFIERS ...
ricco386/broadcaster
RPi.PIR/setup.py
Python
bsd-3-clause
1,382
0
#!/usr/bin/python #requires the following: #sudo apt-get install curl #curl http://apt.wxwidgets.org/key.asc | apt-key add - #sudo apt-get update #sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-i18n #sudo apt-get install python-gdata import wx import os import sys def pinger(): f = os.popen('ping -c 1 go...
kernt/linuxtools
gnome3-shell/nautilus-scripts/Archiving/PlowShare-Upload.py
Python
gpl-3.0
6,622
0.056025
# for Python3 we need a fully qualified name import from mappyscript._mappyscript import version, version_number, load, loads, dumps, create_request, load_map_from_params, Layer, convert_sld
geographika/mappyscript
mappyscript/__init__.py
Python
mit
190
0.010526
import os import pytest import numpy as np from imageio import imread def compare_2_images(validator_path, output_path): val_abs_path = os.path.join(os.path.dirname(__file__), validator_path) out_abs_path = os.path.join(os.path.dirname(__file__), output_path) val_img = imread(val_abs_path, pilmode='RGB')...
Vladkryvoruchko/PSPNet-Keras-tensorflow
tests/test_smoke.py
Python
mit
2,114
0.005676
from django.db import models # from django.contrib.gis.geoip import GeoIP # # g = GeoIP() # Create your models here. class TempMail(models.Model): mailfrom = models.EmailField() mailsubj = models.CharField(max_length=20) mailrcvd = models.DateTimeField() mailhdrs = models.CharField() class SavedMail(m...
bitsoffreedom/baas
baas/boem/models.py
Python
gpl-2.0
607
0.008237
from django.contrib import admin from api.models import * admin.site.register(Question) admin.site.register(Answer) admin.site.register(Sighting) admin.site.register(Picture) admin.site.register(UserComment) admin.site.register(ExpertComment) admin.site.register(SightingFAQ)
Habitissimo/vespapp-web
api/admin.py
Python
gpl-3.0
278
0
# coding=utf-8 # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import pytest import functools from io import BytesIO from devtools_testutils.aio import recorded_by_proxy_async from azure.core.exceptions import Servic...
Azure/azure-sdk-for-python
sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_identity_documents_async.py
Python
mit
8,158
0.003187
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # Copyright (C) 2004 Robert Kaye # Copyright (C) 2006 Lukáš Lalinský # # 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; ...
mwiencek/picard
picard/tagger.py
Python
gpl-2.0
23,746
0.002653
from core.himesis import Himesis, HimesisPreConditionPatternLHS import uuid class HMM9_if_IsolatedLHS(HimesisPreConditionPatternLHS): def __init__(self): """ Creates the himesis graph representing the AToM3 model HMM9_if_IsolatedLHS. """ # Flag this instance as c...
levilucio/SyVOLT
UMLRT2Kiltera_MM/Properties/from_thesis/HMM9_if_IsolatedLHS.py
Python
mit
2,478
0.010896
#!/usr/bin/env python import argparse import logging import os import shutil import sys import glob # Location of saved templates SAVE_DIR = os.environ.get("RECYCLE_TEMPLATES_DIR", "~/.recycle") try: input = raw_input except NameError: pass def should_overwrite(typeOfThing, path): assert os.path.exists(p...
williamg/recycle
recycle/recycle.py
Python
mit
6,538
0.00153
# -*- coding: utf-8 -*- """ Ozone Bricklet Plugin Copyright (C) 2015 Olaf Lüke <olaf@tinkerforge.com> ozone.py: Ozone Bricklet Plugin Implementation 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; e...
D4wN/brickv
src/brickv/plugin_system/plugins/ozone/ozone.py
Python
gpl-2.0
3,949
0.002026
#!/usr/bin/python import sys import time import datetime import re import ConfigParser import os from operator import attrgetter scriptdir = os.path.abspath(os.path.dirname(sys.argv[0])) conffile = scriptdir + "/ovirt-vm-rolling-snapshot.conf" Config = ConfigParser.ConfigParser() if not os.path.isfile(conffile): ...
daelmaselli/ovirt-vm-hot-backup
ovirt-vm-rolling-snapshot.py
Python
mit
6,894
0.003046
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2022 Pytroll developers # Author(s): # Adam Dybbroe <Firstname.Lastname @ smhi.se> # 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 Foundat...
pytroll/pytroll-aapp-runner
aapp_runner/tests/test_helper_functions.py
Python
gpl-3.0
5,294
0.002456
from tests.test_helper import * from braintree.resource import Resource class TestResource(unittest.TestCase): def test_verify_keys_allows_wildcard_keys(self): signature = [ {"foo": [{"bar": ["__any_key__"]}]} ] params = { "foo[bar][lower]": "lowercase", ...
braintree/braintree_python
tests/unit/test_resource.py
Python
mit
3,302
0.000909
# ========================================================================= # Copyright 2012-present Yunify, Inc. # ------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this work except in compliance with the Licens...
yunify/qingcloud-cli
qingcloud/cli/driver.py
Python
apache-2.0
3,383
0.004138
# coding=utf-8 # # This file is part of SickGear. # # SickGear 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. # # SickGear is distribu...
adam111316/SickGear
sickbeard/providers/grabtheinfo.py
Python
gpl-3.0
6,393
0.002659
### # Copyright (c) 2004, Jeremiah Fincher # 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 retain the above copyright notice, # this list of conditi...
Alcheri/Plugins
MyPing/config.py
Python
bsd-3-clause
2,709
0.001477
import pf from Var import var import numpy,string from Glitch import Glitch """A faster version of nextTok(), using memory allocated (once only) using numpy, and using functions written in C. The slow, pure python module is NexusToken.py. This version is about twice as fast. Which one is used is under the control o...
Linhua-Sun/p4-phylogenetics
p4/NexusToken2.py
Python
gpl-2.0
5,196
0.007313
import sqlite3 from sklearn import linear_model import numpy as np import pandas as pd import datetime import sys conn = sqlite3.connect(sys.argv[1]) c = conn.cursor(); c.execute("select _id, name from tracks") rows = c.fetchall() track_names = pd.DataFrame([{'track_name': row[1]} for row in rows]) track_ids = [int...
lordi/tickmate
analysis/tmkit/linear_regression.py
Python
gpl-3.0
2,249
0.006225
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('deals', '0002_advertiser_logo'), ] operations = [ migrations.RemoveField( model_name='advertiser', n...
andela/troupon
troupon/deals/migrations/0003_remove_advertiser_logo.py
Python
mit
349
0
# -*- coding: utf-8 -*- ############################################################################### # # UpdateSigningCertificate # Changes the status of the specified signing certificate from active to disabled, or vice versa. This action can be used to disable a user's signing certificate as part of a certificate...
jordanemedlock/psychtruths
temboo/core/Library/Amazon/IAM/UpdateSigningCertificate.py
Python
apache-2.0
4,842
0.006196
from __future__ import print_function, unicode_literals import inspect import six from django import forms from django.forms.forms import DeclarativeFieldsMetaclass from rest_framework import serializers from .. import fields from ..utils import ( initialize_class_using_reference_object, reduce_attr_dict_from...
pombredanne/django-rest-framework-braces
drf_braces/forms/serializer_form.py
Python
mit
5,024
0.001194
import pytest from diofant import Integer, SympifyError from diofant.core.operations import AssocOp, LatticeOp __all__ = () class MyMul(AssocOp): identity = Integer(1) def test_flatten(): assert MyMul(2, MyMul(4, 3)) == MyMul(2, 4, 3) class Join(LatticeOp): """Simplest possible Lattice class.""" ...
diofant/diofant
diofant/tests/core/test_operations.py
Python
bsd-3-clause
1,106
0.000904
default_app_config = 'daiquiri.query.apps.QueryConfig'
aipescience/django-daiquiri
daiquiri/query/__init__.py
Python
apache-2.0
55
0
#!/usr/bin/python """ Copyright 2013 Google Inc. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. Repackage expected/actual GM results as needed by our HTML rebaseline viewer. """ # System-level imports import argparse import fnmatch import json import logging import...
trevorlinton/skia
gm/rebaseline_server/results.py
Python
bsd-3-clause
22,208
0.005629
########################################################################## # # Copyright (c) 2013-2014, Image Engine Design 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: # # * Redi...
goddardl/gaffer
python/GafferSceneUI/TransformUI.py
Python
bsd-3-clause
2,347
0.008095
# Copyright (C) 2008, 2009 Jochen Voss <voss@seehuhn.de> # # 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 conditions ...
seehuhn/wisent
template.py
Python
gpl-2.0
10,909
0.006508
"""Trivial Interfaces and Adaptation from PyProtocols. This package is a subset of the files from Phillip J. Eby's PyProtocols package. They are only included here to help remove dependencies on external packages from the Traits package. The code has been reorganized to address circular imports that were discovered wh...
HyperloopTeam/FullOpenMDAO
lib/python2.7/site-packages/traits-4.3.0-py2.7-macosx-10.10-x86_64.egg/traits/protocols/__init__.py
Python
gpl-2.0
365
0
# -*- coding: utf-8 -*- # # Minimum amount of settings to run the googlytics test suite # # googlytics options are often overriden during tests GOOGLE_ANALYTICS_KEY = 'U-TEST-XXX' DEBUG = True DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'googlytics_test.sqlite3' ...
rikpg/django-googlytics
test_settings.py
Python
bsd-3-clause
510
0
# -*- coding: utf-8 -*- # # 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 writing, software ...
OpringaoDoTurno/airflow
tests/utils/test_log_handlers.py
Python
apache-2.0
6,367
0.001099
#!/usr/bin/env python # Written by Filippo Bonazzi <f.bonazzi@davide.it> 2016 # # Convert an integer from its decimal representation into its hexadecimal # representation. # TODO: add argparse import sys import math s = "".join(sys.argv[1].split()) for c in s: if c not in "1234567890": print("Bad string \"...
Fbonazzi/Scripts
binary/int_to_byte.py
Python
gpl-3.0
471
0
""" Application-class that implements pyFoamChangeGGIBoundary.py Modification of GGI and cyclicGGI interface parameters in constant/polymesh/boundary file. Author: Martin Beaudoin, Hydro-Quebec, 2009. All rights reserved """ from PyFoam.Applications.PyFoamApplication import PyFoamApplication from PyFoam.RunDicti...
Unofficial-Extend-Project-Mirror/foam-extend-foam-extend-3.2
ThirdParty/LocalDev/Hydro-Quebec/PyFoam/ChangeGGIBoundary.py
Python
gpl-3.0
7,040
0.012642
# TODO: Handle timestamp generation for modinput and set sample.timestamp properly for timestamp replacement import datetime import json import os import pprint import random import re import time import uuid import six.moves.urllib.error import six.moves.urllib.parse import six.moves.urllib.request from splunk_event...
splunk/eventgen
splunk_eventgen/lib/eventgentoken.py
Python
apache-2.0
23,368
0.002225
#!/usr/bin/env python # # Electrum - Lightweight Bitcoin Client # Copyright (C) 2015 Thomas Voegtlin # # 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 3 of the License, or # (at y...
edb1rd/BTC
plugins/trustedcoin.py
Python
gpl-3.0
25,459
0.003928
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-01-02 18:22 from __future__ import unicode_literals import django.contrib.auth.models import django.core.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependenc...
Nikola-K/django-template
users/migrations/0001_initial.py
Python
mit
3,082
0.004218
from lightbulb.api.api_native import LightBulb import base64 lightbulbapp = LightBulb() path = "/test/env/bin/lightbulb" #Path to binary configuration_A = {'TESTS_FILE_TYPE': 'None', 'ALPHABET': '32-57,58-64,65-126', 'SEED_FILE_TYPE': 'FLEX', 'TESTS_FILE': 'None','DFA1_MINUS_DFA2': 'True', 'SAVE': 'False', 'HANDLER...
lightbulb-framework/lightbulb-framework
examples/test_custom_api_native_example_1.py
Python
mit
1,286
0.012442
# =============================================================================== # Copyright 2014 Jake Ross # # 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...
USGSDenverPychron/pychron
pychron/core/ui/qt/keybinding_editor.py
Python
apache-2.0
4,794
0.001043
#!/usr/bin/python2.7 import sys import csv import yaml import codecs TO_BE_TRANSLATED_MARK = "***TO BE TRANSLATED***" def collect(result, node, prefix=None): for key,value in node.items(): new_prefix = (key if prefix == None else prefix + "." + key) if isinstance(value, dict): collect(...
shimarin/discourse-ja-translation
yaml2csv.py
Python
gpl-2.0
1,474
0.00882
import functools import logging import random from hazelcast.future import Future from hazelcast.proxy.base import Proxy from hazelcast.cluster import VectorClock from hazelcast.protocol.codec import ( pn_counter_add_codec, pn_counter_get_codec, pn_counter_get_configured_replica_count_codec, ) from hazelca...
hazelcast/hazelcast-python-client
hazelcast/proxy/pn_counter.py
Python
apache-2.0
12,287
0.002442
import os import unittest import moderngl import pycodestyle class TestCase(unittest.TestCase): def test_style(self): config_file = os.path.join(os.path.dirname(__file__), '..', 'tox.ini') style = pycodestyle.StyleGuide(config_file=config_file, ignore='E402') check = style.check_files([ ...
cprogrammer1994/ModernGL
tests/test_code_style.py
Python
mit
587
0
import time from menu.ncolor import * from menu.showMainMenu import * from command.shell import * from write.dnsmasq_write import * class Sub_Menu(): dns_message = """ you can add a redirect entry in this menu or edit the dnsmasq configuration file located in""" + color.BLEU + """ '/etc/redirect/dnsmasq.hos...
blackice5514/QuickAp
menu/showSubMenu.py
Python
gpl-3.0
20,613
0.027119
""" ==================================================== Shuffle channels' data in the time domain and plot. ==================================================== """ # Author: Eberhard Eich # Praveen Sripad # # License: BSD (3-clause) import numpy as np import os.path as op import mne from jumeg.j...
fboers/jumeg
examples/connectivity/plot_shuffle_time_slices.py
Python
bsd-3-clause
2,449
0.008575
# -*- coding: utf-8 -*- # entry.py, part for evparse : EisF Video Parse, evdh Video Parse. # entry: evparse/lib/hunantv # version 0.1.0.0 test201505151816 # author sceext <sceext@foxmail.com> 2009EisF2015, 2015.05. # copyright 2015 sceext # # This is FREE SOFTWARE, released under GNU GPLv3+ # please see README.md an...
liuguanyu/evparse
lib/hunantv/entry.py
Python
gpl-3.0
3,213
0.006225
from b_hash import b_hash from b_hash import NoData from jenkins import jenkins from h3_hash import h3_hash from jenkins import jenkins_fast, jenkins_wrapper from graph import * from collections import deque from bitstring import BitArray import math class bdz(b_hash): """Class for perfect hash function generated...
vhavlena/appreal
netbench/pattern_match/bin/library/bdz.py
Python
gpl-2.0
9,513
0.01356
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Tue Jul 11 20:47:53 2017 @author: fernando """ import pandas as pd import matplotlib import matplotlib.pyplot as plt plt.style.use('ggplot') df = pd.read_csv("/home/fernando/CoursePythonDS/DAT210x/Module3/Datasets/wheat.data") print df.describe() df[df...
FernanOrtega/DAT210x
Module3/notes/histogram_example.py
Python
mit
446
0.008969
from pypers.core.step import Step from pypers.steps.mothur import Mothur import os import json import re import glob class MothurSummarySeqs(Mothur): """ Summarizes the quality of sequences in an unaligned or aligned fasta-formatted sequence file. """ spec = { 'name' : 'MothurSummarySeqs', ...
frankosan/pypers
pypers/steps/mothur/MothurSummarySeqs.py
Python
gpl-3.0
3,305
0.014221
import pytest import datetime import os from helpers import ensure_dir def pytest_configure(config): if not hasattr(config, 'input'): current_day = '{:%Y_%m_%d_%H_%S}'.format(datetime.datetime.now()) ensure_dir(os.path.join(os.path.dirname(__file__), 'input', current_day)) result_dir = os...
appium/appium
sample-code/python/test/conftest.py
Python
apache-2.0
1,108
0.002708
# import asyncio # # async def compute(x, y): # print("Compute %s + %s ..." % (x, y)) # await asyncio.sleep(1.0) # return x + y # # async def print_sum(x, y): # for i in range(10): # result = await compute(x, y) # print("%s + %s = %s" % (x, y, result)) # # loop = asyncio.get_event_loop()...
fs714/concurrency-example
asynchronous/py36/asyncio/async_test.py
Python
apache-2.0
868
0.002304
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.core.validators import django.contrib.auth.models class Migration(migrations.Migration): dependencies = [ ('core', '0011_atmosphere_user_manager_update'), ] operations = [ ...
CCI-MOC/GUI-Backend
core/migrations/0012_remove_null_from_many_many.py
Python
apache-2.0
1,573
0.006357
from setuptools import setup version = '1.4' testing_extras = ['nose', 'coverage'] docs_extras = ['Sphinx'] setup( name='WebOb', version=version, description="WSGI request and response object", long_description="""\ WebOb provides wrappers around the WSGI request environment, and an object to help c...
nirmeshk/oh-mainline
vendor/packages/webob/setup.py
Python
agpl-3.0
2,150
0.00186
#!/usr/bin/env python # -*- coding: utf-8 -*- # pylint: disable=missing-docstring import os import codecs from setuptools import setup def read(fname): file_path = os.path.join(os.path.dirname(__file__), fname) return codecs.open(file_path, encoding='utf-8').read() setup( name='pytest-typehints', v...
eddie-dunn/pytest-typehints
setup.py
Python
bsd-3-clause
1,385
0
""" Copyright (C) 2014 Vahid Rafiei (@vahid_r) 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...
vahidR/test-builder
tests/test_utils.py
Python
gpl-2.0
1,040
0.005769
""" Convert between bytestreams and higher-level AMQP types. 2007-11-05 Barry Pederson <bp@barryp.org> """ # Copyright (C) 2007 Barry Pederson <bp@barryp.org> # # 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 Fr...
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/amqp/serialization.py
Python
agpl-3.0
16,315
0
# # Copyright 2006-2009 Zuza Software Foundation # # This file is part of the Translate Toolkit. # # 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 ...
miurahr/translate
translate/storage/poxliff.py
Python
gpl-2.0
14,579
0.000549
# encoding: utf-8 from bs4 import BeautifulSoup from okscraper.base import BaseScraper from okscraper.sources import UrlSource, ScraperSource from okscraper.storages import ListStorage, DictStorage from lobbyists.models import LobbyistHistory, Lobbyist, LobbyistData, LobbyistRepresent, LobbyistRepresentData from perso...
otadmor/Open-Knesset
lobbyists/scrapers/lobbyist.py
Python
bsd-3-clause
5,096
0.002747