repo_name
stringlengths
5
92
path
stringlengths
4
221
copies
stringclasses
19 values
size
stringlengths
4
6
content
stringlengths
766
896k
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
32
997
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
13.6
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
ibis-project/ibis
ibis/backends/base/sql/alchemy/database.py
1
2006
import ibis.expr.operations as ops import ibis.expr.schema as sch from ibis.backends.base import Database class AlchemyDatabaseSchema(Database): def __init__(self, name, database): """ Parameters ---------- name : str database : AlchemyDatabase """ self.nam...
apache-2.0
4,518,699,516,794,086,000
24.075
76
0.587238
false
4.277186
false
false
false
rcarmo/python-utils
taskkit.py
1
6312
#!/usr/bin/python # -*- coding: utf-8 -*- """ Copyright (c) 2012, Rui Carmo Description: In-process job management License: MIT (see LICENSE.md for details) """ from Queue import Empty, Queue, PriorityQueue from collections import defaultdict from functools import partial from signal import signal, SIGINT, SIGTERM, S...
mit
-4,788,771,053,080,829,000
29.057143
108
0.563847
false
4.017823
false
false
false
justmearc/zero-phone
toolbar.py
1
4508
#App Toolbar #copyright (c) 2015 Tyler Spadgenske #MIT License import time import os import pygame from pygame.locals import * class Toolbar(): def __init__(self, fona): self.UPDATE_TIME = 30 self.DEAD = 30 #Setup fona self.fona = fona #Define colors self....
mit
-8,461,302,915,149,735,000
28.854305
95
0.526398
false
3.491867
false
false
false
KanoComputing/kano-init-flow
kano_init_flow/stages/kano_world/main.py
1
1992
# The wifi world stage # # Copyright (C) 2015 Kano Computing Ltd. # License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPL v2 # import threading import subprocess from gi.repository import Gtk, GLib from kano_init_flow.stage import Stage from kano_init_flow.ui.scene import Scene, Placement from kano.logging import ...
gpl-2.0
-7,157,874,879,935,386,000
24.21519
89
0.588353
false
3.531915
false
false
false
ideaworld/Echo
Echo_Backend/serivces.py
1
1752
import json from algorithm.sentimental import sentiment from algorithm.textProcessing import text_tag import traceback from websocket_server import WebsocketServer # Called for every client connecting (after handshake) def new_client(client, server): print("New client connected and was given id %d" % client['id'...
mit
-8,047,258,260,689,188,000
28.694915
69
0.602169
false
3.893333
false
false
false
metabrainz/listenbrainz-server
listenbrainz/listenstore/timescale_utils.py
1
6391
import time from collections import defaultdict from datetime import datetime, timedelta import psycopg2 from psycopg2.errors import UntranslatableCharacter import sqlalchemy import logging from brainzutils import cache from listenbrainz.utils import init_cache from listenbrainz import db from listenbrainz.db import t...
gpl-2.0
-6,488,966,447,885,629,000
37.969512
133
0.619621
false
3.770501
true
false
false
smadacm/TimeManagement
Organizer/models/client.py
1
1508
from django.db import models from django.contrib.auth.models import User class Client(models.Model): name = models.CharField('Name', max_length=255) abbreviation = models.CharField('Abbreviation', max_length=10, unique=True) user = models.ManyToManyField(User) limited = models.BooleanField('User-Restri...
mit
5,419,652,664,167,694,000
31.782609
91
0.637268
false
3.968421
false
false
false
maclinkallat/wrench
wrench/core/migrations/0010_auto_20150410_2208.py
1
1728
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('core', '0009_delete_awsconfig'), ] operations = [ migrations.AddField(...
mit
4,064,943,758,056,570,000
32.230769
144
0.577546
false
4.184019
false
false
false
kivy/plyer
plyer/facades/brightness.py
1
1269
''' Brightness ========== This API helps you to control the brightness of your primary display screen. The :class:`Brightness` provides access to public methods to control the brightness of screen. NOTE:: For Android, make sure to add permission, WRITE_SETTINGS Simple Examples --------------- To know the current br...
mit
3,382,729,415,909,718,000
20.87931
76
0.628054
false
4.5
false
false
false
OpenMindClub/ppreloader
web/__init__.py
1
1784
# -*- coding: utf-8 -*- import sys #sys.path.append("..") from bottle import * from bottle import __version__ as bottleVer from bottle import jinja2_template as template from config import JINJA2TPL_PATH TEMPLATE_PATH.insert(0, JINJA2TPL_PATH) from config import CFG #debug(True) APP = Bottle() #APP.mount('/up'...
mit
2,292,967,514,602,266,400
22.168831
52
0.436099
false
2.791862
false
false
false
italomaia/turtle-linux
games/HappyInsectGarden/lib/constants.py
1
2200
"""Constant definitions. This file is loaded during the program initialisation before the main module is imported. Consequently, this file must not import any other modules, or those modules will be initialised before the main module, which means that the DEBUG value may not have been set correctly. This module is in...
gpl-3.0
-8,644,888,238,664,568,000
32.846154
79
0.733636
false
3.384615
false
false
false
eunchong/build
scripts/master/svn_poller_with_comparator.py
2
1726
# Copyright 2014 The 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. from buildbot.changes.svnpoller import SVNPoller from buildbot.changes.base import PollingChangeSource from buildbot.changes.pb import ChangePerspective, PBC...
bsd-3-clause
-8,773,883,919,451,104,000
35.723404
72
0.753187
false
3.99537
false
false
false
f3at/feat
src/feat/test/integration/test_simulation_monitor.py
1
55729
# F3AT - Flumotion Asynchronous Autonomous Agent Toolkit # Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. # 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
8,431,780,095,378,668,000
33.76544
79
0.631251
false
3.561869
true
false
false
odoo-arg/odoo_l10n_ar
currency_inverse_rate/tests/test_currency_rate.py
1
2317
# -*- encoding: utf-8 -*- ############################################################################## # # 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 Licens...
agpl-3.0
481,658,991,685,953,300
38.271186
78
0.625809
false
4.072056
true
false
false
KDE/pykde4
examples/kdeuiExamples/kcolorbutton.py
1
4578
from PyQt4.QtCore import SIGNAL, Qt from PyQt4.QtGui import QLabel from PyKDE4.kdecore import i18n from PyKDE4.kdeui import KVBox, KHBox, KColorButton, KColorCells, KColorCombo, KColorPatch helpText = """These are examples of three ways of changing colors interactively, and one widget that displays a chosen color. W...
gpl-2.0
3,089,824,133,039,877,600
36.834711
104
0.640891
false
3.63911
false
false
false
naiaden/LSALM
createIndex.py
1
8527
#! /usr/bin/python import sys import getopt import time import os.path from subprocess import call verbosity = int(0) evaluateonly = False dictionaryOutputFile = '' corpusOutputFile = '' evaluationOutputFile = '' vocabularyInputFile = '' countOutputDirectory = './counts' order = 1 nrInputFiles = int(0) nrTrainIn...
mit
-2,071,760,080,529,623,000
34.677824
197
0.586959
false
3.76468
false
false
false
fhdk/pacman-mirrors
pacman_mirrors/builder/interactive.py
1
5324
#!/usr/bin/env python # # This file is part of pacman-mirrors. # # pacman-mirrors 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. # # p...
gpl-3.0
1,422,715,401,851,155,200
36.230769
116
0.623779
false
3.952487
true
false
false
bitmazk/django-document-library
document_library/south_migrations/0006_auto__chg_field_documentcategory_slug.py
1
10177
# flake8: noqa # -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models try: from django.contrib.auth import get_user_model except ImportError: # Django < 1.5 from django.contrib.auth.models import User else: User = get_user_model() ...
mit
-5,360,066,014,988,666,000
71.692857
193
0.563624
false
3.671356
false
false
false
Code4HR/open-health-inspection-scraper
scraper/spiders/healthspace_spider.py
1
10457
import scrapy import logging import shutil from scrapy import Selector, Request from scraper.helpers import vendor_helpers, inspection_helpers from scraper.helpers.scoring import Scoring from scraper.items import VendorItemLoader, InspectionItemLoader from urllib import parse logger = logging.getLogger('Healthspace Sp...
apache-2.0
-738,024,133,922,324,500
48.325472
137
0.561442
false
4.186149
false
false
false
ginkgo/micropolis
tools/formatMapGen.py
1
4232
import sys from optparse import OptionParser import os.path import copy from wheezy.template.engine import Engine from wheezy.template.ext.core import CoreExtension from wheezy.template.loader import FileLoader script_dir = os.path.dirname(__file__) + os.sep type_dic = {'BYTE' : '8', 'UNSIGNED_BYTE' : ...
gpl-3.0
1,088,306,389,284,673,900
33.975207
96
0.590974
false
3.193962
false
false
false
olafura/hwidgets
battery.py
1
1518
#import gobject #from dbus.mainloop.glib import DBusGMainLoop import dbus import json import datetime import couchdb import time from conf import getUsernamePassword #DBusGMainLoop(set_as_default=True) #loop = gobject.MainLoop() bus = dbus.SystemBus() upower = bus.get_object("org.freedesktop.UPower","/org/freedesktop/...
apache-2.0
-200,678,364,498,512,260
30.625
96
0.712121
false
3.465753
false
false
false
Polarcraft/KbveBot
hooks/note.py
1
1403
# Copyright (C) 2013-2015 Samuel Damashek, Peter Foley, James Forcier, Srijay Kasturi, Reed Koser, Christopher Reffett, and Fox Wilson # # 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 ve...
gpl-2.0
7,892,655,112,561,333,000
44.258065
134
0.702067
false
3.534005
false
false
false
triump0870/RemindMeLater
src/RemindMeLater/settings/production.py
1
3214
# In production set the environment variable like this: # DJANGO_SETTINGS_MODULE=RemindMeLater.settings.production import os import logging.config import dj_database_url import raven from .base import * # NOQA # For security and performance reasons, DEBUG is turned off DEBUG = False TEMPLATE_DEBUG = DEBU...
mit
7,404,562,317,363,529,000
27.192982
90
0.583074
false
3.776733
false
false
false
CSyllabus/webapp
backend/apps/csyllabusapi/helper/generate_fixtures_from_caltech_dump.py
1
5175
import json import requests from lxml import html from bs4 import BeautifulSoup caltech_fixtures_json = open("/Volumes/SSD-Thomas/Documents/GitHub/csyllabus/webapp/backend/apps/csyllabusapi/fixtures" "/caltech_fixtures_json.json", "w") caltech_courses = [] fixtures = [] countr...
mit
-7,513,020,583,375,455,000
27.741379
119
0.492947
false
3.551819
false
false
false
mguillech/cuevanalinks-gui
setup.py
1
3226
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: import distribute_setup distribute_setup.use_setuptools() from setuptools import setup import os import sys try: import py2exe PY2EXE_ACTIVE = 1 except: #no windows platform PY2EXE_ACTIVE...
lgpl-3.0
-3,491,385,756,907,091,500
34.054348
83
0.539535
false
3.785211
false
false
false
baroobob/sudoku
sudoku.py
1
22194
""" Sudoku class for the Insight Data Engineering coding challenge. This class contains methods for generating and solving Sudoku puzzles as well as methods for reading and writing puzzles and solutions to and from csv files. Author: Jim Bridgewater Written for Python 2.7.8 """ # import required libraries import csv ...
mit
-6,964,611,743,832,470,000
37.265517
81
0.529287
false
4.505481
false
false
false
ckane/crits
crits/raw_data/handlers.py
1
25353
import datetime import hashlib import json from dateutil.parser import parse from django.core.urlresolvers import reverse from django.http import HttpResponse from django.shortcuts import render_to_response from django.template import RequestContext from django.template.loader import render_to_string try: from mon...
mit
8,417,448,604,607,035,000
33.540872
121
0.550467
false
4.096461
false
false
false
nicollet/fdu
fdu.py
1
1953
#! /usr/bin/env python3 import glob import os.path import copy import sys def human_size(size): unit = '' units = ['KB', 'MB', 'GB', 'TB'] while size > 1024 and len(units) > 0: size /= 1024 unit = units.pop(0) return "%.2f %s" % (size, unit) def write(fname, args): args_ = args ...
gpl-2.0
6,547,102,580,889,485,000
29.515625
114
0.501792
false
3.531646
false
false
false
francislpx/myblog
myblog/settings.py
1
3380
""" Django settings for myblog project. Generated by 'django-admin startproject' using Django 1.11.6. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import os ...
gpl-3.0
-245,083,175,363,358,300
25.414063
91
0.682249
false
3.407258
false
false
false
eamy-org/imi
tests/query.py
1
8219
#!/usr/bin/env python import re import unittest from imi.query import match __all__ = ['TestQuery'] class TestQuery(unittest.TestCase): def setUp(self): self.document = { 'a': 'b', 'c': ('d', 'e', 'f'), 'g': ['h', 'i', 'j'], 'k': {'l': 'm'}, ...
mpl-2.0
-7,008,836,508,977,787,000
37.406542
63
0.563451
false
3.400496
true
false
false
cmlccie/cmlCiscoSparkSDK
cmlCiscoSparkSDK/jsondata.py
1
3628
"""Represent JSON objects as native Python data objects.""" from past.builtins import basestring from builtins import object import json # Module contants READ_ONLY = 'read-only' READ_WRITE = 'read-write' class ROAttributeError(AttributeError): """Raised when attempting to write to an attribute marked as Read...
mit
2,489,388,663,450,445,000
36.020408
78
0.600882
false
4.076404
false
false
false
rjegankumar/enron_email_fraud_identification
feature_selection.py
1
3885
import pickle import matplotlib.pyplot as plt import numpy as np from feature_format import featureFormat, targetFeatureSplit from sklearn.feature_selection import SelectKBest, SelectPercentile, f_classif import pprint import operator # loading the enron data dictionary with open("final_project_dataset.pkl", "r") as d...
mit
-314,189,151,394,127,700
38.242424
86
0.657658
false
3.607242
false
false
false
alexanderfefelov/nav
python/nav/util.py
1
11780
# # Copyright (C) 2005 Norwegian University of Science and Technology # Copyright (C) 2007, 2011-2013 UNINETT AS # # This file is part of Network Administration Visualized (NAV). # # NAV is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License version 2 as published...
gpl-2.0
1,934,957,156,324,896,500
27.114558
78
0.600594
false
3.819715
false
false
false
CN-UPB/OpenBarista
components/decaf-specification/decaf_specification/schemas/vnf_schema.py
1
6118
__author__ = 'sdjoum' # Copyright 2016 DECaF Project Group # This file is part of the DECaF project and originally derives from OpenMANO # # 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 # # ...
mpl-2.0
5,658,967,346,895,477,000
30.541237
123
0.570284
false
3.590376
false
false
false
nextgis/quickmapservices_server
qms_server/qms_core/migrations/0010_auto_20160422_1740.py
1
1327
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-04-22 17:40 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('qms_core', '0009_geojsonservice'), ] operations = [ migrations.AddField( ...
gpl-2.0
3,383,855,051,284,353,500
32.175
106
0.584024
false
4.159875
false
false
false
CognizantOneDevOps/Insights
PlatformAgents/com/cognizant/devops/platformagents/agents/alm/azureboard/AzureBoardAgent.py
1
12115
#------------------------------------------------------------------------------- # Copyright 2017 Cognizant Technology Solutions # # 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 # # ...
apache-2.0
3,439,266,452,522,690,600
57.397059
182
0.54222
false
4.721356
true
false
false
Peach-Labs/django-brevisurl
brevisurl/__init__.py
1
1790
import traceback try: from cStringIO import StringIO except ImportError: from StringIO import StringIO __versionstr__ = '2.0.1' def get_connection(backend=None, fail_silently=False, **kwargs): """Load a brevisurl backend and return an instance of it. If backend is None (default) settings.BREVISURL_...
bsd-3-clause
-6,906,059,929,108,051,000
29.862069
90
0.711173
false
3.874459
false
false
false
Rentier/setlx2py
setlx2py/setlx_util.py
1
2688
#------------------------------------------------------------------------------ # setlx2py: setlx_util.py # # Central place for functions which are needed in at least # two different files # # Copyright (C) 2014, Jan-Christoph Klie # License: Apache v2 #------------------------------------------------------------------...
apache-2.0
-4,067,567,571,367,020,000
23.669725
79
0.622396
false
3.459459
false
false
false
ubccr/supremm
src/supremm/scripthelpers.py
1
2873
#!/usr/bin env python """ common functions used in the command line scripts """ import re import datetime import MySQLdb import MySQLdb.cursors import sys import logging def parsetime(strtime): """ Try to be flexible in the time formats supported: 1) unixtimestamp prefixed with @ 2) year-mon...
lgpl-3.0
6,671,706,289,687,167,000
34.036585
117
0.636617
false
3.924863
true
false
false
rjschwei/WALinuxAgent
azurelinuxagent/common/logger.py
1
10877
# Copyright 2018 Microsoft Corporation # # 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...
apache-2.0
5,739,688,172,359,499,000
32.262997
126
0.611106
false
3.792538
false
false
false
certik/sfepy
tests/test_input_piezo.py
1
1391
input_name = 'input/piezo.py' output_name = 'test_piezo.vtk' from testsBasic import TestInput class Test( TestInput ): def from_conf( conf, options ): return TestInput.from_conf( conf, options, cls = Test ) from_conf = staticmethod( from_conf ) def test_ebc( self ): import numpy as nm ...
bsd-3-clause
7,335,274,620,533,828,000
27.979167
75
0.548526
false
2.922269
true
false
false
akrherz/iem
htdocs/plotting/auto/scripts100/p130.py
1
4985
"""temps vs high and low""" import calendar import numpy as np import pandas as pd from pandas.io.sql import read_sql from pyiem.plot.use_agg import plt from pyiem.util import get_autoplot_context, get_dbconn from pyiem.exceptions import NoDataFound def get_description(): """ Return a dict describing how to call...
mit
-7,090,904,464,620,560,000
31.796053
79
0.507523
false
3.375085
false
false
false
adamchainz/pymemcache
docs/conf.py
1
10901
# -*- coding: utf-8 -*- # # pymemcache documentation build configuration file, created by # sphinx-quickstart on Wed Aug 3 11:15:43 2016. # # 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. # ...
apache-2.0
6,717,243,652,813,745,000
28.542005
80
0.687185
false
3.596503
true
false
false
dajobe/singly-python
singly.py
1
8650
#!/usr/bin/env python # License - see UNLICENSE.md """ Simple python API to Singly """ import urllib import urllib2 import urlparse try: import simplejson as json except ImportError: import json class Service(dict): """Singly Service""" def __init__(self, singly, name, dct): """Construct a...
unlicense
2,601,000,954,915,346,000
28.725086
154
0.576532
false
3.889388
false
false
false
guillaume-philippon/aquilon
lib/aquilon/worker/commands/bind_client_metacluster.py
1
2506
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2009,2010,2011,2012,2013,2014,2015,2016 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obt...
apache-2.0
-9,182,790,942,226,121,000
39.419355
80
0.649242
false
4.211765
false
false
false
bolkedebruin/airflow
airflow/serialization/serialized_objects.py
1
24063
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
-1,645,287,886,479,950,800
40.559585
108
0.60753
false
4.280149
false
false
false
palaniyappanBala/rekall
rekall-core/rekall/plugins/windows/malware/cmdhistory.py
1
41579
# Rekall Memory Forensics # # Copyright 2013 Google Inc. All Rights Reserved. # # Authors: # Michael Hale Ligh <michael.ligh@mnin.org> # # Contributors/References: # Richard Stevens and Eoghan Casey # Extracting Windows Cmd Line Details from Physical Memory. # http://ww.dfrws.org/2010/proceedings/stevens.pdf # ...
gpl-2.0
7,763,467,079,808,725,000
36.867942
80
0.52666
false
3.99606
false
false
false
e-kolpakov/study-model
tests/agents/student/test_student.py
1
1852
from unittest import mock from unittest.mock import patch, PropertyMock import pytest from model.agents.student import Student from model.simulation.result import ResultTopics __author__ = 'e.kolpakov' @pytest.fixture def student(behavior_group, curriculum, resource_lookup, env): """ :rtype: student "...
mit
6,988,790,536,751,342,000
33.943396
109
0.652268
false
3.65286
true
false
false
mrtommyb/K2photo
K2photo/extract_lc.py
1
6883
from __future__ import division, print_function import numpy as np import matplotlib.pyplot as plt from astropy.io import fits as pyfits import glob from astropy.stats.funcs import median_absolute_deviation as MAD from scipy.ndimage import label from photo_test import raw_moment, intertial_axis, plot_bars from kepf...
mit
-8,643,201,791,359,184,000
28.165254
86
0.611361
false
3.061833
false
false
false
oss/shrunk
backend/shrunk/client/search.py
1
6400
"""Implements the :py:class:`SearchClient` class.""" from typing import Any, List from datetime import datetime, timezone from pymongo.collation import Collation import pymongo __all__ = ['SearchClient'] class SearchClient: """This class executes search queries.""" def __init__(self, *, db: pymongo.databa...
mit
5,381,660,293,846,415,000
36.426901
115
0.483125
false
4.353741
false
false
false
eykd/ravel
ravel/parsers.py
1
3752
from parsimonious import NodeVisitor, Grammar from ravel import grammars from ravel import types class BaseParser(NodeVisitor): def reduce_children(self, children): children = [c for c in children if c is not None] if children: return children if len(children) > 1 else children[0] ...
mit
-9,194,016,473,234,995,000
27.861538
86
0.651919
false
4.114035
false
false
false
ptdtan/Ragout
ragout/synteny_backend/synteny_backend.py
1
2374
#(c) 2013-2014 by Authors #This file is a part of Ragout program. #Released under the BSD license (see LICENSE file) """ This module defines abstract SyntenyBackend class """ import logging import os from collections import namedtuple, defaultdict import ragout.shared.config as config logger = logging.getLogger() ...
gpl-3.0
-973,099,617,298,101,400
27.261905
83
0.614996
false
4.396296
false
false
false
zhuyue1314/claripy
claripy/frontend.py
1
7946
#!/usr/bin/env python import logging l = logging.getLogger("claripy.frontends.frontend") import ana #pylint:disable=unidiomatic-typecheck class Frontend(ana.Storable): def __init__(self, solver_backend): self._solver_backend = solver_backend self.result = None self._simplified = False # # Storable support...
bsd-2-clause
-4,222,412,922,617,452,500
27.685921
109
0.69557
false
3.338655
false
false
false
Eigenstate/dabble
dabble/__init__.py
1
1456
""" Builds membrane protein systems """ __version__ = '2.7.12' __author__ = 'Robin Betz' import sys import inspect #========================================================================= # Currently supported output formats and description supported_formats = { "amber": ".prmtop and .inpcrd Amber PARM7 and R...
gpl-2.0
-8,382,392,942,428,823,000
32.090909
81
0.515797
false
4.067039
false
false
false
pamapa/callblocker
usr/share/callblocker/onlinelookup_pagesjaunes_fr.py
1
2124
#!/usr/bin/env python3 # callblocker - blocking unwanted calls from your home phone # Copyright (C) 2015-2020 Patrick Ammann <pammann@gmx.net> # # 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; ...
gpl-2.0
4,491,214,766,040,722,400
32.714286
88
0.658192
false
3.693913
false
false
false
sunze/py_flask
venv/lib/python3.4/site-packages/sqlalchemy/dialects/postgresql/psycopg2cffi.py
1
1654
# testing/engines.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: postgresql+psycopg2cffi :name: psycopg2cffi :dbapi: psyco...
mit
1,771,929,925,493,122,600
26.114754
71
0.665659
false
3.534188
false
false
false
loopaware/MindArk-Monitor
src/Notifier.py
1
2115
# -*- coding: utf-8 -*- ''' Created on 11 jan. 2017 @author: Fredrick ''' import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText class Notifier(object): ''' Sends email notifications. ''' def __init__(self, args, conf): ''' Constructor ...
mit
5,922,223,814,198,625,000
30.117647
62
0.514421
false
4.342916
false
false
false
linyehui/migrating-from-wikidot-to-jekyll
convert.py
1
6044
#!/usr/bin/env python # Copyright 2014 linyehui # Part of https://github.com/linyehui/migrating-from-wikidot-to-jekyll from wikidot import WikidotToMarkdown ## most important here import sys ## for sys.exit() import os ## for os.makedirs() import optparse ## for optparse.OptionParser() import markdown ## for markdow...
mit
5,740,193,154,394,760,000
35.191617
151
0.592985
false
3.69212
false
false
false
jerome-jh/pm_2016
wl.py
1
2883
#!/usr/bin/env python3 import os import sys import socket import numpy as np words = [] ifile = 'touslesmots.txt' try: fd = open(ifile, mode='rt') except FileNotFoundError: fd = open('listes.txt', mode='rt') url = fd.readline() fd.close() cmd = 'curl ' + url.strip() + ' | gzip -d >' + ifile os.system(cmd...
mit
-1,663,797,747,728,286,700
17.720779
66
0.574055
false
2.696913
false
false
false
msantl/cryptofolio
cryptofolio/views.py
1
17977
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings as django_settings from django.contrib import messages from django.contrib.auth import ( REDIRECT_FIELD_NAME, login as auth_login, authenticate, update_session_auth_hash) from django.contrib.auth.decorators...
gpl-3.0
3,407,878,979,047,227,000
30.102076
85
0.609167
false
4.048874
false
false
false
richard-willowit/odoo
addons/calendar/tests/test_calendar.py
2
10554
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime, timedelta from odoo import fields from odoo.tests.common import TransactionCase class TestCalendar(TransactionCase): def setUp(self): super(TestCalendar, self).setUp() ...
gpl-3.0
-4,765,753,147,071,437,000
48.088372
166
0.605458
false
3.705758
true
false
false
vinc/oct
lib/system.py
1
5292
# -*- coding: utf-8 -*- """ Copyright (C) 2010 Vincent Ollivier <contact@vincentollivier.com> This file is part of OpenNMS Configuration Tools. OpenNMS Configuration Tools 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 Fou...
gpl-3.0
-1,283,421,158,354,945,000
31.869565
83
0.657154
false
3.744515
false
false
false
marvis/pytorch-caffe-darknet-convert
caffenet.py
1
14784
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from collections import OrderedDict from prototxt import * from darknet import MaxPoolStride1 class FCView(nn.Module): def __init__(self): super(FCView, self).__init__() def forward(self, x): nB = x.data.size...
mit
-664,762,740,297,085,000
44.489231
139
0.51434
false
3.748479
false
false
false
pydanny/dj-stripe
tests/test_mixins.py
1
2418
""" dj-stripe Mixin Tests. """ from copy import deepcopy from unittest.mock import patch from django.contrib.auth import get_user_model from django.test.client import RequestFactory from django.test.testcases import TestCase from djstripe.mixins import PaymentsContextMixin, SubscriptionMixin from djstripe.models impo...
bsd-3-clause
-5,145,059,011,671,799,000
30.402597
85
0.634409
false
3.996694
true
false
false
openego/dingo
ding0/tools/logger.py
1
2929
"""This file is part of DING0, the DIstribution Network GeneratOr. DING0 is a tool to generate synthetic medium and low voltage power distribution grids based on open data. It is developed in the project open_eGo: https://openegoproject.wordpress.com DING0 lives at github: https://github.com/openego/ding0/ The docume...
agpl-3.0
2,284,653,854,785,670,400
25.627273
77
0.637419
false
3.638509
false
false
false
UNICT-DMI/Telegram-DMI-Bot
module/commands/help.py
1
8181
"""/help command""" import random from telegram import InlineKeyboardButton, InlineKeyboardMarkup, Update from telegram.ext import CallbackContext from module.shared import AULARIO, CLOUD, CUSicon, check_log def help_cmd(update: Update, context: CallbackContext): """Called by the /help command. Shows all the ...
gpl-3.0
3,998,302,161,731,663,400
41.222798
139
0.672475
false
3.760498
false
false
false
shackra/thomas-aquinas
tests/test_summanode.py
1
2071
# coding: utf-8 # This file is part of Thomas Aquinas. # # Thomas Aquinas 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. # # Thomas Aq...
bsd-3-clause
8,824,263,411,654,228,000
29.910448
80
0.697248
false
3.191063
false
false
false
kallimachos/archive
pygame/catanimation/catanimation.py
1
1080
import pygame, sys from pygame.locals import * pygame.init() FPS = 30 # frames per second setting fpsClock = pygame.time.Clock() # set up the window DISPLAYSURF = pygame.display.set_mode((400, 300), 0, 32) pygame.display.set_caption('Animation') WHITE = (255, 255, 255) catImg = pygame.image.load('cat.p...
gpl-3.0
3,544,999,946,774,765,000
21.021277
56
0.539815
false
3.43949
false
false
false
vecnet/om
website/apps/ts_om/urls.py
1
2244
# -*- coding: utf-8 -*- # # This file is part of the VecNet OpenMalaria Portal. # For copyright and licensing information about this package, see the # NOTICE.txt and LICENSE.txt files in its top-level directory; they are # available at https://github.com/vecnet/om # # This Source Code Form is subject to the terms of t...
mpl-2.0
7,751,629,227,254,713,000
58.052632
95
0.753119
false
3.452308
false
false
false
lowks/shared
s/dicts.py
1
1166
from __future__ import absolute_import, print_function import copy def get(x, *ks): ks = _ks(ks) x = x[ks[0]] for k in ks[1:]: x = x[k] return x def put(x, v, *ks): ks = _ks(ks) val = {ks[-1]: v} for k in reversed(ks[:-1]): val = {k: val} return merge(x, val) def me...
mit
-2,042,333,967,143,839,000
20.2
69
0.516295
false
2.900498
false
false
false
poppabear8883/ViperBot
viperpy/modules/tools/inputs.py
1
3514
import getpass import re import ipaddress def yesNoInput(question): valid = ['','y','Y','ye','yes','YES','n','N','no','No','NO'] data = '' while True: data = raw_input(question) if not data in valid: print 'Invalid input!' continue else: break...
gpl-2.0
-1,865,651,579,409,427,500
20.9625
121
0.472112
false
4.233735
false
false
false
vsporeddy/bigbang
bigbang/repo_loader.py
1
7653
from git_repo import GitRepo, MultiGitRepo import json; import os; import re; import subprocess; import sys; import pandas as pd import requests import fnmatch from IPython.nbformat import current as nbformat from IPython.nbconvert import PythonExporter import networkx as nx import compiler from compiler.ast import Fro...
gpl-2.0
381,456,976,894,274,000
28.098859
111
0.644714
false
3.467603
false
false
false
reignofmiracle/RM_Torrent
TorrentPython/TorrentPython/PieceHunter.py
1
4224
from TorrentPython.PieceRadio import * class PieceHunterActor(pykka.ThreadingActor): DEFAULT_REQUEST_ORDER_SIZE = 5 def __init__(self, piece_hunter, hunting_scheduler, piece_assembler, client_id, metainfo, peer_ip, peer_port): super(PieceHunterActor, self).__init__() self.piece_hunter = piece...
mit
-303,175,239,422,716,400
34.495798
114
0.600379
false
3.528822
false
false
false
KmolYuan/Pyslvs-PyQt5
pyslvs_ui/synthesis/structure_synthesis/structure_widget_ui.py
1
17172
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'pyslvs_ui/synthesis/structure_synthesis/structure_widget.ui' # # Created by: PyQt5 UI code generator 5.13.2 # # WARNING! All changes made in this file will be lost! from qtpy import QtCore, QtGui, QtWidgets class Ui_Form(object): def...
agpl-3.0
-8,885,152,185,472,452,000
62.132353
134
0.713662
false
3.895644
false
false
false
iulian787/spack
lib/spack/spack/test/cmd/env.py
2
64289
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os from six import StringIO import pytest import llnl.util.filesystem as fs import spack.hash_types as ht import...
lgpl-2.1
6,750,313,679,256,139,000
26.663081
79
0.585886
false
3.470766
true
false
false
NMGRL/pychron
pychron/dvc/func.py
1
6855
# =============================================================================== # Copyright 2016 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...
apache-2.0
4,275,292,959,605,898,000
32.115942
111
0.558716
false
3.737732
false
false
false
infuniri/avogadrolibs-cp2k
scripts/cp2k.py
1
11154
""" /****************************************************************************** This source file is not yet a part of the Avogadro project. Copyright 2015 Tomislav Subic <tomislav.subic@gmail.com> This source code is released under the New BSD License, (the "License"). Unless required by applicable law or...
bsd-3-clause
18,786,760,407,928,236
28.275591
170
0.589026
false
2.959406
false
false
false
crhaithcock/RushHour
Analytics/shared_code/RHcomponents-sqlite.py
1
5255
import numpy as np import networkx as nx from neighbors import * ''' Algo: node table has column: included_in_component. Pluck element with included_in_component = 0 define white_states = {element} while white_states: build component around this node. store component data update node table - set ...
cc0-1.0
7,597,533,569,366,256,000
25.680203
105
0.52921
false
3.889711
false
false
false
kitefishlabs/Genomic
genomic6.py
1
23228
import sc, random, contextlib, wave, os, math import shlex, subprocess, signal import NRTOSCParser3 import numpy as np import scipy.signal import matplotlib.pyplot as plt # generator class for weighted random numbers # # Pass in one or the other: # - weights: custom weights array # - size: size of "standard" weights ...
gpl-3.0
-5,400,236,229,010,588,000
36.225962
328
0.655932
false
2.683457
false
false
false
jenshnielsen/hemelb
Tools/setuptool/InletProcessing/SurfaceIntersectionFinder.py
1
2707
# # Copyright (C) University College London, 2007-2012, all rights reserved. # # This file is part of HemeLB and is provided to you under the terms of # the GNU LGPL. Please see LICENSE in the top level directory for full # details. # from vtk import vtkSTLReader, vtkCutter, vtkPlane, \ vtkPolyDataConnectivityF...
lgpl-3.0
-2,766,851,009,078,404,000
32.432099
104
0.596601
false
4.3312
false
false
false
skytoup/AppServer
app/utils/package_parse.py
1
5655
# -*- coding: utf-8 -*- # Created by apple on 2017/1/31. import re import aiofiles import plistlib from platform import system from .regex import Regex from ..log import log from zipfile import ZipFile from subprocess import Popen, PIPE from ..db import AppType aapt = './aapt_mac' if system() == 'Darwin' else './aapt...
mit
204,885,121,391,746,340
34.224359
117
0.569427
false
3.440827
false
false
false
altai/altai-api
altai_api/blueprints/fw_rules.py
1
5540
# vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab smarttab autoindent # Altai API Service # Copyright (C) 2012-2013 Grid Dynamics Consulting Services, Inc # All Rights Reserved # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License ...
lgpl-2.1
-8,116,104,365,265,743,000
32.98773
75
0.625271
false
3.390453
false
false
false
jooolia/phylo_temporal_jericho
sequence_processing/count_sequence_length.py
1
1161
## Prints out CSV with long format of length of sequences in the file. Could slim down the file name later. from Bio import SeqIO import sys fastq_file=sys.argv[1] length_dir=sys.argv[2] sizes = [len(rec) for rec in SeqIO.parse(fastq_file, "fastq")] print len(sizes), min(sizes), max(sizes) #sizes # print to file i...
mit
8,983,425,487,219,293,000
23.208333
108
0.654608
false
3.261236
false
false
false
GitSomeCode/RecipeApp
Proj/Proj/settings.py
1
3575
""" Django settings for Proj project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) impor...
gpl-2.0
5,891,198,983,395,217,000
26.083333
106
0.736503
false
3.014334
false
false
false
CarlFK/wafer
wafer/pages/views.py
1
1209
from django.http import Http404 from django.core.exceptions import PermissionDenied from django.views.generic import DetailView, TemplateView, UpdateView from wafer.pages.models import Page from wafer.pages.forms import PageForm class ShowPage(DetailView): template_name = 'wafer.pages/page.html' model = Page...
isc
9,070,367,220,501,474,000
27.116279
69
0.645161
false
3.875
false
false
false
carlgao/lenga
images/lenny64-peon/usr/share/python-support/python-boto/boto/sdb/queryresultset.py
1
1929
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modi...
mit
-1,797,867,178,655,754,000
37.58
74
0.687403
false
4.130621
false
false
false
dseeliger/pmx
scripts/mutate.py
1
18272
#!/usr/bin/env python # pmx Copyright Notice # ============================ # # The pmx source code is copyrighted, but you can freely use and # copy it as long as you don't change or remove any of the copyright # notices. # # ---------------------------------------------------------------------- # pmx is Copyright (C...
lgpl-3.0
8,259,392,862,814,304,000
33.936902
133
0.573719
false
3.136824
false
false
false
mjn19172/Savu
savu/plugins/denoise_bregman_filter.py
1
2211
# Copyright 2014 Diamond Light Source Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
apache-2.0
4,520,722,341,952,091,600
34.111111
78
0.699231
false
3.75382
false
false
false
GinnyN/towerofdimensions-django
django-allauth/setup.py
1
4743
#!/usr/bin/env python import os import sys from fnmatch import fnmatchcase from setuptools import setup,find_packages from distutils.util import convert_path # Provided as an attribute, so you can append to these instead # of replicating them: standard_exclude = ["*.py", "*.pyc", "*~", ".*", "*.bak", "Makefile"] stan...
bsd-3-clause
69,609,444,732,619,140
36.346457
170
0.553869
false
4.551823
false
false
false
dhalleine/tensorflow
tensorflow/contrib/learn/python/learn/models.py
1
17582
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
2,192,903,987,633,741,300
41.366265
82
0.642475
false
4.137915
false
false
false
alxgrtnstrngl/hellostats
roles/hello/files/hello_tools.py
1
2514
""" hellostats sample API author: Alex G.S. Utils for use by the hello app such as html formatting getting loadavg of the server and ipaddress """ import os, socket, re import requests import json # server tools and stats def get_ip(): """get the ip address for the server""" aws_url="http://169.254.169.254...
mit
5,372,525,498,840,153,000
27.247191
94
0.56603
false
3.406504
false
false
false
NLNZDigitalPreservation/rosetta_sip_factory
rosetta_sip_factory/sip_builder.py
1
19196
import json import os import shutil from lxml import etree as ET from mets_dnx.factory import ( build_mets, build_single_file_mets, build_mets_from_json) # declare namespaces DC_NS = "http://purl.org/dc/elements/1.1/" DCTERMS_NS = "http://purl.org/dc/terms/" XSI_NS = "http://www.w3.org/2001/XMLSchema-in...
mit
1,280,503,730,328,075,500
40.37069
79
0.619087
false
3.942493
false
false
false
kamal-gade/rockstor-core
src/rockstor/smart_manager/views/replica_share.py
1
3074
""" Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com> This file is part of RockStor. RockStor 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 la...
gpl-3.0
1,163,264,726,425,593,600
36.036145
74
0.656148
false
4.002604
false
false
false
cuongnv23/curl2share
curl2share/storages/redis.py
1
2419
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import import logging import redis from curl2share import config class Redis(object): """ Interact with redis to insert, retrieve, delete metadata of file object in/from Redis. REMEMBER: Redis is a caching layer. ...
mit
-4,366,144,956,231,348,700
30.012821
76
0.513849
false
4.564151
false
false
false
muminoff/siman
core/migrations/0002_auto__add_field_cpucomponent_brand.py
1
4327
# -*- coding: utf-8 -*- from south.utils import datetime_utils as 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 'CPUComponent.brand' db.add_column('cpus', 'brand', ...
apache-2.0
-6,035,101,706,042,665,000
50.52381
118
0.524151
false
3.623953
false
false
false
JonathanSalwan/Triton
src/testers/arm32/unicorn_test_arm32_loadstore_arm_1.py
1
72986
#!/usr/bin/env python3 ## -*- coding: utf-8 -*- from __future__ import print_function from triton import * from unicorn import * from unicorn.arm_const import * import pprint import random import sys ADDR = 0x100000 STACK = 0x200000 HEAP = 0x300000 SIZE = 5 * 1024 * 1024 CODE ...
apache-2.0
-4,330,681,943,078,567,000
45.340317
105
0.494355
false
1.747707
false
false
false
escodebar/django-rest-framework-rules
tests/testapp/views.py
1
3439
from __future__ import absolute_import from rest_framework.generics import GenericAPIView from rest_framework.response import Response from rest_framework.views import APIView from rest_framework_rules.decorators import permission_required from rest_framework_rules.mixins import PermissionRequiredMixin from testapp.mo...
mit
2,561,171,497,902,527,500
38.528736
81
0.642338
false
4.830056
true
false
false
jrichte43/ProjectEuler
Problem-0080/solutions.py
1
1165
__problem_title__ = "Square root digital expansion" __problem_url___ = "https://projecteuler.net/problem=80" __problem_description__ = "It is well known that if the square root of a natural number is not " \ "an integer, then it is irrational. The decimal expansion of such " \ ...
gpl-3.0
5,588,827,297,299,846,000
36.580645
99
0.591416
false
4.283088
false
false
false
tyrosathish/caffe-models
Vggnet_accuracy_plotter.py
1
2329
#!/usr/bin/python import sys from datetime import datetime from datetime import timedelta if len(sys.argv) < 2: print "Usage: ", sys.argv[0], " caffe_log_file" exit() log_file = sys.argv[1] start_time="" iter_count="" iter_accuracy="" iter_time="" prev_time="" add_days=0 with open(log_file) as fp: for line ...
gpl-3.0
-9,000,969,652,578,820,000
38.474576
113
0.556891
false
3.168707
false
false
false
zauonlok/renderer
scripts/phoenix.py
1
2325
"""Preprocess the Phoenix Bird model The model is available for download from https://sketchfab.com/models/844ba0cf144a413ea92c779f18912042 The Python Imaging Library is required pip install pillow """ from __future__ import print_function import json import os import zipfile from PIL import Image from ut...
mit
3,615,523,012,971,563,500
26.678571
74
0.668387
false
2.980769
false
false
false