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
dalf/searx
searx/engines/framalibre.py
1
2104
# SPDX-License-Identifier: AGPL-3.0-or-later """ FramaLibre (It) """ from html import escape from urllib.parse import urljoin, urlencode from lxml import html from searx.utils import extract_text # about about = { "website": 'https://framalibre.org/', "wikidata_id": 'Q30213882', "official_api_documentati...
agpl-3.0
5,341,742,455,289,489,000
28.222222
114
0.612167
false
3.596581
false
false
false
aj00200/binaryslaveserver
src/libs/server/greeter.py
1
1146
''' Handle connections from a client greeter. Provide information such as sub-servers and news. ''' import asyncore import socket import struct class Handler(asyncore.dispatcher_with_send): def handle_read(self): data = self.recv(1) if data == b'\x00': # TODO: load alternate server nam...
gpl-3.0
-4,989,029,583,675,852,000
29.157895
77
0.595113
false
3.924658
false
false
false
matthias-k/pysaliency
pysaliency/quilt.py
1
5072
""" Code to apply quilt patches to files This module enables pysaliency to use quilt patches to patch code from external saliency models. While in Linux, quilt itself could be used to apply the patches, in Windows and Mac quilt might not be available and nontrivial to install for users. It does not support all possib...
mit
6,860,629,781,753,440,000
32.813333
88
0.545347
false
4.031797
false
false
false
florentx/stringformat
setup.py
1
1694
# -*- coding: utf-8 -*- """ StringFormat ============ StringFormat is an independent port of the Python 3 advanced string formatting, compatible with Python >= 2.4. This implementation is pure Python. Add the method ``str.format`` only if it is missing (Python < 2.6):: import stringformat stringformat.init(...
bsd-3-clause
-3,078,432,857,128,992,000
25.888889
76
0.640496
false
3.985882
false
false
false
mleist/gttg
base/migrations/0001_initial.py
1
1751
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-06-16 16:35 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Creat...
mit
-2,318,908,313,206,312,400
33.333333
114
0.5494
false
4.25
false
false
false
znick/anytask
anytask/api/tests.py
1
25894
from __future__ import unicode_literals import base64 import json from django.contrib.auth.models import User from django.core.files.uploadedfile import SimpleUploadedFile from django.core.urlresolvers import reverse from django.test import TestCase from courses.models import Course from issues.model_issue_status im...
mit
7,359,099,332,820,531,000
36.912152
114
0.434773
false
4.459101
true
false
false
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247971765/PyQt4/QtGui/QAbstractItemView.py
1
24092
# encoding: utf-8 # module PyQt4.QtGui # from /usr/lib/python3/dist-packages/PyQt4/QtGui.cpython-34m-x86_64-linux-gnu.so # by generator 1.135 # no doc # imports import PyQt4.QtCore as __PyQt4_QtCore from .QAbstractScrollArea import QAbstractScrollArea class QAbstractItemView(QAbstractScrollArea): """ QAbstractI...
gpl-2.0
-695,891,328,013,643,000
40.182906
153
0.674581
false
4.207475
false
false
false
i2keita/mz_demo
Docs/subsidyData/toSql.py
1
1555
# -*- coding:utf-8 -*- import os sql_file = 'subsidy.sql' def get_data(file_name): res = {} with open(file_name, mode='r') as f: res['certificate_type'] = f.readline().strip(); res['kind'] = f.readline().strip(); res['level'] = f.readline().strip(); res['money'] = ...
gpl-3.0
-3,724,475,210,995,640,300
36.825
213
0.540245
false
3.383442
false
false
false
Clinical-Genomics/scout
scout/build/variant/variant.py
1
15599
# -*- coding: utf-8 -*- import logging from . import build_genotype, build_compound, build_gene, build_clnsig LOG = logging.getLogger(__name__) def build_variant( variant, institute_id, gene_to_panels=None, hgncid_to_gene=None, sample_info=None ): """Build a variant object based on parsed information A...
bsd-3-clause
-6,906,830,750,173,643,000
34.614155
119
0.601513
false
3.536386
false
false
false
mediatum/mediatum
contenttypes/test/test_image.py
1
4055
# -*- coding: utf-8 -*- """ :copyright: (c) 2016 by the mediaTUM authors :license: GPL3, see COPYING for details """ from __future__ import absolute_import import os import tempfile from PIL import Image as PILImage import pytest from core import config from contenttypes.image import _create_zoom_tile_buffer, ...
gpl-3.0
-2,235,419,218,713,841,400
30.192308
100
0.693218
false
3.36794
true
false
false
stefan-jonasson/home-assistant
homeassistant/components/input_datetime.py
2
7579
""" Component to offer a way to select a date and / or a time. For more details about this component, please refer to the documentation at https://home-assistant.io/components/input_datetime/ """ import asyncio import logging import datetime import voluptuous as vol from homeassistant.const import ( ATTR_ENTITY_...
mit
-3,983,523,668,296,364,000
32.387665
76
0.586489
false
4.098972
false
false
false
rtevans/tacc_stats_old
analyze/process_pickles/htrate.py
1
2109
#!/usr/bin/env python import sys sys.path.append('../../monitor') import datetime, glob, job_stats, os, subprocess, time import matplotlib if not 'matplotlib.pyplot' in sys.modules: matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy import scipy, scipy.stats import argparse import tspl, tspl_utils c...
lgpl-2.1
5,669,426,090,507,161,000
24.107143
71
0.588431
false
2.991489
false
false
false
strahlex/pymachinetalk
setup.py
1
1602
#!/usr/bin/env python # coding=utf-8 import sys # We must use setuptools, not distutils, because we need to use the # namespace_packages option for the "google" package. try: from setuptools import setup, Extension, find_packages except ImportError: try: from ez_setup import use_setuptools us...
mit
-5,216,066,257,719,230,000
30.411765
87
0.650437
false
3.769412
false
false
false
suhelhammoud/omr
src/Configuration.py
1
4194
import numpy as np import math class Section: """region""" def __init__(self, x1, y1, x2, y2): self.x1 = x1 self.y1 = y1 self.x2 = x2 self.y2 = y2 def crop(self, img): return img[self.y1: self.y2, self.x1: self.x2] def coordinates(self): return self.x...
apache-2.0
3,492,936,413,018,460,700
26.233766
86
0.552933
false
2.966054
false
false
false
stscieisenhamer/glue
glue/core/subset.py
1
34912
from __future__ import absolute_import, division, print_function import uuid import numbers import operator import numpy as np from glue.external import six from glue.external.six import PY3 from glue.core.roi import CategoricalROI from glue.core.contracts import contract from glue.core.util import split_component_v...
bsd-3-clause
5,609,667,963,165,240,000
30.452252
102
0.584212
false
4.145334
false
false
false
shrinidhi666/rbhus
rbhusUI/guiBin/selectRadioBox.py
1
3836
#!/usr/bin/python from PyQt4 import QtCore, QtGui import glob import os import sys import datetime import re import argparse dirSelf = os.path.dirname(os.path.realpath(__file__)) sys.path.append(dirSelf.rstrip(os.sep).rstrip("guiBin").rstrip(os.sep) + os.sep + "lib") import selectRadioBoxMod sys.path.append(dirSelf...
gpl-3.0
4,537,618,025,003,838,500
27.205882
200
0.658759
false
3.335652
false
false
false
endvroy/PATlanguages
patFutures.py
1
1571
from pat import getPayload from collections import Counter from concurrent import futures import requests, bs4 from tqdm import tqdm def getPage(session, page): # print('getting page %d...' % page) url = 'http://www.patest.cn/contests/pat-b-practise/submissions?page=%d' % page res = session.get(url) ...
mit
-1,742,330,523,643,958,000
28.092593
83
0.623806
false
3.670561
false
false
false
nicolashainaux/mathmaker
mathmaker/lib/document/content/geometry/perimeter_polygon.py
1
2795
# -*- coding: utf-8 -*- # Mathmaker creates automatically maths exercises sheets # with their answers # Copyright 2006-2017 Nicolas Hainaux <nh.techn@gmail.com> # This file is part of Mathmaker. # Mathmaker is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License...
gpl-3.0
-1,160,689,326,687,422,200
38.928571
76
0.633989
false
3.802721
false
false
false
htwenhe/DJOA
env/Lib/site-packages/xlwt/UnicodeUtils.py
1
5033
# -*- coding: windows-1252 -*- ''' From BIFF8 on, strings are always stored using UTF-16LE text encoding. The character array is a sequence of 16-bit values4. Additionally it is possible to use a compressed format, which omits the high bytes of all characters, if they are all zero. The following tables ...
mit
-7,807,916,046,642,765,000
40.254098
99
0.606795
false
3.824468
false
false
false
repotvsupertuga/tvsupertuga.repository
script.module.streamtvsupertuga/lib/resources/lib/sources/en/to_be_fixed/sitedown/tvbmoviez.py
1
5493
# -*- coding: UTF-8 -*- import re,urllib,urlparse from resources.lib.modules import cleantitle from resources.lib.modules import client from resources.lib.modules import debrid class source: def __init__(self): self.priority = 1 self.language = ['en'] self.domains = ['best-moviez.ws'] ...
gpl-2.0
7,544,595,579,048,061,000
35.138158
172
0.446022
false
3.642573
false
false
false
dpranke/typ
typ/runner.py
3
35257
# Copyright 2014 Google 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 or ag...
apache-2.0
-6,514,229,973,386,140,000
34.505539
80
0.54653
false
4.081144
true
false
false
OpenTechFund/WebApp
opentech/apply/review/forms.py
1
4947
from django import forms from django.core.exceptions import NON_FIELD_ERRORS from django.utils.html import escape from opentech.apply.review.options import NA from opentech.apply.stream_forms.forms import StreamBaseForm from .models import Review, ReviewOpinion from .options import OPINION_CHOICES, PRIVATE class Mi...
gpl-2.0
-2,164,851,810,208,382,200
32.883562
139
0.610269
false
4.105394
false
false
false
Pulgama/supriya
supriya/patterns/Pseed.py
1
1073
import inspect from supriya.patterns.Pattern import Pattern from supriya.patterns.RandomNumberGenerator import RandomNumberGenerator class Pseed(Pattern): ### CLASS VARIABLES ### __slots__ = ("_pattern", "_seed") _file_path = __file__ ### INITIALIZER ### def __init__(self, pattern, seed=0): ...
mit
-3,964,006,970,529,549,000
20.897959
72
0.599254
false
4.224409
false
false
false
bmtgoncalves/TorinoCourse
Lecture VI/matplotlib_imshow.py
1
1857
import numpy as np import matplotlib.pyplot as plt def load_asc(filename): fp = open(filename) ncols, count = fp.readline().split() ncols = int(count) nrows, count = fp.readline().split() nrows = int(count) xllcorner, value = fp.readline().split() xllcorner = float(value) yllcorner,...
mit
-2,406,466,435,693,642,000
24.791667
91
0.624125
false
2.915228
false
false
false
Rolight/So-Dashboard
so/core.py
1
6436
import json from django.conf import settings from elasticsearch import Elasticsearch from so import cache_keys from so.cache import redis_cache from so.constant import constant from so.models import ( Website, WebsiteAllowedDomain, WebsiteUrlPattern, WebsiteSelector, SpiderTask, ) test_data = { ...
gpl-3.0
-4,467,453,939,454,056,400
28.254545
73
0.547545
false
3.6137
false
false
false
ActiveState/code
recipes/Python/496742_ShelfProxy/recipe-496742.py
1
3065
import shelve class InvalidationError(Exception): pass class ShelfProxy(Proxy): __slots__ = ["_key", "_shelf", "_invalidated"] def __init__(self, obj, shelf, key): Proxy.__init__(self, obj) object.__setattr__(self, "_shelf", shelf) object.__setattr__(self, "_key", key) ...
mit
630,592,922,411,288,300
25.885965
90
0.55367
false
3.61013
false
false
false
lrntc/touch_hdr
touch_hdr.py
1
6454
import sys import subprocess import detect_camera import touch_hdr_variables from PySide.QtCore import * from PySide.QtGui import * class TouchHDRMenu(QWidget): def __init__(self): super(TouchHDRMenu, self).__init__() self.check = QCheckBox("HDR", self) self.btn_take_fast_hdr = QPushButton(...
gpl-2.0
-797,496,485,911,961,500
30.482927
122
0.617911
false
3.607602
false
false
false
markastern/hbcal
hbcal/hebrew_calendar/date.py
1
15258
"""This module defines calendar classes (mostly abstract) for hbcal""" # Copyright 2015, 2016, 2019 Mark Stern # # This file is part of Hbcal. # # Hbcal is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2, # as published by the Free Software Foundat...
gpl-2.0
123,123,470,890,932,380
31.812903
79
0.566391
false
4.381964
false
false
false
nzinfo/ElasticSphinx
space/db_import.py
1
7053
# -*- coding: utf-8 -*- #!/usr/bin/env python """ 实际处理 表结构的导入 1 遍历所有表 2 检查表的字段定义、索引的定义、主键的定义、外键的定义。 """ import json from .db_conn import cs_create_engine import sqlalchemy from sqlalchemy import inspect class DBTableMeta(object): def __init__(self, tbl_name): self._tbl_name = tbl_name ...
apache-2.0
-5,775,867,692,580,977,000
29.436937
111
0.534853
false
3.841387
false
false
false
mikeshardmind/SinbadCogs
rolemanagement/massmanager.py
1
10201
import csv import io import logging from typing import Optional, Set import discord from redbot.core import checks, commands from .abc import MixinMeta from .converters import ( ComplexActionConverter, ComplexSearchConverter, RoleSyntaxConverter, ) from .exceptions import RoleManagementException log = lo...
mit
3,458,244,613,031,202,000
29.27003
103
0.51142
false
4.44101
false
false
false
tjcsl/ion
intranet/apps/eighth/migrations/0039_auto_20160322_1013.py
1
1169
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-03-22 14:13 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [('eighth', '0038_merge')] operations = [ migrations.AddField( model_name='eight...
gpl-2.0
-507,226,886,883,369,500
29.763158
59
0.598802
false
4.566406
false
false
false
janko33bd/bitcoin
contrib/devtools/security-check.py
1
6510
#!/usr/bin/python2 ''' Perform basic ELF security checks on a series of executables. Exit status will be 0 if succesful, and the program will be silent. Otherwise the exit status will be 1 and it will log which executables failed which checks. Needs `readelf` (for ELF) and `objdump` (for PE). ''' from __future__ import...
mit
5,513,877,472,251,832,000
34.966851
163
0.607988
false
3.624722
false
false
false
icyflame/batman
tests/family_tests.py
1
10716
# -*- coding: utf-8 -*- """Tests for the family module.""" # # (C) Pywikibot team, 2014-2015 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, unicode_literals __version__ = '$Id$' from pywikibot.family import Family, SingleSiteFamily from pywikibot.exceptions import Unkno...
mit
4,559,287,985,541,460,500
38.836431
85
0.608996
false
4.013483
true
false
false
auready/django
django/db/models/sql/query.py
2
95034
""" Create SQL statements for QuerySets. The code in here encapsulates all of the SQL construction so that QuerySets themselves do not have to (and could be backed by things other than SQL databases). The abstraction barrier only works one way: this module has to know all about the internals of models in order to get ...
bsd-3-clause
-1,911,751,377,344,912,100
43.429173
119
0.592409
false
4.330751
false
false
false
robmcmullen/peppy
editra.in/make-major-modes-from-editra.py
1
13072
#!/usr/bin/env python import os, shutil, sys, glob, imp import __builtin__ import ConfigParser from cStringIO import StringIO from optparse import OptionParser import wx.stc __builtin__._ = str sys.path.append("..") from peppy.debug import * from facade import * facade = EditraFacade() class_attr_template = ''' ...
gpl-2.0
-3,615,765,190,283,932,000
34.045576
124
0.617427
false
3.844706
false
false
false
tomevans/utils
read_marcs.py
1
1426
from __future__ import print_function import numpy as np import scipy.interpolate import matplotlib.pyplot as plt import os import pdb import sys import glob def read_marcs(teff=5000, logg=4.5, turbulence=2.0, metallicity=0.0): """ Reads in MARCS spectrum of specified properties and returns two arrays, on...
gpl-2.0
-5,502,322,731,232,479,000
37.540541
100
0.685835
false
3.240909
false
false
false
Migelo/mpa_garching
1/temperature.py
1
2567
import pygad as pg import matplotlib.pyplot as plt import numpy as np import utils import glob from multiprocessing import Pool filename = __file__ def plot(args): halo = args[0] type = args[1] path = '/ptmp/mpa/naab/REFINED/%s/SF_X/4x-2phase/out/snap_%s_4x_???' % (halo, halo) max = int(sorted(glob.gl...
mit
-4,927,423,738,475,809,000
37.313433
194
0.580834
false
2.376852
false
false
false
bpowers/opensim
opensim/visuals/widgets/stock.py
1
8685
#===--- stock.py - OpenSim Stock widget -----------------===# # # Copyright 2008 Bobby Powers # # This file is part of OpenSim. # # OpenSim 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 ...
gpl-3.0
7,247,521,511,962,889,000
28.242424
79
0.594819
false
3.395231
false
false
false
torenado/plugin.video.animestream
resources/lib/streamSites/myanimelinks.py
1
6227
import urllib,urllib2,re,sys,httplib #import xbmcplugin,xbmcgui,xbmcaddon,urlresolver import cookielib,os,string,cookielib,StringIO import os,time,base64,logging from datetime import datetime from utils import * try: import json except ImportError: import simplejson as json #testing in shell #TEST 1 # pyth...
gpl-3.0
-8,915,532,413,233,321,000
30.938462
125
0.667256
false
3.040527
true
false
false
Caranarq/01_Dmine
01_Agua/P0112/P0112.py
1
9487
# -*- coding: utf-8 -*- """ Started on wed, oct 25th, 2017 @author: carlos.arana Descripcion: """ import pandas as pd import numpy as np import sys # Librerias locales utilizadas module_path = r'D:\PCCS\01_Dmine\Scripts' if module_path not in sys.path: sys.path.append(module_path) from SUN.asignar_sun import ...
gpl-3.0
-6,876,247,542,139,268,000
46.808081
120
0.698891
false
2.953198
false
false
false
UManPychron/pychron
pychron/processing/argon_calculations.py
1
31756
# =============================================================================== # Copyright 2011 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
2,994,392,841,669,814,300
32.182863
120
0.519052
false
2.8053
false
false
false
elkingtonmcb/bcbio-nextgen
bcbio/structural/metasv.py
1
2666
"""Perform ensemble calling of structural variants using MetaSV. https://github.com/chapmanb/metasv http://dx.doi.org/10.1093/bioinformatics/btv204 """ import os import sys from bcbio import utils from bcbio.provenance import do from bcbio.pipeline import datadict as dd from bcbio.structural import shared from bcbio....
mit
-8,279,006,433,332,740,000
47.472727
107
0.574644
false
3.3325
false
false
false
ai-se/parGALE
epoal_src/Z3ModelWebPortalUpdateAllMin.py
1
13336
from z3 import * from consts import METRICS_MAXIMIZE, METRICS_MINIMIZE FeatureIndexMap = {} FeatureVariable = [] FeatureIndexMap['web_portal'] = 0 web_portal = Bool('web_portal') FeatureVariable.append(web_portal) FeatureIndexMap['web_portal'] = 1 web_portal = Bool('web_portal') FeatureVariable.append(we...
unlicense
5,921,559,828,932,283,000
28.587156
136
0.606929
false
2.337189
false
false
false
gangadharkadam/frappecontribution
frappe/model/base_document.py
1
18678
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, sys from frappe import _ from frappe.utils import cint, flt, now, cstr, strip_html, getdate, get_datetime, to_timedelta from frappe.model import default_fields from...
mit
9,206,606,112,648,290,000
28.8848
117
0.658582
false
3.10989
false
false
false
napjon/krisk
krisk/plot/make_bar_line.py
1
10559
from copy import deepcopy import numpy as np import pandas as pd from krisk.plot.make_chart import insert_series_data, round_list from krisk.util import future_warning d_annotate = {'normal': {'show': True, 'position': 'top'}} def set_full_style_condition(chart, data, c, **kwargs): if kwargs['full']: ...
bsd-3-clause
4,542,803,885,063,292,000
32.100313
81
0.5152
false
3.800936
false
false
false
geopm/geopm
integration/experiment/monitor/run_monitor_hpl_mkl.py
1
2369
#!/usr/bin/env python3 # # Copyright (c) 2015 - 2021, Intel Corporation # # 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, th...
bsd-3-clause
6,653,605,277,760,801,000
41.303571
80
0.713803
false
4.077453
false
false
false
yougov/pmxbot
pmxbot/system.py
1
1701
""" System commands """ import sys import operator import io import time import importlib_resources import pmxbot.core from pmxbot.core import command, Handler @command(aliases='h') def help(rest): """Help (this command)""" rs = rest.strip() if rs: # give help for matching commands for ...
mit
8,581,655,922,734,470,000
24.772727
84
0.579659
false
3.928406
false
false
false
mashaka/Inspiry
algo/trip.py
1
2105
##### # Author: Maria Sandrikova # Copyright 2017, Inspiry ##### from typing import List from .compute_tools import TripHyposesis NOT_FOUND = -1 class Trip: def __init__(self, trip_hyposesis: TripHyposesis): self.posts = trip_hyposesis.posts self.country = trip_hyposesis.country city_nam...
apache-2.0
-8,931,164,978,473,874,000
30.893939
72
0.575772
false
3.654514
false
false
false
smilusingjavascript/blink
Source/bindings/scripts/idl_definitions.py
2
35716
# Copyright (C) 2013 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 the ...
bsd-3-clause
6,397,822,024,024,746,000
41.018824
158
0.595027
false
4.534789
false
false
false
leandrotoledo/python-correios
correios/test/test_encomenda.py
1
1848
#-*- encoding: utf-8 -*- """ API Python Correios - Rastreamento de Encomendas Copyright (C) 2012 Leandro T. de Souza <leandrotoledo@member.fsf.org> 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, ei...
gpl-3.0
-7,990,466,861,356,577,000
30.862069
74
0.70671
false
3.276596
true
false
false
pdbartlett/misc-stuff
unfuddle/AppEngine/paulb/testapp.py
1
2935
import cgi import datetime import os import wsgiref.handlers from google.appengine.ext import db from google.appengine.api import users from google.appengine.ext import webapp from google.appengine.ext.webapp import template # Model classes class Message(db.Model): user = db.UserProperty() email = db.St...
apache-2.0
-6,952,409,323,259,496,000
25.95283
64
0.621465
false
3.544686
false
false
false
eaplatanios/tensorflow
tensorflow/python/ops/distributions/categorical.py
1
12151
# 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
-1,370,741,532,496,404,000
34.843658
80
0.650152
false
3.674327
false
false
false
weka-io/easypy
easypy/tokens.py
1
3339
""" This module is about Tokens. Tokens are string-based objects for when ``None`` is not enough, and ``Enum`` is too much. Tokens are used to indicate a desired behavior, instead of some specific value. Tokens can be created by simple instantiation:: from easypy.tokens import Token AUTO = Token('AUTO') If y...
bsd-3-clause
9,029,391,845,331,402,000
23.021583
101
0.557951
false
4.076923
false
false
false
linfanangel/Trality
cart/cart/settings.py
1
3738
""" Django settings for cart project. Generated by 'django-admin startproject' using Django 1.9.6. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os from ...
gpl-3.0
5,015,623,358,729,952,000
24.786207
91
0.684323
false
3.454713
false
false
false
danielterhorst/open_exchange_rates
open_exchange_rates/client.py
1
2646
from __future__ import unicode_literals import logging import httplib import operator from requests.adapters import HTTPAdapter import requests from .exceptions import OpenExchangeRatesAccessRestrictedError, OpenExchangeRatesAccessRestrictedOverUseError, \ OpenExchangeRatesInvalidAppIdError, OpenExchangeRatesInv...
gpl-2.0
6,761,920,065,992,111,000
38.492537
112
0.710884
false
4.180095
false
false
false
tmhorne/simplewiki
zim/plugins/tags.py
1
32247
# -*- coding: utf-8 -*- # Copyright 2010 Fabian Moser # Copyright 2011-2014 Jaap Karssenberg import gobject import gtk import pango import logging from zim.plugins import PluginClass, extends, WindowExtension from zim.gui.pageindex import PageTreeStore, PageTreeIter, PageTreeView, \ NAME_COL, PATH_COL, EMPTY_COL,...
gpl-2.0
1,718,784,003,087,782,100
30.399221
119
0.691165
false
3.145742
false
false
false
heyandie/django-qsstats-magic
qsstats/__init__.py
1
7034
__author__ = 'Matt Croydon, Mikhail Korobov, Pawel Tomasiewicz' __version__ = (0, 7, 0) from functools import partial import datetime from dateutil.relativedelta import relativedelta from dateutil.parser import parse from django.db.models import Count from django.db import DatabaseError, transaction from django.conf ...
bsd-3-clause
4,031,242,892,359,311,400
37.021622
99
0.589565
false
4.089535
false
false
false
yarnaid/psycho_test
psycho_test/settings.py
1
3757
""" Django settings for psycho_test project. Generated by 'django-admin startproject' using Django 1.9.6. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import o...
gpl-3.0
4,785,241,607,220,612,000
25.64539
91
0.693372
false
3.440476
false
false
false
jmartinm/inspire-next
inspire/modules/harvester/tasks/__init__.py
1
1539
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2014, 2015 CERN. # # INSPIRE 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...
gpl-2.0
-1,044,023,978,882,769,200
33.977273
78
0.721248
false
3.772059
false
false
false
adrn/streams
scripts/submit.py
1
4681
# coding: utf-8 """ Create and submit a job to the cluster given a streams config file. """ from __future__ import division, print_function __author__ = "adrn <adrn@astro.columbia.edu>" # Standard library import os, sys import logging from subprocess import Popen, PIPE import cStringIO as StringIO import yaml # Cr...
mit
-8,872,010,152,076,321,000
30
179
0.573595
false
3.522197
true
false
false
mxmaslin/Test-tasks
tests_python/Wargaming Forge Task/Username_task_1_src.py
1
1692
# -*- coding: utf-8 -*- import os from operator import itemgetter def closest(p, c, n): # выбираем из p и n, кто ближе к c try: ptup = p, teams[c] - teams[p] except KeyError: ptup = c, teams[c] try: ntup = n, teams[n] - teams[c] except KeyError: ntup = c, teams[c] ...
gpl-3.0
-4,939,634,655,291,112,000
26.288136
106
0.53354
false
2.927273
false
false
false
libyal/libcreg
tests/pycreg_test_support.py
1
3621
#!/usr/bin/env python # # Python-bindings support functions test script # # Copyright (C) 2013-2021, Joachim Metz <joachim.metz@gmail.com> # # Refer to AUTHORS for acknowledgements. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as ...
lgpl-3.0
-3,767,197,005,364,257,300
29.686441
77
0.705606
false
3.823654
true
false
false
deepmind/jax_verify
jax_verify/src/nonconvex_duals.py
1
25046
# coding=utf-8 # Copyright 2020 The jax_verify Authors. # # 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 la...
apache-2.0
3,330,927,620,808,200,000
40.466887
80
0.650244
false
3.383223
false
false
false
arokem/pyAFQ
AFQ/utils/tests/test_streamlines.py
2
4057
import os.path as op import numpy as np import numpy.testing as npt import nibabel as nib import nibabel.tmpdirs as nbtmp from AFQ.utils import streamlines as aus import dipy.tracking.utils as dtu import dipy.tracking.streamline as dts from dipy.io.stateful_tractogram import StatefulTractogram, Space def test_bundles...
bsd-2-clause
-8,935,996,251,178,177,000
43.108696
86
0.38033
false
3.515598
true
false
false
rs2/pandas
pandas/io/excel/_xlsxwriter.py
1
7909
from typing import Dict, List, Tuple import pandas._libs.json as json from pandas.io.excel._base import ExcelWriter from pandas.io.excel._util import validate_freeze_panes class _XlsxStyler: # Map from openpyxl-oriented styles to flatter xlsxwriter representation # Ordering necessary for both determinism an...
bsd-3-clause
1,335,923,263,812,707,600
32.371308
82
0.442407
false
4.331325
false
false
false
hMatoba/Piexif
piexif/_common.py
1
2590
import struct from ._exceptions import InvalidImageDataError def split_into_segments(data): """Slices JPEG meta data into a list from JPEG binary data. """ if data[0:2] != b"\xff\xd8": raise InvalidImageDataError("Given data isn't JPEG.") head = 2 segments = [b"\xff\xd8"] while 1: ...
mit
2,539,157,328,622,996,500
26.553191
69
0.519305
false
3.354922
false
false
false
brython-dev/brython
www/src/Lib/test/test_userdict.py
4
7744
# Check every path through every method of UserDict from test import mapping_tests import unittest import collections d0 = {} d1 = {"one": 1} d2 = {"one": 1, "two": 2} d3 = {"one": 1, "two": 3, "three": 5} d4 = {"one": None, "two": None} d5 = {"one": 1, "two": 1} class UserDictTest(mapping_tests.TestHashMappingProto...
bsd-3-clause
8,896,096,979,546,404,000
34.360731
90
0.5461
false
3.779405
true
false
false
HeraldStudio/webservice-py
mod/emptyroom/new_new_handler.py
1
2424
# -*- coding: utf-8 -*- import json, urllib import tornado.web import tornado.gen from datetime import date, timedelta from tornado.httpclient import AsyncHTTPClient, HTTPRequest import traceback class NewNewHandler(tornado.web.RequestHandler): def get(self): self.write('Herald Web Service') @tornado...
mit
28,707,944,265,570,976
43.888889
102
0.49835
false
4.608365
false
false
false
robwarm/gpaw-symm
doc/documentation/xc/s22_test.py
1
1509
import sys from ase import * from ase.parallel import paropen from ase.data.s22 import data, s22 from ase.calculators.vdwcorrection import vdWTkatchenko09prl from gpaw import * from gpaw.cluster import Cluster from gpaw.analyse.hirshfeld import HirshfeldDensity, HirshfeldPartitioning from gpaw.analyse.vdwradii import v...
gpl-3.0
9,142,085,672,902,052,000
31.106383
74
0.620941
false
2.445705
false
false
false
NexTVTeam/hbbtv-plugin
HbbTV/hbbtv.py
1
3321
from Screens.Screen import Screen from Components.ActionMap import ActionMap from enigma import eTimer import os, struct, vbcfg from vbipc import VBController class HbbTVWindow(Screen): skin = """ <screen name="HbbTVWindow" position="0,0" size="1280,720" backgroundColor="transparent" flags="wfNoBorder" title="Hbb...
lgpl-2.1
-1,640,176,830,540,437,500
26.907563
130
0.668774
false
2.790756
false
false
false
lnls-fac/collective_effects
pycolleff/pycolleff/sirius_hc.py
1
3061
#!/usr/bin/env python-sirius import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import sys import mathphys as _mp import simulate_landau as landau_cav c = _mp.constants.light_speed def main(): ring = landau_cav.Ring() # Sirius ring.E0 = 3e9 ring.nom_cur = 350e...
mit
6,399,122,000,002,394,000
25.850877
77
0.54786
false
2.602891
false
false
false
monk-ee/puppetdb-python
puppetdb/v2/nodes.py
1
3314
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2013 Arcus, Inc. # # 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 #...
mit
-5,458,084,079,127,352,000
33.164948
99
0.690404
false
3.578834
false
false
false
rishig/zulip
zerver/lib/feedback.py
1
2665
from django.conf import settings from django.core.mail import EmailMessage from typing import Any, Mapping, Optional from zerver.lib.actions import internal_send_message from zerver.lib.send_email import FromAddress from zerver.lib.redis_utils import get_redis_client from zerver.models import get_system_bot import t...
apache-2.0
-3,259,584,417,288,743,400
37.623188
96
0.642402
false
3.596491
false
false
false
strubell/Parser
lib/rnn_cells/base_cell.py
1
2534
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2016 Timothy Dozat # # 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
-6,182,647,582,745,570,000
33.712329
108
0.575375
false
4.18843
false
false
false
sjdv1982/seamless
docs/archive/slash/parse_slash0_utils.py
1
2425
import re quote_match = re.compile(r'(([\"\']).*?\2)') double_quote = re.compile(r'(\A|[^\\])\"') single_quote = re.compile(r"(\A|[^\\])\'") doc_name = re.compile(r'^[A-Za-z_][A-Za-z0-9_/]*$') token_separators=r'(?P<sep1>[\s]+)|[\s](?P<sep2>2>)[^&][^1]|[\s](?P<sep3>!>)[\s]|[\s](?P<sep4>2>&1)|(?P<sep5>(?<![2!])>)|(?P<se...
mit
1,262,014,449,949,030,700
39.416667
136
0.581856
false
3.429986
false
false
false
beeftornado/sentry
src/sentry/models/groupsubscription.py
1
6863
from __future__ import absolute_import from django.conf import settings from django.db import IntegrityError, models, transaction from django.db.models import Q from django.utils import timezone from sentry.db.models import ( BaseManager, BoundedPositiveIntegerField, FlexibleForeignKey, Model, san...
bsd-3-clause
-1,947,804,583,507,867,600
32.315534
100
0.600612
false
4.494434
false
false
false
ChuanleiGuo/AlgorithmsPlayground
LeetCodeSolutions/python/76_Minimum_Window_Substring.py
1
1277
class Solution(object): def minWindow(self, s, t): """ :type s: str :type t: str :rtype: str """ begin, end = 0, 0 min_begin, min_end = 0, 0 min_size = float('inf') need_find = {} found = {} for c in t: need_find[c] ...
mit
-7,023,012,057,661,462,000
29.404762
74
0.397807
false
3.557103
false
false
false
annndrey/npui-unik
netprofile_ipaddresses/netprofile_ipaddresses/__init__.py
1
2901
#!/usr/bin/env python # -*- coding: utf-8; tab-width: 4; indent-tabs-mode: t -*- # # NetProfile: IP addresses module # © Copyright 2013-2014 Alex 'Unik' Unigovsky # # This file is part of NetProfile. # NetProfile is free software: you can redistribute it and/or # modify it under the terms of the GNU Affero General Publ...
agpl-3.0
1,859,566,080,437,848,000
22.015873
78
0.706207
false
3.179825
false
false
false
CryptoManiac/electrum-nvc
gui/android.py
1
31276
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2011 thomasv@gitorious # # 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...
gpl-3.0
1,227,546,001,268,356,900
29.424125
194
0.557904
false
4.094253
false
false
false
zhlinh/leetcode
0003.Longest Substring Without Repeating Characters/solution.py
1
1047
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' ***************************************** Author: zhlinh Email: zhlinhng@gmail.com Version: 0.0.1 Created Time: 2016-01-05 Last_modify: 2016-01-05 ****************************************** ''' ''' Given a string, find the length of the lon...
apache-2.0
3,627,866,095,556,254,000
27.297297
63
0.501433
false
3.610345
false
false
false
dangu/nes_game
src/generateSoundData.py
1
11474
def writeBinary(filename): """Writes binary data to file""" f1=open(filename, 'w') for x in range(8192): f1.write(chr((x*3)&0xFF)) f1.close() def writeTestPalette(filename): """Write a test palette (20 bytes) lda #$01 lda #$02 lda #$03 lda #$04 lda #$05 lda #$06 lda #$07 lda #$08 ...
gpl-3.0
-3,254,924,269,458,319,000
32.75
122
0.494509
false
3.224845
true
false
false
jleclanche/bugzilla-to-github
xmlrpc_download.py
1
2598
#!/usr/bin/env python """ Connect to a bugzilla xml-rpc.cgi and download all the things. This exports products, bugs, comments and bug history to a "bugzilla.json" output file which can in turn be used to quickly import things to a different format. """ import json import sys import xmlrpc.client # Edit these to you...
mit
-8,742,910,421,061,512,000
25.510204
89
0.688607
false
3.149091
false
false
false
BoomButton/DF-BAMM
src/bamm/common/parsing.py
1
5257
''' Created on May 21, 2015 @author: Button ''' from src.bamm.common import config import re import traceback ascii_codes = None userlog = config.userlog modderslog = config.modderslog def _load_ascii_conversions(ascii_file): """Load ASCII conversions from file. The file is structured as a .property file...
agpl-3.0
-8,795,052,315,464,268,000
37.372263
79
0.600723
false
4.294935
false
false
false
nmc-probe/emulab-nome
protogeni/test/stitch.py
1
10003
#! /usr/bin/env python # # Copyright (c) 2008-2012 University of Utah and the Flux Group. # # {{{GENIPUBLIC-LICENSE # # GENI Public License # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without rest...
agpl-3.0
-6,926,078,632,628,024,000
28.859701
80
0.613416
false
3.530886
false
false
false
kupuguy/mg
SampleStatusHistory/SampleStatusHistory/tests/SampleStatushistoryTests.py
1
5985
# Copyright (c) 2014, Duncan Booth # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and t...
bsd-3-clause
-3,036,616,602,388,525,600
40.853147
90
0.558229
false
3.662791
true
false
false
seslab/MIPVC
HarmGen/HarmGen.py
1
1610
#!/usr/bin/env python # -*- coding: utf-8 -*- # -*- coding: utf-850 -*- #Titulo :HarmGen.py #Descripción :Biblioteca para la generación de vectores de señales con armonicas. #Autor :Javier Campos Rojas #Fecha :Junio-2017 #Versión :1.0 #Notas : #=============================...
gpl-3.0
-899,932,597,048,497,400
23.692308
92
0.565109
false
1.981481
false
false
false
smurfix/HomEvenT
homevent/base.py
1
3807
# -*- coding: utf-8 -*- ## ## Copyright © 2007-2012, Matthias Urlichs <matthias@urlichs.de> ## ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at...
gpl-3.0
2,617,710,084,144,590,300
25.767606
89
0.642463
false
2.962588
false
false
false
ployground/ploy_virtualbox
setup.py
1
1216
from setuptools import setup import os here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.rst')).read() HISTORY = open(os.path.join(here, 'HISTORY.rst')).read() version = "1.2.1.dev0" setup( version=version, description="Plugin for ploy to provision virtual machines...
bsd-3-clause
6,762,444,998,633,661,000
29.4
82
0.623355
false
3.619048
false
false
false
katrid/keops
keops/api/views/rpc.py
1
2990
import json from django.shortcuts import render from django.conf import settings from django.http import JsonResponse from django.db import models from django.core import exceptions from django.db.utils import IntegrityError from django.contrib.auth.decorators import login_required from keops.api.services import ViewS...
bsd-3-clause
4,315,749,456,939,318,300
38.342105
107
0.508027
false
4.320809
false
false
false
sara-nl/opennaas-dc-gui
opennaas_manager.py
1
13590
#!/usr/bin/python # Copyright (c) 2014, Erik Ruiter, SURFsara BV, Amsterdam, The Netherlands # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the ...
apache-2.0
6,549,476,206,768,126,000
43.703947
223
0.709934
false
3.02875
false
false
false
ulif/pulp
server/pulp/plugins/util/metadata_writer.py
4
16961
from gettext import gettext as _ import glob import gzip import logging import os import shutil import traceback from xml.sax.saxutils import XMLGenerator from pulp.common import error_codes from pulp.server.exceptions import PulpCodedValidationException, PulpCodedException from pulp.server.util import CHECKSUM_FUNC...
gpl-2.0
-1,971,907,027,029,194,800
37.635535
100
0.583515
false
4.271216
false
false
false
nditech/elections
apollo/participants/utils.py
1
1081
from apollo import services def update_participant_completion_rating(participant): forms = services.forms.find(form_type='CHECKLIST') submissions = services.submissions.find( contributor=participant, form__in=forms, submission_type='O' ) numerator = 0 denominator = 0 c...
gpl-3.0
-7,611,908,437,965,738,000
28.216216
71
0.590194
false
4.6
false
false
false
orbitinstasis/pifun
continuous_recordings_tester.py
1
2870
#!/usr/bin/env python3 # call with python3 # test [1] times; stream from [2]; play on [3] import os import time import sys import threading import saleae # from gtts import gTTS # TEST_SECONDS = 10 TEST_LOOPS = int(sys.argv[1]) TTY_SOURCE = "/dev/" + str(sys.argv[2]) TTY_DESTINATION = "/dev/" + str(sys.argv[3]) TT...
gpl-3.0
3,837,845,235,144,074,000
25.574074
100
0.669686
false
2.557932
true
false
false
mrjimenez/JTAG
extras/python/Uploader.py
1
4930
#!/usr/bin/python3 # coding: utf-8 import os import string import sys import time try: import serial except ImportError: print("Error importing pyserial. Please check if it is installed.") sys.exit(1) class Uploader(object): """Uploads a XSVF file to the arduino board. """ # Create a transl...
bsd-2-clause
7,011,194,952,468,164,000
31.222222
83
0.486207
false
4.027778
false
false
false
oVirt/ovirt-hosted-engine-setup
src/plugins/gr-he-common/network/gateway.py
1
3548
# # ovirt-hosted-engine-setup -- ovirt hosted engine setup # Copyright (C) 2013-2019 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.1 of the License, o...
lgpl-2.1
-8,138,350,650,244,593,000
27.845528
78
0.578072
false
4.208778
false
false
false
mdasifhasan/Experiments_HTN_Planner
PyHop/pyhop.py
1
9847
""" Pyhop, version 1.2.2 -- a simple SHOP-like planner written in Python. Author: Dana S. Nau, 2013.05.31 Copyright 2013 Dana S. Nau - http://www.cs.umd.edu/~nau 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 c...
gpl-3.0
8,083,552,663,818,885,000
39.191837
120
0.639078
false
3.896715
false
false
false
YuanYuLin/iopcbs
BuildRoot/BuildRootCommandHandler_Prepare.py
1
4713
import os import shutil from DefconfigParser import DefconfigParser from BuildRootCommandHandler import BuildRootCommandHandler from ScriptBuilder import ScriptBuilder class BuildRootCommandHandler_Prepare(BuildRootCommandHandler): def __init__(self, next_command_handler): BuildRootCommandHandler.__init__(...
gpl-2.0
-8,869,341,640,128,807,000
38.940678
113
0.610651
false
3.687793
true
false
false
petermlm/ProbPy
tests/test_base.py
1
2268
from ProbPy import RandVar, Factor class TestBase: def __init__(self): # Scalars self.scalar = 10 self.scalarf = Factor([], [10]) # Binary variables self.X = RandVar("X", ["T", "F"]) self.Y = RandVar("Y", ["T", "F"]) self.Z = RandVar("Z", ["T", "F"]) ...
mit
3,184,444,580,707,223,600
36.8
75
0.525573
false
2.810409
false
false
false
simgunz/anki
qt/aqt/progress.py
1
7938
# Copyright: Ankitects Pty Ltd and contributors # License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html from __future__ import annotations import time from typing import Callable, Optional import aqt.forms from aqt.qt import * from aqt.utils import TR, disable_help_button, tr # Progress info #...
agpl-3.0
-4,262,308,446,230,237,000
31.801653
153
0.546485
false
4.202223
false
false
false
wackerly/faucet
faucet/faucet_dot1x.py
1
2989
"""802.1x implementation for FAUCET.""" # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer. # Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd. # Copyright (C) 2015--2017 The Contributors # # Licensed under the...
apache-2.0
-77,410,599,712,950,910
37.818182
81
0.632653
false
3.583933
false
false
false