repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
apache/qpid-dispatch
python/qpid_dispatch_internal/router/path.py
2
7682
# # 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...
apache-2.0
692,112,777,913,241,200
33.760181
98
0.530461
false
KirillTim/crashsimilarity
crashsimilarity/utils.py
1
2622
import errno import json import os from datetime import datetime from smart_open import smart_open from crashsimilarity.downloader import SocorroDownloader def utc_today(): return datetime.utcnow().date() def read_files(file_names, open_file_function=smart_open): for name in file_names: with open_...
mpl-2.0
5,456,225,717,346,863,000
29.488372
95
0.617849
false
TravelModellingGroup/TMGToolbox
TMGToolbox/src/common/pandas_utils.py
1
17046
from inro.emme.matrix import MatrixData import inro.modeller as m import warnings as warn mm = m.Modeller() class Face(m.Tool()): def page(self): desc = 'Collection of tools working with <a href="http://pandas.pydata.org/">pandas</a>' pb = m.ToolPageBuilder(self, runnable=False, title='Utilities'...
gpl-3.0
4,921,002,489,457,924,000
42.15443
120
0.622844
false
cmc333333/regulations-parser
regparser/history/delays.py
1
2700
from collections import namedtuple from datetime import date from itertools import dropwhile, takewhile from regparser.grammar.delays import tokenizer as delay_tokenizer from regparser.grammar.delays import Delayed, EffectiveDate, Notice class FRDelay(namedtuple('FRDelay', ['volume', 'page', 'delayed_until'])): ...
cc0-1.0
9,026,328,234,331,880,000
38.705882
77
0.637778
false
us-ignite/us_ignite
us_ignite/profiles/views.py
1
6238
import uuid from django.contrib import messages from django.contrib.auth import logout from django.contrib.auth.decorators import login_required from django.contrib.sites.models import Site, RequestSite from django.shortcuts import redirect from django.template.response import TemplateResponse from django.views.gener...
bsd-3-clause
-5,172,439,593,668,941,000
38.232704
82
0.690927
false
SilverBlogTeam/SilverBlog
manage/setting.py
1
11792
#!/usr/bin/python3 # -*- coding: utf-8 -*- import json import os import time from common import file from manage import whiptail dialog = whiptail.Whiptail() dialog.height = 15 dialog.backtitle = "SilverBlog management tool" system_config = { "Project_Name": "", "Project_Description": "", "Project_URL": ...
bsd-3-clause
9,197,015,479,671,179,000
39.802768
123
0.584888
false
hulu/monaco
src/lifeRaft/servers/server.py
1
7199
#!/usr/bin/python from ..states.leader import Leader from ..messages.client import ClientMessage import zmq import threading import pickle import Queue import time import math class Server(threading.Thread): def __init__(self, name, state, log, messageBoard, neighbors): super(Server, self).__init__() ...
mit
-248,483,130,087,962,400
32.640187
99
0.547437
false
kubernetes-client/python
kubernetes/client/models/v1_custom_resource_definition_spec.py
1
11582
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.18 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
apache-2.0
-3,090,504,740,535,551,500
43.206107
782
0.663357
false
googleapis/python-monitoring
google/cloud/monitoring_v3/_dataframe.py
1
5568
# Copyright 2016 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 agreed to in writing, s...
apache-2.0
-7,858,185,117,793,109,000
35.392157
88
0.675287
false
fkmclane/web.py
tests/test_file.py
1
26048
import stat import os from fooster.web import web, file import mock import pytest test_string = b'secret test message' test_multibyte = b'i \xe2\x99\xa5 python\r\n' test_chunked = '{:x}'.format(len(test_multibyte)).encode(web.http_encoding) + b'\r\n' + test_multibyte + b'\r\n0\r\n\r\n' class FileHandler(file.Fi...
mit
3,868,987,284,946,204,700
28.169093
193
0.645002
false
CanalTP/Chaos
chaos/utils.py
1
33018
# Copyright (c) since 2001, Kisio Digital and/or its affiliates. All rights reserved. from os import path from functools import wraps from datetime import datetime, timedelta import uuid import json import logging from math import ceil from flask import url_for, g import flask from aniso8601 import parse_datetime, par...
agpl-3.0
-4,752,298,675,579,261,000
35.525442
177
0.581168
false
stackforge/cloudkitty
cloudkitty/tests/collectors/test_monasca.py
1
3368
# Copyright 2019 Objectif Libre # # 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 agr...
apache-2.0
-2,102,711,058,932,840,200
33.721649
78
0.492874
false
cloudenvy/cloudenvy
cloudenvy/main.py
1
3239
# vim: tabstop=4 shiftwidth=4 softtabstop=4 import argparse import logging import pkgutil import string from cloudenvy.config import EnvyConfig,Config import cloudenvy.commands #TODO(bcwaldon): replace this with entry points! def _load_commands(): """Iterate through modules in command and import suspected comm...
apache-2.0
-889,521,420,822,080,800
33.094737
78
0.669651
false
RENCI/xDCIShare
hs_composite_resource/page_processors.py
1
1620
from django.contrib import messages from django.contrib.messages import get_messages from mezzanine.pages.page_processors import processor_for from hs_core import page_processors from hs_core.views import add_generic_context from .models import CompositeResource @processor_for(CompositeResource) def landing_page(r...
bsd-3-clause
5,709,343,035,990,207,000
35.818182
95
0.646296
false
meolu/walle-web
walle/service/deployer.py
1
23509
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: wushuiyong # @Created Time : 日 1/ 1 23:43:12 2017 # @Description: import time from datetime import datetime import os import pwd import re from flask import current_app from flask_socketio import emit from walle.model.project import ProjectModel from walle.mo...
apache-2.0
7,091,117,836,670,933,000
39.943636
167
0.553666
false
YACOWS/opps-infographics
opps/infographics/models.py
1
7538
# -*- coding: utf-8 -*- from django.db import models from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from django.core.exceptions import ValidationError from taggit.managers import TaggableManager from opps.core.models import Publishable, BaseBox, BaseConfig class Infograph...
mit
-257,310,587,865,058,880
27.126866
92
0.603608
false
kc4271/batch_downloader
eventlet/greenthread.py
1
11303
from collections import deque import sys from eventlet import event from eventlet import hubs from eventlet import timeout from eventlet.hubs import timer from eventlet.support import greenlets as greenlet, six import warnings __all__ = ['getcurrent', 'sleep', 'spawn', 'spawn_n', 'spawn_after', 'spawn_after_local', '...
mit
8,197,925,153,677,488,000
38.659649
127
0.660798
false
jorisrenkens/problog
src/ground.py
1
10775
import os,subprocess from utils import Timer, Logger from logic import Literal, LogicProgram from weights import Weights class Grounder(object): def __call__(self, infiles, env): self.__env = env logfile = open(env.tmp_path('grounding.log'),'w') logger = Logger(file = logfile,verbose = 1) ...
lgpl-3.0
-2,574,029,709,052,745,700
37.620072
175
0.500789
false
hsoft/musicguru
hsfs/tests/stats_test.py
1
4635
# Created By: Virgil Dupras # Created On: 2006/02/21 # Copyright 2010 Hardcoded Software (http://www.hardcoded.net) # This software is licensed under the "BSD" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.hardcoded.net/licenses...
bsd-3-clause
-4,105,325,082,639,870,500
25.039326
90
0.604531
false
marianfx/ai-labs
Lab1_ChatBot/ChatBot.py
1
1625
import aiml import marshal import os # Create the kernel and learn AIML files kernel = aiml.Kernel() # If brain exists, load it, else, create it if os.path.isfile("bot_brain.brn"): kernel.bootstrap(brainFile="bot_brain.brn") else: kernel.bootstrap(learnFiles="std-startup.xml", commands="load aiml...
mit
-5,673,398,984,451,245,000
29.25
74
0.610462
false
chop-dbhi/serrano
serrano/resources/query/forks.py
1
3990
import functools from preserialize.serialize import serialize from restlib2.http import codes from avocado.models import DataQuery from serrano.links import reverse_tmpl from serrano.resources import templates from serrano.resources.query.base import query_posthook, QueryBase class QueryForksResource(QueryBase): ...
bsd-2-clause
-7,005,703,021,301,298,000
32.813559
78
0.600251
false
davidszotten/pytest-cagoule
tests/test_select.py
1
1882
import pytest from pytest_cagoule.select import get_line_number_filter, get_spec_filter, get_query @pytest.mark.parametrize( ("start", "end", "expected_query", "expected_params"), ( (None, None, "", ()), (None, "foo", "", ()), # if start is None, end is ignored (3, None, "AND numbits_...
mit
-1,276,125,010,442,314,000
33.851852
84
0.589798
false
mitschabaude/nanopores
scripts/howorka/selectivity.py
1
4668
"""run diffusion equation to determine selectivity of fluophore, i.e current and release time series for specific molecule.""" from nanopores.tools.fields import cache import nanopores import dolfin import matplotlib.pyplot as plt from nanopores.physics.convdiff import ConvectionDiffusion import forcefields from eikona...
mit
-279,110,832,715,525,500
27.638037
79
0.610111
false
lochiiconnectivity/exabgp
lib/exabgp/bgp/message/update/nlri/evpn/ethernetad.py
1
1172
""" ethernetad.py Created by Thomas Mangin on 2014-06-27. Copyright (c) 2014-2015 Exa Networks. All rights reserved. """ # from struct import pack # from struct import unpack # from exabgp.protocol.family import AFI # from exabgp.protocol.family import SAFI # from exabgp.bgp.message.update.nlri.qualifier.esi import ...
bsd-3-clause
1,402,455,218,036,721,400
29.842105
80
0.523038
false
psychotechnik/mycv
mycv/settings.py
1
9867
""" Django settings for MyCV project. For more information on this file, see https://docs.djangoproject.com/en/1.6.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6.1/ref/settings/ """ import os from configurations import Configuration, values class Common...
gpl-2.0
-3,061,845,040,925,898,000
30.829032
107
0.602209
false
michaelerule/neurotools
spatial/spatialPSD.py
1
7023
#!/usr/bin/python # -*- coding: UTF-8 -*- from __future__ import absolute_import from __future__ import with_statement from __future__ import division from __future__ import unicode_literals from __future__ import print_function ''' 2D spatial power spectral density ''' def psd2d(data,spacing = 0.4): ''' 2D po...
gpl-3.0
-7,235,978,638,687,569,000
32.764423
130
0.622099
false
pioneers/PieCentral
runtime/runtime/ansible.py
1
24347
"""Functions and classes for communication with Dawn.""" import asyncio import os import socket import threading import time import sys import selectors import csv import aio_msgpack_rpc as rpc from . import runtime_pb2 from . import ansible_pb2 from . import notification_pb2 from .util import * UDP_SEND_PORT = 1235 ...
apache-2.0
-6,815,167,071,453,000,000
39.646077
115
0.567421
false
DmZ/ajenti
plugins/iptables/backend.py
1
16129
import os import getopt from ajenti.ui import UI from ajenti.utils import shell from ajenti.com import * class Rule: states = ['NEW', 'ESTABLISHED', 'RELATED', 'INVALID'] flags = ['SYN', 'ACK', 'FIN', 'RST', 'URG', 'PSH', 'ALL', 'NONE'] def __init__(self, line='-A INPUT -j ACCEPT'): self.reset()...
lgpl-3.0
-6,389,140,715,707,849,000
34.063043
125
0.436109
false
gov-cjwaszczuk/notifications-admin
tests/conftest.py
1
82624
from contextlib import contextmanager import os from datetime import date, datetime, timedelta from unittest.mock import Mock import pytest from notifications_python_client.errors import HTTPError from flask import url_for, Flask from bs4 import BeautifulSoup from app import create_app from app.notify_client.models i...
mit
6,330,078,410,565,564,000
30.726575
120
0.567178
false
mstriemer/zamboni
mkt/lookup/urls.py
1
2029
from django.conf.urls import include, patterns, url from . import views # These views all start with user ID. user_patterns = patterns( '', url(r'^summary$', views.user_summary, name='lookup.user_summary'), url(r'^purchases$', views.user_purchases, name='lookup.user_purchases'), url(r...
bsd-3-clause
1,576,543,723,167,657,200
29.283582
69
0.625431
false
jkyeung/XlsxWriter
xlsxwriter/test/comparison/test_repeat03.py
1
1361
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
bsd-2-clause
5,456,990,139,550,381,000
28.586957
91
0.584129
false
nvbn/python-social-auth
social/utils.py
1
4116
import re import sys import unicodedata import six import collections from social.p3 import urlparse, urlunparse, urlencode, \ parse_qs as battery_parse_qs SETTING_PREFIX = 'SOCIAL_AUTH' def import_module(name): __import__(name) return sys.modules[name] def module_member(name): ...
bsd-3-clause
2,391,804,344,682,172,400
27.985915
79
0.631681
false
cernanalysispreservation/analysis-preservation.cern.ch
cap/modules/experiments/utils/questionnaire.py
2
34335
# * coding: utf8 * # # This file is part of CERN Analysis Preservation Framework. # Copyright (C) 2016 CERN. # # CERN Analysis Preservation Framework 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 vers...
gpl-2.0
2,483,245,518,767,530,000
42.512041
79
0.541318
false
meissnert/StarCluster-Plugins
oncofuse_1_0_9.py
1
1117
from starcluster.clustersetup import ClusterSetup from starcluster.logger import log class OncoFuseInstaller(ClusterSetup): def run(self, nodes, master, user, user_shell, volumes): for node in nodes: log.info("Installing Oncofuse 1.0.9b2 on %s" % (node.alias)) node.ssh.execute('mkdir -p /opt/software/oncofuse...
mit
8,172,385,304,269,270,000
68.8125
140
0.741271
false
robios/PySpW
pyspw/SpaceWire.py
1
5634
# # SpaceWire.py # SpaceWire Module # # 2011/05/30 K. Sakai (sakai@astro.isas.jaxa.jp) import socket import struct import sys # SSDTP2 Control Flags DataFlag_Complete_EOP = '\x00' DataFlag_Complete_EEP = '\x01' DataFlag_Fragmented = '\x02' ControlFlag_SendTimeCode = '\x30' ControlFlag_GotTimeCode = '\x31' ControlFlag...
mit
6,624,399,634,295,638,000
27.316583
119
0.675896
false
999gary/telrus
redam.py
1
1052
#implimentation of a shitty ui system I made 2 years ago in lua #should be fine import pygame true = True; class Redam: def __init__(self, telrus): #create local instance of telrus self.telrus = telrus; #self.uielements = {}; self.pygame = telrus.pygame; def createObject( self, ...
gpl-3.0
7,066,769,914,984,890,000
21.382979
81
0.530418
false
Ebag333/Pyfa
gui/graph.py
1
1158
# ============================================================================= # Copyright (C) 2010 Diego Duclos # # 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 ...
gpl-3.0
-1,999,610,314,604,215,800
29.473684
79
0.602763
false
interlegis/sigi
sigi/apps/ocorrencias/forms.py
1
3455
# -*- coding: utf-8 -*- # # sigi.apps.ocorrencias.forms # # Copyright (c) 2015 by Interlegis # # GNU General Public License (GPL) # # 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...
gpl-2.0
2,296,746,150,217,004,000
40.638554
110
0.614472
false
gregmuellegger/django-sortedm2m
test_project/settings.py
1
3317
# Django settings for testsite project. import os PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__)) DEBUG = True DB_ENGINE = os.environ.get("DB_ENGINE", "postgresql") DATABASES = { "default": { "ENGINE": f"django.db.backends.{DB_ENGINE}", "NAME": os.environ.get("DB_NAME", "postgres"), ...
bsd-3-clause
3,622,859,987,327,569,400
31.841584
74
0.672897
false
magfest/ubersystem
alembic/versions/b574c0577253_add_separate_mits_showcase_scheduling_.py
1
1930
"""Add separate MITS showcase scheduling column. Revision ID: b574c0577253 Revises: 6c5cf22429e2 Create Date: 2018-09-26 19:29:40.149653 """ # revision identifiers, used by Alembic. revision = 'b574c0577253' down_revision = '6c5cf22429e2' branch_labels = None depends_on = None from alembic import op import sqlalch...
agpl-3.0
-2,870,814,270,213,000,700
30.639344
116
0.633161
false
QuLogic/burnman
burnman/minerals/SLB_2011_ZSB_2013.py
1
5451
# BurnMan - a lower mantle toolkit # Copyright (C) 2012, 2013, Heister, T., Unterborn, C., Rose, I. and Cottaar, S. # Released under GPL v2 or later. """ SLB_2011_ZSB_2013 ^^^^^^^^^^^^^^^^^ Minerals from Stixrude & Lithgow-Bertelloni 2011, Zhang, Stixrude & Brodholt 2013, and references therein. """ import burnman....
gpl-2.0
7,476,243,532,179,493,000
27.243523
106
0.467437
false
josephkirk/PipelineTools
packages/rjTools/tweakVertexWeights/ui.py
1
18149
import sys from maya import OpenMaya, OpenMayaUI, cmds from rjSkinningTools import ui, utils from . import getSkinnedVertices # ---------------------------------------------------------------------------- WINDOW_TITLE = "Tweak Vertex Weights" WINDOW_ICON = "tweakVertexWeights.png" ORANGE_STYLESHEET = "QLabel{color:...
bsd-2-clause
1,000,790,706,428,210,000
31.466905
78
0.539093
false
PersonifyInc/omaha-server
auth.py
1
1210
# Copyright (C) 2011 Crystalnix <vgachkaylo@crystalnix.com> # This file is part of omaha-server. # omaha-server 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 #...
gpl-3.0
6,788,197,423,033,955,000
38.064516
73
0.728099
false
Montagon/A-music-score-creator
music_score_creator/music-score-creator.py
1
10875
#!/usr/bin/env python # <Music score creator. Generate a sheet music from an audio.> # Copyright (C) <2014> <Jose Carlos Montanez Aragon> # 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 Softwa...
gpl-3.0
3,215,599,619,052,676,600
39.431227
222
0.625655
false
ares/robottelo
robottelo/vm.py
1
20876
"""Utilities to create clients Clients are virtual machines provisioned on a ``provisioning_server``. All virtual machine images are stored on the ``image_dir`` path on the provisioning server. Make sure to configure the ``clients`` section on the configuration file. Also make sure that the server have in place: the ...
gpl-3.0
4,551,191,944,142,676,500
36.212121
79
0.591253
false
okfn/foundation
foundation/organisation/models.py
1
13587
from hashlib import md5 from cms.models.pluginmodel import CMSPlugin from cms.extensions import PageExtension from django.core.urlresolvers import reverse from django.db import models from django.utils.text import slugify from django_countries.fields import CountryField from geoposition.fields import GeopositionField ...
mit
6,686,354,038,866,053,000
31.427208
79
0.637521
false
alecalve/troc-ecocup
modules/cas.py
1
1824
from flask import url_for, redirect, request, session, flash, Blueprint import conf import requests from xml.dom.minidom import parseString from models import User import datetime from database import db bp = Blueprint('cas', __name__, url_prefix='/cas/') @bp.route('login') def login(): """ Loggue un utilisateur...
agpl-3.0
-2,783,869,839,552,982,500
29.383333
115
0.623697
false
Vishruit/DDP_models
data_extraction_code/prepareData_HDF5.py
1
6847
# This file automatically finds all the .ptw files in a given directory and # converts them to a numpy array for reseach purposes. It bypasses the need of # a proprietary software like ALTAIR to extract and read the data. ''' Before running this file perform 'pip install pyradi' Please run the test file before running...
gpl-3.0
-2,530,152,975,544,454,000
35.227513
143
0.656054
false
arkal/bioinfo_tool_wrappers
run_mutect.py
1
6776
#!/usr/bin/env python2.7 """ Author : Arjun Arkal Rao Affiliation : UCSC BME, UCSC Genomics Institute File : docker_scripts/run_mutect.py Program info can be found in the docstring of the main function. Details can also be obtained by running the script with -h . """ from __future__ import division, print_function fro...
gpl-2.0
-6,230,030,069,098,139,000
45.095238
79
0.535272
false
anchor/make-magic
lib/httpd.py
1
5187
#! /usr/bin/env python '''mudpuppy httpd API interface This provides a very, very lightweight WSGI based http server to expose a JSON based API. This is by no means the only way to interact with make magic from the outside world, but it is a convenient way to make a solid point of demarcation, and give something li...
bsd-3-clause
6,510,010,675,658,324,000
31.217391
123
0.703297
false
alex-petrenko/hierarchical-rl
microtbs_rl/utils/record_policy_execution.py
1
3066
""" Render the policy execution to gif or video. Gifs are generated with pure python code. To render a video, it just saves a bunch of images to a directory. Then it's very easy to render a video with ffmpeg. Like: ffmpeg -framerate 8 -pattern_type glob -i '*.png' out.mp4 """ import gym import imageio import matplotl...
mit
-8,374,211,624,731,095,000
32.326087
117
0.639922
false
callowayproject/django-objectpermissions
objectpermissions/models.py
1
7978
from django.db import models from django.contrib.auth.models import User, Group from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic class UnknownPermission(Exception): """ An attempt was made to query for a permission that was not registered for that model...
apache-2.0
-6,343,879,770,877,125,000
31.831276
106
0.582602
false
openstack/ironic-inspector
ironic_inspector/conf/port_physnet.py
1
1213
# 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 # distributed under the...
apache-2.0
2,527,631,294,805,894,000
32.694444
77
0.644683
false
twitter/pants
contrib/scrooge/tests/python/pants_test/contrib/scrooge/tasks/test_thrift_linter_integration.py
1
5984
# 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 from functools import wraps from pants_test.pants_run_integration_test import PantsRunIn...
apache-2.0
-511,949,656,032,664,400
40.555556
100
0.692179
false
WladimirSidorenko/CGSA
cgsa/utils/word2vec.py
1
6145
#!/usr/bin/env python # -*- coding: utf-8; mode: python; -*- """Module providing class for generic word embeddings. Attributes: WEMB (class): class for fast retrieval and adjustment of the Google word embeddings """ ################################################################## # Imports from __future__ i...
mit
-9,068,303,919,099,158,000
23.778226
73
0.540765
false
james-antill/yum
yum/plugins.py
1
28774
#! /usr/bin/python -tt # 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 ...
gpl-2.0
2,096,114,652,750,907,400
35.984576
110
0.623862
false
ideascube/ideascube
ideascube/mediacenter/migrations/0009_auto_20160728_1317.py
1
3428
# -*- coding: utf-8 -*- # Generated by Django 1.9.8 on 2016-07-28 13:17 from __future__ import unicode_literals from django.db import migrations import ideascube.models class Migration(migrations.Migration): dependencies = [ ('mediacenter', '0008_auto_20160713_1605'), ] operations = [ m...
agpl-3.0
3,710,928,358,708,377,600
51.4
79
0.416031
false
Stanford-Online/edx-analytics-data-api
analyticsdataserver/tests.py
1
9287
import json import logging from contextlib import contextmanager import mock import responses from django.conf import settings from django.contrib.auth.models import User from django.db.utils import ConnectionHandler, DatabaseError from django.test import TestCase from django.test.utils import override_settings from ...
agpl-3.0
8,926,117,672,922,957,000
41.600917
117
0.663293
false
danylaksono/inasafe
fabfile.py
1
10413
# coding=utf-8 """A Fabric file for carrying out various administrative tasks with InaSAFE. Usage for localhost commands:: fab -H localhost [command] fab -H 188.40.123.80:8697 show_environment To run on a vagrant vhost do:: fab vagrant [command] e.g. :: fab vagrant show_environment .. note:: Vagr...
gpl-3.0
-2,111,657,059,492,183,000
34.418367
79
0.563718
false
hitakaken/ifplus
ifplus/rbac/helpers/schemas.py
1
3781
# -*- coding: utf-8 -*- REGISTER_OBJECT_CLASSES = { 'top': {}, 'organizationalUnit': { 'MUST': ['ou'], 'MAY': [ 'userPassword', 'searchGuide', 'seeAlso', 'businessCategory', 'x121Address', 'registeredAddress', 'destinationIndicator', 'preferredDeliveryMethod',...
mit
-2,194,778,008,988,798,200
36.81
85
0.538217
false
securusglobal/iclass-cloner
menu.py
1
1105
import os import time import sys import handler_ss import handler_hs import write_ss import write_hs import write_prox import prox while True: os.system("clear") print "Menu" print "Please choose an option:" print "1. Log iClass Standard Security & Prox" print "2. Log iClass High Security & Prox"...
gpl-2.0
-3,853,418,281,258,519,000
21.1
54
0.597285
false
webmaven/moreblog
moreblog/model.py
1
1405
from sqlalchemy import ( Column, Integer, Text, DateTime, ForeignKey, ) from sqlalchemy.orm import scoped_session, sessionmaker from sqlalchemy.ext.declarative import declarative_base from zope.sqlalchemy import register Base = declarative_base() Session = scoped_session(sessionmaker()) regist...
mit
-4,320,904,581,599,226,000
22.032787
65
0.613523
false
tomekwojcik/ForgeryPy
docs/conf.py
1
8993
# -*- coding: utf-8 -*- # # ForgeryPy documentation build configuration file, created by # sphinx-quickstart on Wed Jul 11 20:31:25 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
mit
-4,902,218,307,878,835,000
30.554386
80
0.703436
false
elopio/snapcraft
tests/unit/sources/test_zip.py
1
2172
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015-2018 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in ...
gpl-3.0
8,054,205,546,370,736,000
35.2
73
0.676335
false
Southpaw-TACTIC/TACTIC
src/pyasm/common/environment.py
1
22628
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
epl-1.0
5,813,462,648,647,446,000
28.773684
128
0.582685
false
ehudmagal/robotqcapp
web/columns.py
2
2424
__author__ = 'Administrator' from datable.web.columns import * from datable.core.serializers import UnicodeSerializer class ButtonColumn(Column): formatter = 'button' sortable = False class IntegerColumn(Column): formatter = 'integer' sortable = True class ButtonS3FileColumn(Column): formatter = 'b...
bsd-3-clause
-5,331,958,851,521,029,000
31.77027
63
0.651815
false
alphagov/tagalog
test/integration/test_unicode.py
1
1145
from __future__ import unicode_literals from ..helpers import assert_equal, fixture from subprocess import Popen, PIPE def test_unicode(): data_in = fixture('utf8-demo.txt').read() p = Popen('logtag -f init_txt | logtext', shell=True, stdout=PIPE, stdin=PIPE) dat...
mit
-725,700,276,538,635,100
26.926829
114
0.554585
false
MooseDojo/apt2
modules/action/exploit_msf_jboss_maindeployer.py
1
4087
import re from core.actionModule import actionModule from core.keystore import KeyStore as kb from core.mymsf import myMsf from core.utils import Utils class exploit_msf_jboss_maindeployer(actionModule): def __init__(self, config, display, lock): super(exploit_msf_jboss_maindeployer, self).__init__(confi...
mit
-6,880,072,336,497,666,000
48.240964
159
0.489846
false
tartavull/google-cloud-python
logging/google/cloud/logging/_http.py
1
17745
# Copyright 2016 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, ...
apache-2.0
-7,301,238,421,831,057,000
33.658203
90
0.618202
false
jambonsw/django-improved-user
tests/test_factories.py
1
2752
"""Test model factories provided by Improved User""" from django.test import TestCase from improved_user.factories import UserFactory from improved_user.models import User class UserFactoryTests(TestCase): """Test for UserFactory used with Factory Boy""" def test_basic_build(self): """Test creation ...
bsd-2-clause
-299,661,601,248,394,240
37.676056
72
0.628186
false
openstack/networking-plumgrid
networking_plumgrid/neutron/plugins/common/policy_validators.py
1
4120
# Copyright 2016 PLUMgrid, 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 applicable law ...
apache-2.0
3,254,178,775,962,632,000
37.867925
75
0.624029
false
DataDog/integrations-core
process/setup.py
1
1961
# (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from codecs import open # To use a consistent encoding from os import path from setuptools import setup HERE = path.dirname(path.abspath(__file__)) # Get version info ABOUT = {} with open(path.join(HER...
bsd-3-clause
-3,615,914,875,521,595,400
30.126984
77
0.659867
false
dadadel/pyment
tests/issue95.py
1
1103
def func1(param1): """Description :param param1: :returns: the return value """ pass def func2(param1): """Description :param param1: param's message :return: the return value """ pass def func3(param1): """Description :param param1: :returns: the return value...
gpl-3.0
-5,346,451,176,854,734,000
11.678161
40
0.564823
false
htmue/python-autocheck
autocheck/testrunner.py
1
15727
# -*- coding:utf-8 -*- # Created by Hans-Thomas on 2011-05-12. #============================================================================= # testrunner.py --- Running tests #============================================================================= from __future__ import absolute_import, unicode_literals impor...
unlicense
2,357,933,600,779,748,000
34.98627
79
0.572491
false
kuldipem/udacity-movie-site
movie_gallery.py
1
1802
import movie import fresh_tomatoes # I have collecte my favourite movie and its most important # details together to build an intresting webpage dangal = movie.Movie('Dangal', 'Story about first indian woman wrestler.', 'https://upload.wikimedia.org/wikipedia/en/9/99/Dan' ...
mit
-3,180,474,003,098,458,000
52
80
0.559378
false
JohanComparat/pyEmerge
bin/lc_create_shells.py
1
10484
""" Routine to create the light cones shells L1 L2 L3 u11 u12 u13 u21 u22 u23 u31 u32 u33 (periodicity) C2 '2.2361', '1.0954', '0.4082', '2', '1', '0', '1', '0', '1', '1', '0', '0', '(1)' C15 '1.4142', '1.0000', '0.7071', '1', '1', '0', '0', '0', '1', '1', '0', '0', '(12)' C6 '5.9161', '0.4140', '0.4082', '5...
unlicense
7,452,115,236,242,259,000
43.612766
136
0.640023
false
gkunter/coquery
coquery/gui/widgets/coqwidgetfader.py
1
1678
# -*- coding: utf-8 -*- """ coqstaticbox.py is part of Coquery. Copyright (c) 2018 Gero Kunter (gero.kunter@coquery.org) Coquery is released under the terms of the GNU General Public License (v3). For details, see the file LICENSE that you should have received along with Coquery. If not, see <http://www.gnu.org/licen...
gpl-3.0
958,086,470,874,148,400
32.56
75
0.561979
false
megakevin/single-authored-code-evolution-analysis
get_devs_per_tag.py
1
6900
# Usage: $ python3 get_bug_commit_ratio_per_tag.py /home/kevin/Desktop/evolution-project/repos/facebook-android-sdk ./output/ # Calculates each files overall (not per tag) changes and bug related changes. __author__ = 'kevin' from datetime import datetime, timedelta from subprocess import call, check_output import sy...
mit
4,738,780,832,827,010,000
30.944444
146
0.587391
false
virtool/virtool
tests/samples/snapshots/snap_test_migrate.py
1
1683
# -*- coding: utf-8 -*- # snapshottest: v1 - https://goo.gl/zC4yUc from __future__ import unicode_literals from snapshottest import Snapshot snapshots = Snapshot() snapshots['test_add_library_type[uvloop] 1'] = [ { '_id': 'foo', 'library_type': 'srna' }, { '_id': 'bar', '...
mit
367,363,578,529,333,060
15.339806
49
0.351159
false
codilime/cloudify-agent
cloudify_agent/api/pm/base.py
1
32068
######### # Copyright (c) 2015 GigaSpaces Technologies Ltd. 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...
apache-2.0
-1,857,186,208,549,480,200
35.194131
79
0.594206
false
childresslab/MicrocavityExp1
logic/singleshot_logic.py
1
23378
# -*- coding: utf-8 -*- """ This file contains the Qudi counter logic class. Qudi 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. Qudi is d...
gpl-3.0
-5,251,281,214,908,901,000
40.896057
121
0.594405
false
adongy/pytwitcher
pytwitcher/protocol.py
1
1507
import asyncio import logging logger = logging.getLogger(__name__) class IrcProtocol(asyncio.Protocol): def __init__(self, factory): self.factory = factory self.encoding = factory.encoding self.transport = None self.closed = True def connection_made(self, transport): ...
mit
-84,643,922,916,347,980
27.433962
75
0.565362
false
invisiblehands/django-supasurvey
supasurvey/models.py
1
29603
import os, json, collections, copy from datetime import datetime, date from decimal import Decimal, InvalidOperation, DivisionByZero from django.db import models from django.db.models.signals import post_save from django.conf import settings from django.utils.html import mark_safe from django.core.files.storage impor...
mit
-4,045,659,222,842,888,700
31.282443
175
0.609499
false
google/usd_from_gltf
tools/ufgbatch/ufgcommon/util.py
1
9093
#!/usr/bin/python # # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
apache-2.0
-3,681,172,362,500,409,300
28.332258
78
0.65248
false
ktraw2/TVBot
cogs/voice.py
1
16125
import config import discord import os import requests from discord.ext import commands from discord.ext.commands import Cog from modules import strings, parser, audio_player class Voice(Cog): def __init__(self, bot): self.bot = bot self.parse = parser.Parser(tvmaze_object=self.bot.api, server_dat...
gpl-3.0
504,472,773,272,281,200
53.110738
272
0.541085
false
ssudholt/phocnet
tools/save_deploy_proto.py
1
1028
#!/usr/bin/env python import argparse import os from phocnet.caffe.model_proto_generator import ModelProtoGenerator if __name__ == '__main__': parser = argparse.ArgumentParser(description='Save a PHOCNet deploy proto file to disk.') parser.add_argument('--output_dir', '-od', action='store', type=str, default='...
bsd-3-clause
5,187,680,118,631,901,000
59.529412
118
0.625486
false
herilalaina/scikit-learn
sklearn/decomposition/truncated_svd.py
13
8342
"""Truncated SVD for sparse matrices, aka latent semantic analysis (LSA). """ # Author: Lars Buitinck # Olivier Grisel <olivier.grisel@ensta.org> # Michael Becker <mike@beckerfuffle.com> # License: 3-clause BSD. import numpy as np import scipy.sparse as sp from scipy.sparse.linalg import svds from .....
bsd-3-clause
2,060,464,242,120,085,200
35.427948
78
0.617238
false
treycucco/py-utils
idb/util/field_mapping.py
1
2255
from collections import namedtuple from . import has_value, set_value, namedtuple_with_defaults from .convert import identity class FieldMapping(object): def __init__(self, source_name, destination_name=None, convert=None, is_required=True): self.source_name = source_name self.destination_name = destination...
bsd-3-clause
-5,325,962,432,835,589,000
35.967213
153
0.687361
false
Genorch/Orchestration
genorch_serve.py
1
3012
#!/usr/bin/env python3 import json import yaml import click from jinja2 import Environment, FileSystemLoader import os from domain.server import Server from domain.service import Service from domain.cluster import Cluster from utils.common import translate_id, id_to_swarm from database import db from tinydb import w...
gpl-3.0
-3,701,087,777,311,676,400
30.705263
78
0.506972
false
KorolevskyMax/jUnitXML2HTML
xml2htmlreport/cli.py
1
1870
# coding=utf-8 import argparse import sys from xml2htmlreport.xml2html import copy_static, get_features_and_convert_into_dict, parse_screenshots, \ get_overall_results, \ render_templates parser = argparse.ArgumentParser( description="jUnit XML2HTML Report Converter CLI", ) parser.add_argument( "-x"...
gpl-2.0
2,705,975,889,032,345,600
27.769231
105
0.648663
false
danieledwardknudsen/weather
util.py
1
3277
import configparser import pyodbc import sqlalchemy from os import getcwd # Read configuration file cfg = configparser.ConfigParser() try: cfg.read('weather.ini') except Exception as e: exit('Script could not be executed because a "weather.ini" config file could not be found.') cfg['FILES']['cwd'] = getcwd()...
gpl-3.0
-4,577,817,012,662,231,600
31.127451
113
0.652426
false
dariosky/afterdown
afterdown/tests/test_known.py
1
2714
# Test to populate the folder to monitor (using create_files_from_ls) run the rules and check the results from __future__ import print_function import os import shutil import pytest from afterdown.__main__ import AfterDown from afterdown.tests.playground.create_files_from_ls import LSCreator TESTS_PATH = os.path.di...
gpl-2.0
4,209,186,952,963,072,000
30.55814
105
0.692704
false
adrn/streams
scripts/figures/spitzer_proposal_figures.py
1
13920
# coding: utf-8 """ A script for making figures for the Spitzer proposal """ from __future__ import division, print_function __author__ = "adrn <adrn@astro.columbia.edu>" # Standard library import os, sys import cPickle as pickle # Third-party from astropy.io import ascii import astropy.units as u import numpy as ...
mit
-7,469,774,232,044,243,000
34.065491
116
0.593319
false
MediaMath/Diamond
src/diamond/server.py
1
14889
# coding=utf-8 import os import sys import time import logging import traceback import configobj import inspect # Path Fix sys.path.append( os.path.abspath( os.path.join( os.path.dirname(__file__), "../"))) import diamond from diamond.collector import Collector from diamond.handler.Handler i...
mit
2,357,657,269,787,806,000
33.306452
80
0.494056
false
cselis86/edx-platform
cms/djangoapps/contentstore/push_notification.py
1
2183
""" Helper methods for push notifications from Studio. """ from django.conf import settings from logging import exception as log_exception from contentstore.tasks import push_course_update_task from contentstore.models import PushNotificationConfig from xmodule.modulestore.django import modulestore from parse_rest.in...
agpl-3.0
495,199,455,312,597,300
34.209677
103
0.617957
false
newtdb/db
src/newt/db/tests/testsearch.py
1
12772
from ZODB.utils import u64 import unittest from .. import Object from .base import DBSetup class SearchTests(DBSetup, unittest.TestCase): def setUp(self): super(SearchTests, self).setUp() import newt.db self.db = newt.db.DB(self.dsn) self.conn = self.db.open() def tearDown(se...
mit
4,576,001,910,205,941,000
30.380835
79
0.529674
false
faylau/ATFWA
TestRun/TestCenter.py
1
9487
# -*- coding=utf-8 -*- # Copyright (C), 2013-2014, China Standard Software Co., Ltd. """ 测试框架的主入口及配置文件解析 类说明: 无 函数说明: load_tests: 根据全局变量test_cases来装载测试用例 initialize: 根据用例的配置文件,返回tc_list createTestCase: 根据配置文件名字,返回测试用例集的列表 create_testcase_by_module: 根据测试用例模块的名字返回测试用例集 get_log_level: 从GlobalConf...
gpl-2.0
2,453,235,881,867,777,000
28.360424
97
0.570827
false
gciteam6/xgboost
src/models/xgb.py
1
1546
# Third-party modules from xgboost import XGBRegressor # Hand-made modules from .base import BloscpackMixin, MyEstimatorBase, PickleMixin MACHINE_LEARNING_TECHNIQUE_NAME = "xgb" PICKLE_EXTENSION = "pkl" SERIALIZE_FILENAME_PREFIX = "fit_model" class MyXGBRegressor(MyEstimatorBase, BloscpackMixin, PickleMixin): de...
mit
-1,641,280,863,636,377,000
31.893617
93
0.61837
false
OpenPathView/DirectoryManager
opv_directorymanager/uid/uid_generator.py
1
1043
# coding: utf-8 # Copyright (C) 2017 Open Path View # 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 version. # This program is d...
gpl-3.0
6,205,458,646,809,387,000
39.115385
78
0.756472
false
njittam/python-telegram-bot
telegram/update.py
1
1750
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2016 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
gpl-3.0
7,026,595,714,367,036,000
27.688525
71
0.644
false