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
#!/usr/bin/env python # coding=utf-8 __author__ = u'Ahmed Şeref GÜNEYSU' import ui
guneysus/packathon2016
packathon2016/__init__.py
Python
bsd-3-clause
85
0
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """Mimic pyquick exercise -- optional extra exercise. Google's Python Class Read in the ...
sanaldavis/Google-Python-Exercies
basic/mimic.py
Python
apache-2.0
2,511
0.010753
[uTidylib]: http://utidylib.berlios.de/ [options]: http://tidy.sourceforge.net/docs/quickref.html Copyright (c)2008 [Waylan Limberg](http://achinghead.com) License: [BSD](http://www.opensource.org/licenses/bsd-license.php)
retrography/scancode-toolkit
tests/cluecode/data/ics/markdown-markdown-extensions/html_tidy.py
Python
apache-2.0
225
0.031111
# Copyright (C) 2010 Google 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: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and th...
mogoweb/webkit_for_android5.1
webkit/Tools/Scripts/webkitpy/tool/steps/postdiffforcommit.py
Python
apache-2.0
1,879
0.001597
from django.core.exceptions import ImproperlyConfigured from django.template import engines from django.test import SimpleTestCase, override_settings class TemplateStringsTests(SimpleTestCase): @override_settings(TEMPLATES=[{ 'BACKEND': 'raise.import.error', }]) def test_backend_import_error(self...
willharris/django
tests/template_backends/test_utils.py
Python
bsd-3-clause
1,198
0
from test_support import * import re, os do_flow() hand = open(os.path.join("gnatprove", "main.ali")) for line in hand : line = line.rstrip() if re.search('^F ', line) : print line
ptroja/spark2014
testsuite/gnatprove/tests/O824-010__flow_no_computed_calls_for_ll_subprogram/test.py
Python
gpl-3.0
199
0.015075
import numpy as np from numba import jit import OSIM.Simulation.Utils as u from OSIM.Modeling.AbstractComponents.NonlinearComponent import NonlinearComponent class IBC(NonlinearComponent): def __init__(self, nodes, name, value, superComponent, **kwargs): super(IBC, self).__init__(nodes, name, value, supe...
tmaiwald/OSIM
OSIM/Modeling/Components/NPN_Vertical_Bipolar_Intercompany_Model/VBIC_Currents/IBC.py
Python
bsd-2-clause
4,274
0.007253
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the MSIE typed URLs Windows Registry plugin.""" import unittest from plaso.parsers.winreg_plugins import typedurls from tests.parsers.winreg_plugins import test_lib class MsieTypedURLsPluginTest(test_lib.RegistryPluginTestCase): """Tests for the MSIE ty...
kiddinn/plaso
tests/parsers/winreg_plugins/typedurls.py
Python
apache-2.0
4,083
0.00147
# Dict of Twitter handles and known political views data_tuples = { "jeremycorbyn" : "Labour", "ken4london" : "Labour", "Imran_HussainMP" : "Labour", "GloriaDePiero" : "Labour", "tom_watson" : "Labour", "JonAshworth" : "Labour", "UKLabour" : "Labour", "RupaHuq" : "Labour", "heidi_mp...
CarltonShepherd/political-tweet-classifier
data/usermapping.py
Python
gpl-2.0
1,522
0.032852
# Copyright (C) 2009, 2010, 2011 Rickard Lindberg, Roger Lindberg # # This file is part of Timeline. # # Timeline 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...
ezequielpereira/Time-Line
autopilot/autopilotlib/wrappers/messagedialog.py
Python
gpl-3.0
1,500
0.003333
from django.views import generic from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse_lazy from django.utils.translation import ugettext_lazy as _ from horizon import exceptions from horizon import forms from horizon import tabs from horizon import tables from billingdashboard.co...
sreenathmenon/billing-dashboard
billingdashboard/dashboards/project/cust_invoice/views.py
Python
apache-2.0
1,151
0.004344
#!/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 distribut...
hryamzik/ansible
lib/ansible/modules/network/nxos/nxos_interface_ospf.py
Python
gpl-3.0
17,076
0.001464
#! /usr/bin/python2.6 # NOTE: the above "/usr/local/bin/python" is NOT a mistake. It is # intentionally NOT "/usr/bin/env python". On many systems # (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI # scripts, and /usr/local/bin is the default directory where Python is # installed, so /usr/bin/env woul...
astagi/twitterene
twitterene/tweepy/cgi.py
Python
gpl-3.0
34,465
0.002234
# coding=utf-8 """ a csv trace reader Author: Jason Yang <peter.waynechina@gmail.com> 2016/06 """ import string from PyMimircache.const import ALLOW_C_MIMIRCACHE, INSTALL_PHASE from PyMimircache.utils.printing import * if ALLOW_C_MIMIRCACHE and not INSTALL_PHASE: import PyMimircache.CMimircache.CacheRead...
1a1a11a/mimircache
PyMimircache/cacheReader/csvReader.py
Python
gpl-3.0
8,745
0.003316
import Aplicacion import Probabilidades as pr from Menu import * from Variable import * from validador import * #------------------------------------------------ #--------------- TODO --------------------------- #------------------------------------------------ # 1) Lista de tareas pendientes a implementar. # ...
pepitogithub/PythonScripts
crypto.py
Python
gpl-2.0
5,608
0.023894
"""empty message Revision ID: 177b55430b61 Revises: None Create Date: 2015-01-29 22:29:18.963249 """ # revision identifiers, used by Alembic. revision = '177b55430b61' down_revision = None from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - please adjust! ###...
WatchPeopleCode/WatchPeopleCode
migrations/versions/177b55430b61_.py
Python
mit
679
0.013255
from tests.models_tests import ModelsTestBase from test_models.core import Language from tests import dbhelper from sqlalchemy.exc import IntegrityError class TestLanguageModel(ModelsTestBase): def test_00_init(self): assert Language def test_01_populate(self): dbhelper.add(Language(lang='en...
jfillmore/hoops
tests/models_tests/test_model_language.py
Python
mit
1,525
0.001311
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. # design: # a threaded worker accepts connections in the main loop, accepted # connections are are added to the thread pool as a connection job. On # keepalive connections are put back in the ...
naziris/HomeSecPi
venv/lib/python2.7/site-packages/gunicorn/workers/gthread.py
Python
apache-2.0
10,785
0.000649
#!/usr/bin/env python import os from setuptools import setup, find_packages import streamkinect2.version as meta # Utility function to read the README file. def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name = meta.__project__, version = meta.__version__, ...
rjw57/streamkinect2
setup.py
Python
bsd-2-clause
1,148
0.016551
def propertycached(fn): attr_name = "_cached_" + fn.__name__ @property def _propertycached(self): if not hasattr(self, attr_name): setattr(self, attr_name, fn(self)) return getattr(self, attr_name) return _propertycached
koyadovic/Dia
predictive/systems/statistical/analysis/tools/property.py
Python
gpl-2.0
271
0.00369
#!/usr/bin/env python """ Train a NNJM (with global context and extended architecture) model. """ usage = 'To train NNJM (with global context and extended architecture) using Theano' import cPickle import gzip import os import sys import time import re import codecs import argparse import datetime import numpy as n...
yuhaozhang/nnjm-global
code/train_nnjm_gplus.py
Python
mit
15,583
0.005134
# CUPS Cloudprint - Print via Google Cloud Print # Copyright (C) 2014 Simon Cadman # # 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...
jjscarafia/CUPS-Cloud-Print
ccputils.py
Python
gpl-3.0
10,118
0.000297
class Permission(object): """This class represents the most basic permission possible. It has any number of segments, but is fully defined by it's name. It may have wildcards, allowing for easily giving multiple permissions of the same form to users, especially when the number of permissions is large, infin...
Acidity/PyPermissions
pypermissions/permission.py
Python
mit
8,509
0.004231
#!/usr/bin/env python # # Copyright (c) 2018 The heketi Authors # # This file is licensed to you under your choice of the GNU Lesser # General Public License, version 3 or any later version (LGPLv3 or # later), or the GNU General Public License, version 2 (GPLv2), in all # cases as published by the Free Software Founda...
enj/origin
vendor/github.com/heketi/heketi/extras/tools/comparison.py
Python
apache-2.0
5,562
0.001079
# 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. import xmlrpclib import requests from turbogears.database import sessi...
jtoppins/beaker
IntegrationTests/src/bkr/inttest/server/selenium/test_distros.py
Python
gpl-2.0
9,272
0.001294
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2018 acrazing <joking.young@gmail.com>. All rights reserved. # @since 2018-12-03 00:03:40 import time from dbapi.DoubanAPI import DoubanAPI class GroupAPI: def __init__(self): self.api = DoubanAPI(flush=False) self._applied = {} s...
acrazing/dbapi
scripts/join_group.py
Python
mit
1,512
0
# # 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...
mrkm4ntr/incubator-airflow
tests/dags/test_scheduler_dags.py
Python
apache-2.0
1,500
0.001333
#!/usr/bin/env python # encoding: utf-8 """Module contains common utilities used in automated code tests for Gensim modules. Attributes: ----------- module_path : str Full path to this module directory. common_texts : list of list of str Toy dataset. common_dictionary : :class:`~gensim.corpora.dictionary.Di...
napsternxg/gensim
gensim/test/utils.py
Python
gpl-3.0
5,981
0.002508
from __future__ import absolute_import __version__ = "1.1.6" from .bucket import SCSFile, SCSBucket, SCSError, KeyNotFound SCSFile, SCSBucket, SCSError, KeyNotFound __all__ = "SCSFile", "SCSBucket", "SCSError" class appinfo(object): def __init__(self,access_key,secret_key,secure): self.access_key=access...
RawEvan/sharephotos
site-packages/sinastorage/__init__.py
Python
gpl-3.0
605
0.02314
#!/usr/bin/env python #Copyright 2004,2008 Sebastian Hagen # This file is part of gonium. # # gonium 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 l...
sh01/gonium
src/pid_filing.py
Python
gpl-2.0
2,162
0.019889
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import binascii import io import logging import os import traceback from builtins import ...
twitter/pants
src/python/pants/scm/git.py
Python
apache-2.0
22,734
0.011261
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0044_cm_defaults_for_allocation_and_quota'), ] operations = [ migrations.AlterField( model_name='machine...
CCI-MOC/GUI-Backend
core/migrations/0045_allow_blank_membership_AND_rename_project_links.py
Python
apache-2.0
583
0
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' trappist1.py |github| --------------------- This module hosts TRAPPIST-1-specific routines. .. role:: raw-html(raw) :format: html .. |github| replace:: :raw-html:`<a href = "https://github.com/rodluger/planetplanet/blob/master/planetplanet/photo/trappis...
rodluger/planetplanet
planetplanet/photo/trappist1.py
Python
gpl-3.0
7,549
0.015511
"""Univariate features selection.""" # Authors: V. Michel, B. Thirion, G. Varoquaux, A. Gramfort, E. Duchesnay. # L. Buitinck, A. Joly # License: BSD 3 clause import numpy as np import warnings from scipy import special, stats from scipy.sparse import issparse from ..base import BaseEstimator from ..prepr...
loli/semisupervisedforests
sklearn/feature_selection/univariate_selection.py
Python
bsd-3-clause
18,609
0
''' Script to generate Kivy API from source code. Code is messy, but working. Be careful if you change anything in ! ''' ignore_list = ( 'kivy._event', 'kivy.factory_registers', 'kivy.graphics.buffer', 'kivy.graphics.vbo', 'kivy.graphics.vertex', 'kivy.lib.osc' ) import os import sys from gl...
JulienMcJay/eclock
windows/kivy/doc/autobuild.py
Python
gpl-2.0
6,361
0.008018
#!/usr/bin/env python # Copyright 2017 Google Inc. # # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file or at # https://developers.google.com/open-source/licenses/bsd # set_vcf_sample_id.py # # This script processes a single sample VCF file and replaces the # sample I...
googlegenomics/pipelines-api-examples
set_vcf_sample_id/set_vcf_sample_id.py
Python
bsd-3-clause
2,263
0.011931
# (C) Datadog, Inc. 2015-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib from collections import defaultdict import logging import os from urlparse import urljoin # project from util import check_yaml from utils.checkfiles import get_conf_path from utils.http import retrieve_...
cberry777/dd-agent
utils/kubernetes/kubeutil.py
Python
bsd-3-clause
8,888
0.002025
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.AP_list, name='AP_list'), ]
OpenWinCon/OpenWinNet
web-gui/AP/urls.py
Python
apache-2.0
119
0
# -*- coding: utf-8 -*- from django.db import models from django.contrib import admin from django.utils.translation import ugettext as _ from koalixcrm.plugin import * from koalixcrm.crm.contact.phone_address import PhoneAddress from koalixcrm.crm.contact.email_address import EmailAddress from koalixcrm.crm.contact.p...
scaphilo/koalixcrm
koalixcrm/crm/documents/contract.py
Python
bsd-3-clause
11,821
0.003215
""" -*- coding: utf-8 -*- """ from python2awscli import bin_aws from python2awscli.error import AWSNotFound, ParseError, AWSDuplicate from python2awscli import must class BaseSecurityGroup(object): def __init__(self, name, region, vpc, description, inbound=None, outbound=None): """ :param name: S...
jhazelwo/python-awscli
python2awscli/model/securitygroup.py
Python
mit
6,235
0.001123
#!/usr/bin/env python # -*- coding: utf-8 -*- from datetime import date import tornado.escape import tornado.ioloop import tornado.web import urllib import mimetypes import re import threading from urllib2 import quote from sqlalchemy import desc from sqlalchemy.orm import joinedload,subqueryload,aliased from sqlal...
Tristan79/ComicStreamer
comicstreamerlib/server.py
Python
apache-2.0
80,525
0.009637
# # (C) Copyright 2008 Jelmer Vernooij <jelmer@samba.org> # (C) Copyright 2011 Jacek Konieczny <jajcus@jajcus.net> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License Version # 2.1 as published by the Free Software Foundation. # # This p...
pforret/python-for-android
python3-alpha/python-libs/pyxmpp2/sasl/gssapi.py
Python
apache-2.0
3,008
0.003324
from __future__ import absolute_import from __future__ import division from __future__ import print_function import re import numpy as np import six TOKENIZER_RE = re.compile(r"[A-Z]{2,}(?![a-z])|[A-Z][a-z]+(?=[A-Z])|[\'\w\-]+", re.UNICODE) class Tokenizer(object): def __init__(self): ...
sunmont/textclassifier
tokenizer.py
Python
apache-2.0
1,809
0.007756
from __future__ import absolute_import from .love import main import sys argv = sys.argv if len(argv)>=2: main(argv[1]) else: main()
takluyver/Love
love/__main__.py
Python
mit
147
0.020408
# -*- coding: utf-8 -*- import LineAlpha from LineAlpha.Gen.ttypes import * from datetime import datetime import time,random,sys,json,codecs,threading,glob cl = LineAlpha.LINE() cl.login(qr=True) cl.loginResult() kk = LineAlpha.LINE() kk.login(qr=True) kk.loginResult() ki = LineAlpha.LINE() ki.login(qr=True) ki.logi...
rachmansenpai/rach-devp
chivasbot.py
Python
gpl-3.0
83,839
0.010302
# -*- coding: cp936 -*- import sys default_encoding = 'utf-8' if sys.getdefaultencoding() != default_encoding: reload(sys) sys.setdefaultencoding(default_encoding) inf = open("F:/workspace/kancolle/log.txt",'r') dahe=open("F:/workspace/kancolle/5-13-dahe.txt",'w') dafeng=open("F:/workspace/kancolle/5-13-da...
misaki-nyanya/MyPieces
kancolle/buildCalc/run.py
Python
gpl-3.0
840
0.018519
import base64 from django.conf import settings from crum import get_current_request from openedx.core.lib.request_utils import safe_get_host from common.lib.mandrill_client.client import MandrillClient def send_admin_activation_email(first_name, org_id, org_name, claimed_by_name, claimed_by_email, dest_addr, hash_ke...
philanthropy-u/edx-platform
lms/djangoapps/onboarding/email_utils.py
Python
agpl-3.0
3,876
0.003354
#Short module amiright def main(message): return [["purgeText", int(message.content.split(' ', 1)[1])]]
ubidiscordbot/ubi
src/lib/modules/clear.py
Python
mit
108
0.009259
r""" A simple, fast, extensible JSON encoder and decoder JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. simplejson exposes an API familiar to uses of the standard library marshal and pickle modules. Encoding b...
zepheira/exhibit
src/webapp/api/extensions/curate/files/admin/simplejson/__init__.py
Python
bsd-3-clause
10,786
0.002781
# Copyright 2011 James McCauley # # This file is part of POX. # # POX 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. # # POX is distri...
lewischeng-ms/pox
pox/core.py
Python
gpl-3.0
11,128
0.012491
# -*- coding: utf-8 -*- # # # $Date: 2005/11/04 14:06:36 $, by $Author: ivan $, $Revision: 1.1 $ # """ Graph pattern class used by the SPARQL implementation """ import sys, os, time, datetime from rdflib.term import Literal, BNode, URIRef, Variable from types import * from rdflib.namespace import NamespaceManager from...
alcides/rdflib
rdflib/sparql/graphPattern.py
Python
bsd-3-clause
15,809
0.013349
# -*- coding: utf-8 -*- """ This file is part of SimpleFSM. SimpleFSM 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 3 of the License, or (at your option) any later version. SimpleFSM is ...
lliendo/SimpleFSM
simplefsm/__init__.py
Python
lgpl-3.0
8,624
0.000464
# Copyright 2013 - Red Hat, 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 writ...
stackforge/solum
solum/tests/api/controllers/v1/test_trigger.py
Python
apache-2.0
14,612
0
""" Tests of CourseKeys and CourseLocators """ import ddt from bson.objectid import ObjectId from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from opaque_keys.edx.locator import BlockUsageLocator, CourseLocator from opaque_keys.edx.tests import LocatorBaseTest, TestDeprecated @dd...
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/opaque_keys/edx/tests/test_course_locators.py
Python
agpl-3.0
10,010
0.001598
# -*- coding: utf-8 -*- # Copyright 2007-2022 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
hyperspy/hyperspy
hyperspy/misc/utils.py
Python
gpl-3.0
51,574
0.000856
from __future__ import print_function import argparse import logging import imp import os import sys from . import logger from . import plugin from . import nmea # noqa from .api import BoatdHTTPServer, BoatdRequestHandler from .behaviour import Behaviour from .behaviour import BehaviourManager from .boat import Boa...
Danyc0/boatd
boatd/__init__.py
Python
lgpl-3.0
3,800
0
""" generator.py: Contains the Generator class. """ import random import copy import graphics from helpers import * # Just to check we have generated the correct number of polyominoes # {order: number of omiones} counts = {1: 1, 2: 1, 3: 2, 4: 7, 5: 18, 6: 60} class Generator: """ A class for generatin...
nickjhughes/polyominohs
generator.py
Python
mit
7,968
0.005146
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import html import bleach import misaka from configparser import NoOptionError class Sanitizer(object): def __init__(self, elements, attributes): # attributes found in Sundown's HTML serializer [1] # except for <img> tag, ...
jelmer/isso
isso/utils/html.py
Python
mit
3,145
0.000954
import urllib import urllib2 import xml.dom.minidom import re import socket from util import hook chatbot_re = (r'(^.*\b(taiga|taigabot)\b.*$)', re.I) @hook.regex(*chatbot_re) @hook.command def chatbot(inp, reply=None, nick=None, conn=None): inp = inp.group(1).lower().replace('taigabot', '').replace('taiga', '').r...
FrozenPigs/Taigabot
plugins/_broken/chatbot.py
Python
gpl-3.0
874
0.006865
# Copyright (C) 2007, Red Hat, Inc. # # 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 later version. # # This library is distrib...
quozl/sugar-toolkit-gtk3
examples/ticket2855.py
Python
lgpl-2.1
1,719
0
"""This file defines the neural network class, where a network is reinitialized from configuration files. The class also has a forward propagation method. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import numpy as np import tensorflow ...
cleverhans-lab/cleverhans
cleverhans_v3.1.0/cleverhans/experimental/certification/nn.py
Python
mit
11,199
0.001429
# # Copyright (c) 2008--2012 Red Hat, Inc. # # 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 # FOR A PARTICULAR PURPOSE. You should have received a c...
dmacvicar/spacewalk
backend/server/rhnServer/server_kickstart.py
Python
gpl-2.0
28,246
0.002868
""" Custom importers for addresses """ # Django from django.conf import settings # Standard Library import csv import re # Third Party from localflavor.us.us_states import STATE_CHOICES from smart_open.smart_open_lib import smart_open # MuckRock from muckrock.communication.models import Address # columns AGENCY_PK...
MuckRock/muckrock
muckrock/communication/importers.py
Python
agpl-3.0
2,224
0
__title__ = 'fobi.contrib.plugins.form_elements.fields.ip_address' __author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>' __copyright__ = '2014-2017 Artur Barseghyan' __license__ = 'GPL 2.0/LGPL 2.1' __all__ = ('default_app_config', 'UID',) default_app_config = 'fobi.contrib.plugins.form_elements.fields.' \ ...
mansonul/events
events/contrib/plugins/form_elements/fields/ip_address/__init__.py
Python
mit
382
0
from sklearn2sql_heroku.tests.regression import generic as reg_gen reg_gen.test_model("GradientBoostingRegressor" , "RandomReg_500" , "sqlite")
antoinecarme/sklearn2sql_heroku
tests/regression/RandomReg_500/ws_RandomReg_500_GradientBoostingRegressor_sqlite_code_gen.py
Python
bsd-3-clause
146
0.013699
def copy_files(src, target_node, parent=None, name=None): """Copy the files from src to the target node :param Folder src: The source to copy children from :param Node target_node: The node to copy files to :param Folder parent: The parent of to attach the clone of src to, if applicable """ ass...
pattisdr/osf.io
website/files/utils.py
Python
apache-2.0
1,720
0.002907
#!/bin/env python # Automatically translated python version of # OpenSceneGraph example program "osgwidgetprogress" # !!! This program will need manual tuning before it will work. !!! import sys from osgpypp import osgDB from osgpypp import osgWidget # Translated from file 'osgwidgetprogress.cpp' # -*-c++-*- osg...
JaneliaSciComp/osgpyplusplus
examples/rough_translated1/osgwidgetprogress.py
Python
bsd-3-clause
2,695
0.014842
# common.py: global variables # arch-tag: global variables # author: Alberto Griggio <agriggio@users.sourceforge.net> # license: GPL import wx import os, sys, locale, Image import threading __version__ = '0.6.1' if os.path.expanduser('~') != '~': bookmarks_file = os.path.expanduser('~/.cornice/bookmarks') co...
labordus/cornice
common.py
Python
gpl-2.0
8,653
0.008321
#!/usr/bin/env python ############################################################################### # $Id: hfa_read.py 32166 2015-12-13 19:29:52Z goatbar $ # # Project: GDAL/OGR Test Suite # Purpose: Test basic read support for all datatypes from a HFA file. # Author: Frank Warmerdam <warmerdam@pobox.com> # #####...
nextgis-extra/tests
lib_gdal/gcore/hfa_read.py
Python
gpl-2.0
2,508
0.005183
#!/usr/bin/python2 ''' This script parses JPEG images of text documents to isolate and save images of individual characters. The size of these output images in pixels is specified by the parameters desired_height and desired_width. The JPEG images are converted to grey scale using a parameter called luminance_thre...
numenta/nupic.vision
src/nupic/vision/data/OCR/characters/parseJPG.py
Python
agpl-3.0
7,772
0.019429
'''This example demonstrates the use of Convolution1D for text classification. Gets to 0.89 test accuracy after 2 epochs. 90s/epoch on Intel i5 2.4Ghz CPU. 10s/epoch on Tesla K40 GPU. ''' from __future__ import print_function from tensorflow.contrib.keras.python.keras.preprocessing import sequence from tensorflow.c...
trhongbinwang/data_science_journey
deep_learning/keras/examples/imdb_cnn.py
Python
apache-2.0
2,519
0.004367
def highfive(ctx, serv, nick, dest, msg): if msg=="\o": serv.say(dest, "o/") elif msg=="o/": serv.say(dest, "\o") elif msg=="o'": serv.say(dest, "'o") elif msg=="'o": serv.say(dest, "o'") serv.on_msg.connect(highfive)
flipcoder/litebot
plugins/highfive.py
Python
mit
268
0.029851
#!/usr/bin/env python # # Copyright 2007 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 o...
Suwmlee/XX-Net
gae_proxy/server/lib/google/appengine/datastore/document_pb.py
Python
bsd-2-clause
55,713
0.021144
import cStringIO import zlib import wx #---------------------------------------------------------------------- def getMailData(): return zlib.decompress( "x\xda\x01M\x01\xb2\xfe\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00 \x00\ \x00\x00 \x08\x06\x00\x00\x00szz\xf4\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\...
doudz/checkfeedmail
icon.py
Python
bsd-2-clause
9,632
0.012978
from django.conf import settings from django.core.files.storage import FileSystemStorage from django.utils.functional import LazyObject class PrivateMediaFileSystemStorage(FileSystemStorage): """ Storage that puts files in the private media folder that isn't globally available. """ def __init__(s...
Clarity-89/clarityv2
src/clarityv2/utils/storages.py
Python
mit
685
0
"""All constants related to the ZHA component.""" import enum import logging from homeassistant.components.binary_sensor import DOMAIN as BINARY_SENSOR from homeassistant.components.device_tracker import DOMAIN as DEVICE_TRACKER from homeassistant.components.fan import DOMAIN as FAN from homeassistant.components.light...
fbradyirl/home-assistant
homeassistant/components/zha/core/const.py
Python
apache-2.0
5,498
0.000182
"""Support for RainMachine devices.""" import logging from datetime import timedelta import voluptuous as vol from homeassistant.config_entries import SOURCE_IMPORT from homeassistant.const import ( ATTR_ATTRIBUTION, CONF_BINARY_SENSORS, CONF_IP_ADDRESS, CONF_PASSWORD, CONF_PORT, CONF_SCAN_INTERVAL, CONF_SENS...
HydrelioxGitHub/home-assistant
homeassistant/components/rainmachine/__init__.py
Python
apache-2.0
10,913
0
import logging import six import warnings from ..auth import auth from ..constants import INSECURE_REGISTRY_DEPRECATION_WARNING from .. import utils from .. import errors log = logging.getLogger(__name__) class ImageApiMixin(object): @utils.check_resource def get_image(self, image): res = self._get...
AccelAI/accel.ai
flask-aws/lib/python2.7/site-packages/docker/api/image.py
Python
mit
9,342
0
# 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 use...
lukecwik/incubator-beam
website/append_index_html_to_internal_links.py
Python
apache-2.0
4,461
0.008518
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-05-07 16:56 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import model_utils.fields class Migration(migrations.Migration): ...
cliffton/localsecrets
offers/migrations/0001_initial.py
Python
mit
3,179
0.004404
from impedance_map.sphere import correlation_coefficient, form_factor, \ pair_distribution_function_PY, structure_factor_function_PY, \ cross_section_dimension, fit_correlation_coefficient_nls, \ fit_form_factor_nls import numpy as np import math import unittest class TestCode(unittest.TestCase): def ...
aluchies/impedance_map
impedance_map/tests/test_sphere.py
Python
bsd-3-clause
6,422
0.001246
from setuptools import setup, find_packages with open('README.md', encoding = "utf-8") as f: readme = f.read() setup( name='datatoaster', version='0.1.0', description='A Python library that can convert raw data to chart data', long_description=readme, author='Harry Yu', author_email='harry...
abc612008/datatoaster
setup.py
Python
mit
474
0.004219
#!/usr/bin/env python import click from aeriscloud.cli.helpers import standard_options, Command @click.command(cls=Command) @standard_options(start_prompt=False) def cli(box): """ Destroy a box """ box.destroy() if __name__ == '__main__': cli()
AerisCloud/AerisCloud
aeriscloud/cli/aeris/destroy.py
Python
mit
271
0
# -*- coding: utf-8 -*- # # 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 #...
Fokko/incubator-airflow
airflow/gcp/example_dags/example_spanner.py
Python
apache-2.0
8,612
0.002206
#!/usr/bin/python from __future__ import print_function, unicode_literals __license__ = """ This file is part of GNU FreeFont. GNU FreeFont 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 ...
vernnobile/Gnu_Free_Font
tools/test/ranges/Arabic/unicode_joining.py
Python
gpl-3.0
8,257
0.016108
# This is an auto-generated Django model module. # You'll have to do the following manually to clean this up: # * Rearrange models' order # * Make sure each model has one field with primary_key=True # * Remove `managed = False` lines for those models you wish to give write DB access # Feel free to rename the mode...
per7inac1ousQ/Directories
DirectoriesBackupFiles/models.py
Python
apache-2.0
7,043
0.015618
from chimera.util.votable import VOTable from httplib import HTTPConnection import tempfile import os import urllib class VizQuery(object): """ Queries A catalog in Vizier within a given radius or box of the zenith """ def __init__(self): self.args = {} self.args["-mime"] = "xml...
ankanaan/chimera
src/chimera/util/vizquery.py
Python
gpl-2.0
3,452
0.000579
#!/usr/bin/env python3 # Copyright (C) 2017-2021 The btclib developers # # This file is part of btclib. It is subject to the license terms in the # LICENSE file found in the top-level directory of this distribution. # # No part of btclib including this file, may be copied, modified, propagated, # or distributed except...
fametrano/BitcoinBlockchainTechnology
tests/test_hashes.py
Python
mit
1,276
0.000784
# Copyright (c) 2011 Intel Corporation # Copyright (c) 2011 OpenStack, 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/l...
tucbill/manila
manila/scheduler/filter_scheduler.py
Python
apache-2.0
8,816
0.000113
import sys class sharedGpsData(object): def __init__(self): self.pos = (0.0,0.0,None,) # float latitude(from equateur),float longitude(from greenwitch),datetime (Universal Time Coordinated) self.alt = (0.0, "M", None,) # float altitude, string scale unit, datetime (Universal Time Coordinated...
djo938/GPSPythonSharingWithPyro
pysharegps/gpsSharedData.py
Python
gpl-3.0
1,548
0.016796
__author__ = 'gpratt' __author__ = 'gpratt' import argparse import subprocess import os def wrap_wait_error(wait_result): if wait_result != 0: raise NameError("Failed to execute command correctly {}".format(wait_result)) def pre_process_bam(bam, bam01, bam02, bam03, bam04, bam05, bam06, bam07, bam08, ba...
YeoLab/gscripts
gscripts/general/downsample_bam.py
Python
mit
4,356
0.008494
import unittest from bolt.discord.permissions import Permission class TestPermission(unittest.TestCase): def test_permission_from_list_to_list(self): expected = ['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS'] permission = Permission(['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS']) actual = permiss...
Arcbot-Org/Arcbot
tests/discord/test_permission.py
Python
gpl-3.0
1,719
0
# Copyright 2013 Red Hat, Inc. # 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...
tanglei528/glance
glance/tests/unit/v2/test_registry_client.py
Python
apache-2.0
24,618
0.000081
#!/usr/bin/env python from __future__ import print_function from time import sleep from subprocess import call import os from drive import get_active_torrents_count, get_vpn_ip, WAIT_CYCLE MAX_FAIL=2 def transmission_down(): try: _ = get_active_torrents_count() return False except Exception as...
thomasanderson9000/ipredator_btt
transmission/healthcheck.py
Python
apache-2.0
1,116
0.005376
"""Family module for Meta Wiki.""" # # (C) Pywikibot team, 2005-2020 # # Distributed under the terms of the MIT license. # from pywikibot import family # The Wikimedia Meta-Wiki family class Family(family.WikimediaOrgFamily): """Family class for Meta Wiki.""" name = 'meta' interwiki_forward = 'wikipedi...
wikimedia/pywikibot-core
pywikibot/families/meta_family.py
Python
mit
564
0
""" A library of useful helper classes to the saxlib classes, for the convenience of application and driver writers. $Id: saxutils.py,v 1.35 2004/03/20 07:46:04 fdrake Exp $ """ import os, urlparse, urllib2, types import handler import xmlreader import sys, _exceptions, saxlib try: _StringTypes = [types.StringTy...
selfcommit/gaedav
pyxml/sax/saxutils.py
Python
lgpl-2.1
24,606
0.005486
# Copyright 2021 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 or a...
tensorflow/tfx
tfx/dsl/compiler/testdata/foreach_pipeline.py
Python
apache-2.0
2,580
0.003488
""" Tree and graph transformations. """ from typing import Optional, Dict, Set, List, Tuple import logging from penman.types import (Variable, Target, BasicTriple, Node) from penman.exceptions import ModelError from penman.epigraph import (Epidatum, Epidata) from penman.surface import (Alignment, RoleAlignment, alig...
goodmami/penman
penman/transform.py
Python
mit
13,014
0
"""Support for OVO Energy.""" from __future__ import annotations from datetime import datetime, timedelta import logging import aiohttp import async_timeout from ovoenergy import OVODailyUsage from ovoenergy.ovoenergy import OVOEnergy from homeassistant.config_entries import ConfigEntry from homeassistant.const impo...
jawilson/home-assistant
homeassistant/components/ovo_energy/__init__.py
Python
apache-2.0
3,757
0.000799
"""Hidden Markov Models implemented in linear memory/running time""" from distutils.core import setup from distutils.extension import Extension import numpy try: from Cython.Distutils import build_ext except ImportError: use_cython = False else: use_cython = True cmdclass = { } ext_modules = [ ] if use...
edenhuangSH/STA663_Final_Project
setup.py
Python
gpl-3.0
1,203
0.010806