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
BIGBALLON/cifar-10-cnn
1_Lecun_Network/LeNet_dp_da_keras.py
1
2768
import keras import numpy as np from keras import optimizers from keras.datasets import cifar10 from keras.models import Sequential from keras.layers import Conv2D, Dense, Flatten, MaxPooling2D from keras.callbacks import LearningRateScheduler, TensorBoard from keras.preprocessing.image import ImageDataGenerator batch...
mit
3,954,853,176,698,592,000
34.948052
125
0.629697
false
3.279621
true
false
false
dvitme/odoo-addons
account_journal_active/__openerp__.py
1
1665
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Pu...
agpl-3.0
4,938,042,566,009,594,000
36
78
0.582583
false
4.193955
false
false
false
shoopio/shoop
shuup_tests/core/test_staff_only_behavior.py
2
1384
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2019, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. import pytest from shuup.core.models import StaffOnlyBehaviorComp...
agpl-3.0
402,841,234,374,912,600
34.487179
84
0.757225
false
3.585492
true
false
false
jurcicek/extended-hidden-vector-state-parser
semantics-4/src/extractSmntcs.py
1
5995
#!//usr/bin/python # -*- coding: UTF-8 -*- import sys import getopt import os from os.path import * import glob from xml.dom import minidom import re import struct import codecs from StringIO import StringIO import toolkit from lexMap import * from observation import * from semantics import * ######################...
gpl-2.0
7,174,789,359,113,882,000
29.431472
134
0.541618
false
3.364198
false
false
false
xArm-Developer/xArm-Python-SDK
example/wrapper/common/6002-set_fense_mode.py
1
1032
#!/usr/bin/env python3 # Software License Agreement (BSD License) # # Copyright (c) 2019, UFACTORY, Inc. # All rights reserved. # # Author: Vinman <vinman.wen@ufactory.cc> <vinman.cub@gmail.com> """ Example: Set reduced mode """ import os import sys import time sys.path.append(os.path.join(os.path.dirname(__file__), ...
bsd-3-clause
4,424,884,146,129,369,000
24.170732
79
0.659884
false
2.680519
false
true
false
Dob3r/python_training
test/test_add_contact.py
1
1462
# -*- coding: utf-8 -*- from model.contact import * import re import pytest # фикстуры теста def test_add_contact(app, db, json_contacts_personinfo, json_contacts_contactinfo, check_ui): personinfo = json_contacts_personinfo contactinfo = json_contacts_contactinfo with pytest.a...
apache-2.0
1,430,926,938,501,349,000
54.730769
134
0.655625
false
3.568966
false
false
false
ahtn/keyplus
host-software/keyplus_flasher.py
1
55673
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2017 jem@seethis.link # Licensed under the MIT license (http://opensource.org/licenses/MIT) if 1: # PyQt <-> PySide signal compatability from PyQt5.QtCore import pyqtSlot, pyqtSignal Signal = pyqtSignal Slot = pyqtSlot # TODO: narrow down...
mit
-2,441,344,759,572,484,000
35.650428
113
0.566425
false
4.222054
false
false
false
jwheare/digest
digestfetch.py
1
8721
#!/usr/bin/env python # encoding: utf-8 """ digestfetch.py Fetch bitesize content from the world of the web for use in a daily digest pocketmod """ import sitecustomize # Builtin modules from copy import copy from operator import itemgetter import re import time, datetime import urllib, urllib2, httplib # 3rd party ...
bsd-3-clause
129,340,220,176,838,940
35.333333
134
0.586076
false
3.748495
false
false
false
nathandaddio/puzzle_app
puzzle_app/puzzle_app/tests/views/test_hitori_views.py
1
2961
import pytest from pyramid.exceptions import HTTPNotFound from puzzle_app.views.hitori import hitori_boards_get, hitori_board_get from factories import ( HitoriGameBoardFactory, HitoriGameBoardCellFactory ) class TestHitoriGameBoardsGet: @pytest.fixture def board(self, db_session): board ...
mit
-679,452,647,291,838,200
31.538462
112
0.572442
false
3.890933
true
false
false
hamptus/mftpy
mftpy/mft.2.7/tools/extract.py
1
2716
""" This tool is used to extract MFT entries """ from mft.meta.boot import BootFile # FIXME pass an argument to function so it knows if you are extracting from disk or partition def extract_meta(partition=None): """ Extract the system meta files from a partition """ bootdata = open(partition, 'rb')....
gpl-3.0
-3,401,636,057,831,053,300
28.532609
93
0.592415
false
3.583113
false
false
false
iblis17/ultisnips
pythonx/UltiSnips/snippet_manager.py
1
31801
#!/usr/bin/env python # encoding: utf-8 """Contains the SnippetManager facade used by all Vim Functions.""" from collections import defaultdict from functools import wraps import os import platform import traceback import sys import vim import re from contextlib import contextmanager from UltiSnips import _vim from ...
gpl-3.0
-1,496,026,489,278,379,300
37.876528
102
0.550612
false
4.106004
false
false
false
squirrelo/qiita
qiita_db/support_files/patches/python_patches/36.py
1
4367
from random import SystemRandom from string import ascii_letters, digits from os.path import exists, join, basename from tarfile import open as taropen from qiita_db.sql_connection import TRN from qiita_db.artifact import Artifact from qiita_db.util import (insert_filepaths, convert_to_id, get_mountpoint, ...
bsd-3-clause
80,426,027,892,343,820
37.646018
79
0.553927
false
3.742074
false
false
false
jbrt/Array-XRay
arrays/vmax/vmax_filters.py
1
8430
#!/usr/bin/env python3 # coding: utf-8 """ These objects are going to filter the input data and only keep the interesting attributes. Convert of capacity units may be occur to stay more consistent between arrays. """ import abc from collections import OrderedDict class VMAXFilter(object, metaclass=abc.ABCMeta): ...
lgpl-3.0
7,532,903,142,512,456,000
28.683099
84
0.514472
false
3.913649
false
false
false
rodo/django-perf
foo/loader/management/commands/delete_all.py
1
1510
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2013,2014 Rodolphe Quiédeville <rodolphe@quiedeville.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, either ver...
gpl-3.0
7,131,998,719,166,199,000
31.804348
75
0.644135
false
4.034759
false
false
false
Snesi/spindl
spindl_lib/charter.py
1
14820
#!/usr/bin/python # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- ### BEGIN LICENSE # Copyright (C) 2013 <Zane Swafford> <zane@zaneswafford.com> # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtai...
apache-2.0
3,887,523,004,389,163,500
36.616751
122
0.661673
false
3.035019
false
false
false
alphageek-xyz/site
landing/models.py
1
1448
import re from django.db import models from django.utils.functional import cached_property from landing.utils import markup_markdown class ServiceManager(models.Manager): def last_modified(self): return self.latest('modified').modified class Service(models.Model): objects = ServiceManager() class...
bsd-3-clause
4,994,768,989,417,415,000
21.984127
62
0.561464
false
4.101983
false
false
false
Brazelton-Lab/bio_utils
bio_utils/blast_tools/retrieve_query_sequences.py
1
6139
#! /usr/bin/env python3 """Returns query sequence from BLAST hits below a specified E-Value Usage: retrieve_query_sequences.py --fastqq <FASTA or FASTQ file> --b6 <B6 or M8 file> --e_value <max E-Value> --output <output file> [--fastq] Copyright: ...
gpl-3.0
-6,015,530,829,959,466,000
37.85443
78
0.567356
false
4.278049
true
false
false
Juanlu001/pfc
demo/plot_h.py
1
6084
#****************************************************************************** # * # * ** * * * * * # * * * * * * * * * * ...
gpl-3.0
-2,502,239,996,282,733,000
40.671233
84
0.404832
false
4.11916
false
false
false
mpdehaan/interfacer
lib/interfacer/base_module.py
1
4701
# # Copyright (c) rPath, 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 # to use, copy, modify, merge, publish, distribute...
mit
-5,573,441,767,861,178,000
29.72549
79
0.610508
false
4.468631
false
false
false
pf4d/dolfin-adjoint
dolfin_adjoint/functionassigner.py
1
8559
import backend import utils import adjglobals import solving import libadjoint import adjlinalg if hasattr(backend, 'FunctionAssigner'): class FunctionAssigner(backend.FunctionAssigner): def __init__(self, *args, **kwargs): super(FunctionAssigner, self).__init__(*args, **kwargs) #...
lgpl-3.0
4,858,557,293,485,351,000
44.047368
132
0.570043
false
4.441619
false
false
false
pythonegrove/django-paypal-advanced
paypal_advanced/simple/satchmo_store/shop/urls.py
1
2010
from django.conf.urls import patterns, include from django.views.generic.base import TemplateView from product.urls import urlpatterns as productpatterns from satchmo_store import shop from satchmo_store.shop.views.sitemaps import sitemaps from signals_ahoy.signals import collect_urls urlpatterns = shop.get_satchmo_se...
gpl-2.0
-1,171,201,966,016,347,000
45.744186
94
0.649254
false
3.165354
false
true
false
ftomassetti/polito_information_systems_python
forms/example_2.py
1
1451
from flask import Flask,request app = Flask("My app with forms") app.debug = True @app.route('/register') def show_registration_form(): # VIEW response = '<html>' response += ' <h1>Registration form</h1>' response += ' <form name="registration" action="submit_registration_form" method="post">' response += ' ...
mit
-4,677,855,903,865,515,000
32
91
0.651275
false
3.358796
false
false
false
adhoc-dev/odoo-support
database_tools/controllers/db.py
1
3497
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## import openerp.http as http import base64 from ope...
lgpl-3.0
1,212,645,063,182,023,400
38.292135
78
0.519302
false
4.033449
false
false
false
orione7/Italorione
channels/italiafilm.py
1
10226
# -*- coding: iso-8859-1 -*- # ------------------------------------------------------------ # streamondemand.- XBMC Plugin # Canal para italiafilm # http://blog.tvalacarta.info/plugin-xbmc/streamondemand. # ------------------------------------------------------------ import re import sys import urlparse from core impo...
gpl-3.0
-563,026,776,734,839,230
36.043478
167
0.523181
false
3.887452
false
false
false
joshbohde/xbmc-notify-mqtt
script.service.notify-mqtt/resources/lib/mosquitto.py
1
80746
# Copyright (c) 2012,2013 Roger Light <roger@atchoo.org> # 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 lis...
gpl-3.0
-2,793,891,788,604,565,500
37.838865
177
0.576487
false
4.146136
false
false
false
rowinggolfer/openmolar2
src/lib_openmolar/admin/db_orm/admin_treatment_fills.py
1
2596
#! /usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### ## ## ## Copyright 2010-2012, Neil Wallace <neil@openmolar.com> ## ## ...
gpl-3.0
-5,667,056,196,690,912,000
40.206349
79
0.485747
false
4.677477
false
false
false
sparcs-kaist/otlplus
apps/timetable/models.py
1
2296
# -*- coding: utf-8 from django.db import models from apps.subject.models import * from apps.session.models import * class Timetable(models.Model): lectures = models.ManyToManyField(Lecture) user = models.ForeignKey(UserProfile, related_name="timetables", on_delete=models.CASCADE, db_index=True) year = mo...
mit
-2,339,086,303,903,504,400
35.290323
109
0.647111
false
3.571429
false
false
false
mattzjack/zumazuma
ball.py
1
3069
import pygame, math class Ball(pygame.sprite.Sprite): SPEED = 50 @staticmethod def load_images(): Ball.images = list() for filename in ['red', 'blue', 'green', 'purple']: img = pygame.image.load('./imgs/%s.png' % filename).convert_alpha() w = h = 50 scal...
mit
7,356,096,171,524,575,000
32.725275
109
0.521994
false
3.503425
false
false
false
GuLinux/PySpectrum
object_properties_dialog.py
1
4596
from astroquery.simbad import Simbad from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QMessageBox from pyui.object_properties_dialog import Ui_ObjectPropertiesDialog import re from PyQt5.QtCore import Qt, QObject, pyqtSignal, QDateTime from astropy.coordinates import SkyCoord from astropy import units as u from o...
gpl-3.0
-3,974,008,705,083,228,000
51.83908
170
0.665144
false
3.565555
false
false
false
awlange/brainsparks
src/calrissian/layers/octree/octree.py
1
10430
from .box import Box import numpy as np from numba import jit class Octree(object): """ Octree implementation to be used in particle dipole networks """ def __init__(self, max_level=3, p=0, n_particle_min=20, mac=0.0, cut=1000.0): self.max_level = max_level self.p = p self.n_...
mit
-6,466,002,918,379,131,000
32.322684
163
0.501055
false
3.762626
false
false
false
SitiBanc/1061_NCTU_IOMDS
1025/Homework 5/HW5_5.py
1
5472
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Oct 26 21:05:37 2017 @author: sitibanc """ import pandas as pd import numpy as np import matplotlib.pyplot as plt # ============================================================================= # Read CSV # =============================================...
apache-2.0
-2,130,665,955,972,406,000
46.831579
114
0.382923
false
2.249505
false
false
false
chiara-paci/baskerville
baskervilleweb/classification/migrations/0001_initial.py
1
9739
# Generated by Django 3.0.2 on 2020-02-21 10:11 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('contenttypes', '0002_remove_content_type_name'), ] operations = [ migrations.CreateMode...
gpl-3.0
-3,961,106,978,185,213,400
46.740196
147
0.557039
false
4.847685
false
false
false
mattseymour/django
tests/forms_tests/tests/test_forms.py
1
169808
import copy import datetime import json import uuid from django.core.exceptions import NON_FIELD_ERRORS from django.core.files.uploadedfile import SimpleUploadedFile from django.core.validators import MaxValueValidator, RegexValidator from django.forms import ( BooleanField, CharField, CheckboxSelectMultiple, Choi...
bsd-3-clause
5,698,543,628,900,907,000
45.664009
131
0.589664
false
3.771573
true
false
false
verleihtool/verleihtool
rental/models.py
1
4155
import uuid from datetime import datetime from django.db import models from django.core.exceptions import ValidationError from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from depot.models import Depot, Item class Rental(models.Model): """ A rental defines th...
agpl-3.0
-2,842,070,960,775,333,000
37.119266
87
0.637545
false
4.163327
false
false
false
franklingu/leetcode-solutions
questions/k-diff-pairs-in-an-array/Solution.py
1
1244
""" Given an array of integers nums and an integer k, return the number of unique k-diff pairs in the array. A k-diff pair is an integer pair (nums[i], nums[j]), where the following are true: 0 <= i, j < nums.length i != j a <= b b - a == k Example 1: Input: nums = [3,1,4,1,5], k = 2 Output: 2 Explanation: There ...
mit
3,579,186,487,501,100,500
20.824561
104
0.550643
false
2.704348
false
false
false
WillianPaiva/1flow
oneflow/core/tasks/reprocess.py
1
4470
# -*- coding: utf-8 -*- u""" Copyright 2013-2014 Olivier Cortès <oc@1flow.io>. This file is part of the 1flow project. 1flow is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License...
agpl-3.0
-9,070,102,631,910,603,000
33.099237
79
0.650996
false
4.013477
false
false
false
Linutux/Gourmet
gourmet/plugins/unit_converter/convertGui.py
1
7209
import gourmet.convert as convert import gtk from gourmet.gglobals import * from gourmet.gdebug import * from gourmet.gtk_extras.cb_extras import * import gourmet.GourmetRecipeManager from gettext import gettext as _ import os try: current_path = os.path.split(os.path.join(os.getcwd(),__file__))[0] except: cur...
gpl-2.0
-7,973,357,861,095,710,000
38.179348
120
0.588292
false
3.618976
false
false
false
tbonza/GatherNews
build/lib/gathernews/parse.py
1
2192
""" Handle parsing the RSS feed. """ from datetime import datetime import logging import re import feedparser from gathernews.template import ITEM logger = logging.getLogger(__name__) def get_source(fp: feedparser.FeedParserDict()) -> str: try: return fp['feed']['title_detail']['base'] except Exce...
mit
-8,883,725,729,761,146,000
23.355556
71
0.595347
false
3.617162
false
false
false
rajashreer7/autotest-client-tests
linux-tools/nscd/nscd.py
3
1545
#!/bin/python import os, subprocess import logging from autotest.client import test from autotest.client.shared import error, software_manager sm = software_manager.SoftwareManager() class nscd(test.test): """ Autotest module for testing basic functionality of nscd @author """ version = 1 ...
gpl-2.0
-6,694,936,527,481,759,000
26.589286
81
0.552104
false
4.012987
true
false
false
raqqun/tweetcommander
packages/oauthlib/oauth2/ext/django.py
1
5068
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from django.http import HttpResponseRedirect, HttpResponse, HttpResponseForbidden from django.views.decorators.csrf import csrf_exempt import functools import logging from oauthlib.common import urlencode from oauthlib.oauth2.draft25 impor...
gpl-3.0
8,168,492,034,231,814,000
44.25
104
0.598066
false
4.63678
false
false
false
SEMAFORInformatik/femagtools
examples/model-creation/stator1-magnetIronV.py
1
1583
import femagtools def create_fsl(): machine = dict( name="PM 130 L4", lfe=0.1, poles=4, outer_diam=0.13, bore_diam=0.07, inner_diam=0.015, airgap=0.001, stator=dict( num_slots=12, stator1=dict( slot_rf1=0.057,...
bsd-2-clause
5,439,394,220,098,400,000
24.532258
65
0.460518
false
3.32563
false
false
false
Erotemic/ibeis
ibeis/algo/graph/tests/test_graph_iden.py
1
5170
import utool as ut from ibeis.algo.graph import demo from ibeis.algo.graph.state import (POSTV, NEGTV, INCMP, UNREV) def test_incomp_inference(): infr = demo.demodata_infr(num_pccs=0) # Make 2 consistent and 2 inconsistent CCs infr.add_feedback(( 1, 2), POSTV) infr.add_feedback(( 2, 3), POSTV) i...
apache-2.0
7,434,031,815,099,311,000
34.170068
91
0.604836
false
2.769148
true
false
false
ZhaoYonggang198/xpdiff
default_visitor.py
1
1875
try: import xml.etree.cElementTree as ET except ImportError: import xml.etree.ElementTree as ET def element_to_string(element): return ET.tostring(element).replace("\r", "").replace("\n", "").replace("\t", "") class StdVisitor: def out(self, path, op, content): print("\t\t\t".join(["".join([e.tag for e in...
gpl-2.0
-1,052,354,106,352,850,300
35.057692
144
0.695467
false
3.16723
false
false
false
tyb0807/angr
angr/analyses/datagraph_meta.py
1
3365
import logging from ..sim_procedure import SimProcedure l = logging.getLogger("angr.analyses.datagraph_meta") class DataGraphMeta(object): def __init__(self): self._p = None def _irsb(self, in_state): """ We expect a VSA state here. """ return self._p.factory.success...
bsd-2-clause
4,330,097,198,174,246,000
32.316832
109
0.539079
false
3.527254
false
false
false
timgraham/django-cms
cms/utils/__init__.py
1
3222
# -*- coding: utf-8 -*- # TODO: this is just stuff from utils.py - should be splitted / moved from django.conf import settings from django.core.files.storage import get_storage_class from django.utils.functional import LazyObject from cms import constants from cms.utils.conf import get_cms_setting from cms.utils.conf ...
bsd-3-clause
-981,943,898,858,118,300
37.357143
102
0.678461
false
4.012453
false
false
false
Avanish14/SmartModem
AMrx.py
1
3114
#!/usr/bin/env python2 # -*- coding: utf-8 -*- ################################################## # GNU Radio Python Flow Graph # Title: Amrx # Generated: Tue Aug 8 20:51:18 2017 ################################################## from gnuradio import analog from gnuradio import blocks from gnuradio import eng_notatio...
mit
3,089,442,554,736,402,000
32.847826
159
0.513487
false
3.384783
false
false
false
flgiordano/netcash
+/google-cloud-sdk/lib/surface/bigtable/clusters/create.py
1
2807
# Copyright 2015 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...
bsd-3-clause
-3,217,356,276,089,724,400
34.0875
79
0.688279
false
4.085881
false
false
false
borysf/SublimeGerrit
core/change_view.py
1
35778
""" SublimeGerrit - full-featured Gerrit Code Review for Sublime Text Copyright (C) 2015 Borys Forytarz <borys.forytarz@gmail.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of...
gpl-2.0
-7,675,779,269,582,515,000
34.284024
167
0.530829
false
4.245135
false
false
false
lduarte1991/edx-platform
openedx/core/djangoapps/content/block_structure/block_structure.py
1
30213
""" Module with family of classes for block structures. BlockStructure - responsible for block existence and relations. BlockStructureBlockData - responsible for block & transformer data. BlockStructureModulestoreData - responsible for xBlock data. The following internal data structures are implemented: ...
agpl-3.0
4,509,966,314,693,648,000
34.797393
112
0.61884
false
4.685639
false
false
false
markope/AutobahnPython
autobahn/wamp/protocol.py
1
57431
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # 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 with...
mit
-1,728,182,212,145,266,200
42.14876
184
0.517195
false
4.992264
false
false
false
Statistica/676-candidates
candidates_by_party_greater_100k.py
1
1686
# -*- coding: utf-8 -*- # Written by Jonathan Saewitz, released May 24th, 2016 for Statisti.ca # Released under the MIT License (https://opensource.org/licenses/MIT) import csv, plotly.plotly as plotly, plotly.graph_objs as go, requests from collections import Counter from bs4 import BeautifulSoup #the following cand...
mit
5,861,080,122,107,225,000
26.16129
144
0.69715
false
2.45481
false
false
false
bat-serjo/vivisect
vivisect/qt/main.py
1
19470
import os import sys import vstruct.qt as vs_qt import envi.expression as e_expr import envi.qt.config as e_q_config import vqt.main as vq_main import vqt.colors as vq_colors import vqt.qpython as vq_python import vqt.application as vq_app import vivisect.cli as viv_cli import vivisect.base as viv_base import vivise...
apache-2.0
4,351,268,125,491,112,400
37.251473
99
0.632922
false
3.406228
true
false
false
rusucosmin/courses
ubb/algebra/sort_partial.py
1
2185
import urllib2 import operator import os from bs4 import BeautifulSoup class Student: def __init__(self, name, grade): self._name = name self._grade = grade def __repr__(self): return self._name + " " + str(self._grade) if not os.path.exists('partial.html'): response = urllib2.urlopen('https://docs.google....
mit
-1,714,788,340,226,504,700
24.705882
123
0.652632
false
2.619904
false
false
false
atiberghien/makerscience-server
makerscience_profile/migrations/0002_auto__add_field_makerscienceprofile_activity__add_field_makersciencepr.py
1
6258
# -*- 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 'MakerScienceProfile.activity' db.add_column(u'makerscienc...
agpl-3.0
-5,486,581,171,599,004,000
66.301075
195
0.57047
false
3.689858
false
false
false
sharad/calibre
src/calibre/gui2/metadata/diff.py
1
22039
#!/usr/bin/env python # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>' import os from collections import OrderedDict, namedtuple from functools impo...
gpl-3.0
-7,149,461,798,197,517,000
33.816746
142
0.568084
false
3.671943
false
false
false
sljrobin/listodo
listodo.py
1
2521
#!/usr/bin/python # -*- coding: utf-8 -*- import collections import os import re import sys from colorama import init from colorama import Fore, Back, Style init() ########################################################################################## PATTERN_01 = r'# TODO' #####################################...
gpl-2.0
-883,525,310,071,355,800
28.647059
125
0.441667
false
4.359862
false
false
false
wichmann/PythonExamples
network/bot.py
1
1620
#!/usr/bin/env python3 #------------------------------------------------------------------------------- # Name: bot - simple example for a telegram bot # Usage: ./bot.py # Author: Christian Wichmann # Created: 13.06.2019 # Copyright: (c) Christian Wichmann 2019 # Licence: GNU GPL #--...
gpl-2.0
-6,965,951,586,369,869,000
34.704545
103
0.639628
false
3.123791
false
false
false
RogueProeliator/IndigoPlugin-TiVo-Network-Remote
TiVo Network Remote.indigoPlugin/Contents/Server Plugin/plugin.py
1
10778
#! /usr/bin/env python # -*- coding: utf-8 -*- #///////////////////////////////////////////////////////////////////////////////////////// #///////////////////////////////////////////////////////////////////////////////////////// # TiVo Network Remote Control by RogueProeliator <rp@rogueproeliator.com> # Indigo plugin ...
mit
-6,557,693,221,188,826,000
41.105469
172
0.518556
false
3.854793
false
false
false
askinteractive/mezzanine-advanced-admin
test_mezzanine_advanced_admin/test_mezzanine_advanced_admin/settings.py
1
2566
""" Django settings for test_mezzanine_advanced_admin project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path....
apache-2.0
4,078,314,573,051,210,000
24.919192
91
0.727981
false
3.191542
false
false
false
Kivvix/stage-LPC
trackSrc/density.py
1
4448
#!/usr/bin/env python # -*- coding: utf-8 -*- ## @package density # @author J. Massot # @date 2014-04-30 # # @brief Calculate density of pictures into strip 82 # # @details Search all coordinates of each `fits` file and count density from numpy import * import math # to manipulate fits files import pyfits impor...
mit
-7,318,810,387,316,323,000
24.819767
121
0.621031
false
2.378682
false
false
false
bdfoster/blumate
blumate/components/binary_sensor/rest.py
1
2622
""" Support for RESTful binary sensors. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/binary_sensor.rest/ """ import logging from blumate.components.binary_sensor import (BinarySensorDevice, SENSOR_CLASSES)...
mit
2,941,729,966,283,463,000
29.488372
74
0.640351
false
4.084112
true
false
false
Berling/project-zombye-exporter
io_exporter_zombye/export_zmdl.py
1
8360
# The MIT License (MIT) # # Copyright (c) 2015 Georg Schäfer # # 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, mod...
mit
1,366,710,334,387,287,800
30.662879
105
0.694581
false
3.215
false
false
false
Som-Energia/intercoop
python/setup.py
1
1213
#!/usr/bin/env python from setuptools import setup, find_packages readme = open("README.rst").read() setup( name = "intercoop", version = "0.2.1", description = "Intercooperation library", author = "Som Energia SCCL", author_email = "info@somenergia.coop", url = 'https://github.com/Som-Energia/intercoop', lo...
agpl-3.0
6,369,653,243,109,251,000
24.270833
87
0.661995
false
2.867612
false
true
false
jeremyjbowers/cfbreference_com
rankings/models.py
1
2698
from django.db import models from college.models import College, Player, Week, CollegeYear RANKINGTYPE_CHOICES = ( ('T', 'Team'), ('P', 'Player'), ) CURRENT_SEASON = 2011 class RankingType(models.Model): name = models.CharField(max_length=75) slug = models.SlugField(max_length=75) typename = mode...
apache-2.0
-4,138,870,600,021,120,500
33.151899
99
0.674574
false
3.810734
false
false
false
thomasrotter/sublimetext-cfml
cfml_plugin.py
1
3757
import sublime import sublime_plugin from HTML.html_completions import HtmlTagCompletions from .src import command_list, completions, events, utils, _plugin_loaded for command in command_list: globals()[command.__name__] = command def plugin_loaded(): _plugin_loaded() class CfmlEventListener(sublime_plugin...
mit
3,923,026,118,441,820,000
36.949495
157
0.607932
false
3.917623
false
false
false
ubc/compair
compair/api/comparison_example.py
1
7395
import dateutil.parser from bouncer.constants import READ, EDIT, CREATE, DELETE, MANAGE from flask import Blueprint from flask_login import login_required, current_user from flask_restful import Resource, marshal from flask_restful.reqparse import RequestParser from sqlalchemy import desc, or_, func, and_ from sqlalche...
gpl-3.0
9,070,846,310,897,019,000
41.751445
104
0.677485
false
4.03217
false
false
false
Bitcoin-ABC/bitcoin-abc
test/functional/test_framework/key.py
1
13283
#!/usr/bin/env python3 # Copyright (c) 2019 Pieter Wuille # Copyright (c) 2019-2020 The Bitcoin developers """Test-only secp256k1 elliptic curve implementation WARNING: This code is slow, uses bad randomness, does not properly protect keys, and is trivially vulnerable to side channel attacks. Do not use for anything ...
mit
-4,431,894,373,029,228,500
29.326484
94
0.490251
false
2.983603
false
false
false
fbradyirl/home-assistant
homeassistant/components/smappee/sensor.py
1
8496
"""Support for monitoring a Smappee energy sensor.""" from datetime import timedelta import logging from homeassistant.const import ENERGY_KILO_WATT_HOUR, POWER_WATT from homeassistant.helpers.entity import Entity from . import DATA_SMAPPEE _LOGGER = logging.getLogger(__name__) SENSOR_PREFIX = "Smappee" SENSOR_TYPE...
apache-2.0
-1,216,471,522,099,342,000
33.392713
86
0.486168
false
4.072387
false
false
false
mganeva/mantid
Framework/PythonInterface/mantid/plots/modest_image/modest_image.py
1
10141
# v0.2 obtained on March 12, 2019 """ Modification of Chris Beaumont's mpl-modest-image package to allow the use of set_extent. """ from __future__ import print_function, division import matplotlib rcParams = matplotlib.rcParams import matplotlib.image as mi import matplotlib.colors as mcolors import matplotlib.cbook...
gpl-3.0
5,723,269,420,831,283,000
32.803333
98
0.601617
false
3.705152
false
false
false
robiame/AndroidGeodata
pil/GimpGradientFile.py
1
3292
# # Python Imaging Library # $Id$ # # stuff to read (and render) GIMP gradient files # # History: # 97-08-23 fl Created # # Copyright (c) Secret Labs AB 1997. # Copyright (c) Fredrik Lundh 1997. # # See the README file for information on usage and redistribution. # from math import pi, log, si...
mit
-3,854,099,970,673,436,000
24.548387
77
0.492406
false
3.33536
false
false
false
nguyeho7/CZ_NER
src/webservice/server.py
1
1188
from flask import Flask from flask import request, render_template, jsonify from src.common.NER_utils import transform_dataset_web from src.CRF_NER.CRF_NER import parse_commands import pycrfsuite model = "1_nbr" def init(filename = "model.txt"): with open(filename) as f: line = f.read() tokens = ...
mit
9,149,369,679,002,608,000
26.627907
87
0.636364
false
3.355932
false
false
false
gurneyalex/odoo
addons/sale/wizard/payment_acquirer_onboarding_wizard.py
6
1520
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class PaymentWizard(models.TransientModel): """ Override for the sale quotation onboarding panel. """ _inherit = 'payment.acquirer.onboarding.wizard' _name = 'sale.paym...
agpl-3.0
8,211,488,196,456,862,000
40.081081
100
0.671053
false
3.887468
false
false
false
sharkeyck/Lidar
lidar_edited.py
1
4303
#Display Data from Neato LIDAR #based on code from Nicolas "Xevel" Saugnier #requires vpython and pyserial import thread, time, sys, traceback, math, struct COM_PORT = "COM4" # example: 5 == "COM6" == "/dev/tty5" BAUD_RATE = 115200 FPS = 60 OFFSET = 140 from visual import * point = points(pos=[(0,0,0) for i in range...
apache-2.0
-2,723,072,787,634,289,000
32.625
125
0.589589
false
3.097912
false
false
false
naokits/adminkun_viewer_old
Server/gaeo/gaeo/view/helper/form.py
1
6971
# -*- coding: utf-8 -*- # # Copyright 2008 GAEO Team # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
mit
8,629,536,738,327,995,000
54.744
182
0.603042
false
2.980325
false
false
false
s3rvac/git-branch-viewer
docs/conf.py
1
8307
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # git-branch-viewer documentation build configuration file, created by # sphinx-quickstart on Wed May 7 15:45:21 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in...
bsd-3-clause
-4,878,848,400,283,012,000
30.706107
79
0.707355
false
3.711796
true
false
false
theo-l/django
tests/signing/tests.py
6
6968
import datetime from django.core import signing from django.test import SimpleTestCase from django.test.utils import freeze_time from django.utils.crypto import InvalidAlgorithm class TestSigner(SimpleTestCase): def test_signature(self): "signature() method should generate a signature" signer = ...
bsd-3-clause
2,035,370,789,681,449,500
35.867725
94
0.573048
false
3.98627
true
false
false
PrincessTeruko/TsunArt
tags/parser.py
1
4394
from tags.models import Tag import collections, copy, json, re, urllib.parse sample = 'young nia-teppelin with short multicolored hair and cat ears; yoko-littner with flame bikini, pink stockings, and long red hair without gun' DEFAULT_TAG_DICT = {'nouns': collections.OrderedDict({}), 'filters': {}} def format_quer...
mit
-186,066,429,960,326,880
24.252874
150
0.599681
false
2.947015
false
false
false
wtodom/spotipi
spotipi/sandbox/sandbox.py
1
1256
from __future__ import print_function, unicode_literals import getpass import sys import threading import spotify if sys.argv[1:]: track_uri = sys.argv[1] else: track_uri = 'spotify:track:6xZtSE6xaBxmRozKA0F6TA' # Assuming a spotify_appkey.key in the current dir session = spotify.Session() # Process event...
mit
-156,695,434,146,077,950
21.052632
79
0.740446
false
3.116625
false
false
false
chaomodus/pymetasurf
examples/shape.py
1
6757
# An example of using pymetasurf to create objects in Panda3d # Written by Cas Rusnov <rusnovn@gmail.com> import pymetasurf import pymetasurf.shapes as shapes from pandac.PandaModules import loadPrcFile configfiles = ["./Config.prc",] for prc in configfiles: loadPrcFile(prc) import sys from direct.showbase.ShowB...
lgpl-2.1
-2,868,508,953,676,868,600
33.299492
119
0.605594
false
3.242322
false
false
false
oleiade/Hurdles
hurdles/referee/importer.py
1
3834
# -*- coding: utf-8 -*- # Copyright (c) 2012 theo crevon # # See the file LICENSE for copying permission. # # Content of this module was extracted from python nose # project importer.py module. # # See : https://github.com/nose-devs/nose/blob/master/nose/importer.py # import os import sys import imp class Importe...
mit
-3,160,964,215,010,545,700
33.854545
78
0.526604
false
4.135922
false
false
false
spolanski/WirnikApp
wirnikApp/calculix.py
1
6259
# -*- coding: utf-8 -*- """ W tym pliku następuje konwersja pliku wsadowego z programu GMSH na plik do programu Calculix. """ import numpy as np import os def zmianaElem(mesh, stMesh): """ Funkcja zmienia formę zapisu elementów na odpowiednia dla Calculix'a. """ np.set_printoptions(threshold='nan') ...
gpl-3.0
9,200,666,231,387,315,000
29.970149
184
0.597686
false
2.675838
false
false
false
andaviaco/tronido
src/syntax/statements/ifstat.py
1
1530
from lexer import lang from ..tree import Node class IfStat(Node): """docstring for IfStat.""" def __init__(self, exp, stats, else_stat, token): super().__init__(None, token) self.exp = exp or Node(None, token) self.stats = stats self.else_stat = else_stat def process_sema...
mit
-769,946,028,036,600,800
34.581395
146
0.617647
false
3.276231
false
false
false
dimaspivak/docker-py
tests/integration/api_container_test.py
1
49036
import os import signal import tempfile import docker from docker.constants import IS_WINDOWS_PLATFORM from docker.utils.socket import next_frame_size from docker.utils.socket import read_exactly import pytest import six from .base import BUSYBOX, BaseAPIIntegrationTest from .. import helpers from ..helpers import ...
apache-2.0
6,206,647,306,667,187,000
36.460657
79
0.592728
false
3.800651
true
false
false
hbldh/pymetawear
pymetawear/client.py
1
5352
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Main module for PyMetaWear .. moduleauthor:: hbldh <henrik.blidh@nedomkull.com> Created on 2016-03-30 """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging from mbientlab.metawear import Met...
mit
2,742,300,826,915,095,000
29.758621
79
0.625187
false
3.683414
false
false
false
HAZARDU5/sgdialer
src/nz/co/hazardmedia/sgdialer/config/Config.py
1
4698
__author__ = 'Michael Andrew michael@hazardmedia.co.nz' class Config(object): """ Config class """ sound_path = 'assets/sounds' #path from src folder to sound assets point_of_origin_code = 0 #index of the point of origin address_data_file_path = "data/addresses.xml" #path from src folder to data file...
mit
-284,871,444,635,444,480
32.564286
119
0.331843
false
3.673182
false
false
false
atiti/crashcollector
crashcollector.py
1
11865
#!/usr/bin/env python from wsgiref.simple_server import make_server import os, os.path, sys import cgi, urlparse import random, string import subprocess import time site_name = 'http://crashes.sirikata.com' id_file = 'data/__id' def str_to_bool(v): return not (len(v) == 0 or v.lower() in ['no', 'false', '0']) d...
gpl-2.0
6,210,942,538,337,298,000
32.803419
138
0.582469
false
3.468284
false
false
false
McNetic/CouchPotatoServer-de
couchpotato/core/media/movie/providers/info/omdbapi.py
1
5734
import json import re import traceback from couchpotato import Env from couchpotato.core.event import addEvent, fireEvent from couchpotato.core.helpers.encoding import tryUrlencode from couchpotato.core.helpers.variable import tryInt, tryFloat, splitString from couchpotato.core.logger import CPLog from couchpotato.cor...
gpl-3.0
-3,953,657,223,573,458,400
32.337209
133
0.487443
false
4.021038
false
false
false
mariusbaumann/pyload
module/plugins/hoster/FilesMailRu.py
1
3878
# -*- coding: utf-8 -*- import re from module.network.RequestFactory import getURL from module.plugins.Hoster import Hoster from module.plugins.Plugin import chunks def getInfo(urls): result = [] for chunk in chunks(urls, 10): for url in chunk: html = getURL(url) if r'<div cl...
gpl-3.0
-4,968,958,604,909,396,000
35.584906
119
0.571171
false
3.824458
false
false
false
aldanor/pytest-benchmark
src/pytest_benchmark/histogram.py
1
3331
from pytest_benchmark.utils import time_unit try: from pygal.graph.box import Box from pygal.graph.box import is_list_like from pygal.style import DefaultStyle except ImportError as exc: raise ImportError(exc.args, "Please install pygal and pygaljs or pytest-benchmark[histogram]") class Plot(Box): ...
bsd-2-clause
9,102,567,736,748,344,000
30.72381
113
0.518163
false
3.528602
false
false
false
DaveA50/lbry
lbrynet/dht/protocol.py
1
14824
#!/usr/bin/env python # # This library is free software, distributed under the terms of # the GNU Lesser General Public License Version 3, or any later version. # See the COPYING file included in this archive # # The docstrings in this module contain epytext markup; API documentation # may be created by processing this...
mit
9,017,129,422,018,438,000
45.470219
174
0.587156
false
4.648479
false
false
false
microcom/microcom-runbot
runbot/res_config.py
1
2935
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
74,139,335,604,883,420
47.916667
90
0.634072
false
3.701135
true
false
false
DistrictDataLabs/django-data-product
irisfinder/views.py
1
1948
from django.shortcuts import render import datetime from models import Iris, SVMModels from forms import UserIrisData import sklearn from sklearn import svm from sklearn.cross_validation import train_test_split import numpy as np from django.conf import settings import cPickle import scipy from pytz import timezone imp...
apache-2.0
-5,062,828,488,555,508,000
37.215686
94
0.606263
false
3.827112
false
false
false
amitdeutsch/oppia
core/domain/user_jobs_one_off_test.py
1
24075
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
apache-2.0
-7,254,420,924,280,089,000
42.456679
90
0.633063
false
3.740677
true
false
false
mafagafogigante/scripts
docdist.py
1
1991
#!/usr/bin/env python3 import argparse import collections import string def make_punctuation_translation_table(): # It is safer to replace punctuation by spaces as it prevents merging incorrectly separated words together. return str.maketrans(string.punctuation, ' ' * len(string.punctuation)) def count_wor...
bsd-2-clause
4,144,811,424,627,787,000
35.851852
111
0.611055
false
4.012097
false
false
false
pfmoore/invoke
invoke/platform.py
1
5500
""" Platform-specific code lives here. This is its own module to abstract away what would otherwise be distracting logic-flow interruptions. """ from contextlib import contextmanager import select import sys # TODO: move in here? They're currently platform-agnostic... from .util import has_fileno, isatty WINDOWS =...
bsd-2-clause
5,736,880,818,842,410,000
32.13253
79
0.657091
false
3.848845
false
false
false
ivanprjcts/equinox-spring16-API
makesdks/swagger_reader.py
1
1557
import os import json from sdklib.util.urlvalidator import urlsplit class SwaggerReader(object): def __init__(self, folder): files = os.listdir(folder) self.apis = [] for file_elem in files: print '%s/%s' % (folder, file_elem) f = open('%s/%s' % (folder, file_el...
lgpl-3.0
-4,964,758,851,449,045,000
26.803571
74
0.514451
false
3.971939
false
false
false
braingram/pysump
sump/interface.py
1
10286
#!/usr/bin/env python # import sys import logging import struct import serial from . import errors from . import fio from . import ops # import settings this as settings_module to avoid name conflicts from . import settings as settings_module logger = logging.getLogger(__name__) logger.addHandler(logging.StreamHan...
gpl-3.0
8,525,984,057,080,370,000
34.839721
78
0.525277
false
3.720072
true
false
false
oculusstorystudio/kraken
Python/kraken/plugins/canvas_plugin/graph_manager.py
1
20242
"""Kraken Canvas - Canvas Graph Manager module. Classes: GraphManager -- Node management. """ import json from kraken.core.kraken_system import ks # import FabricEngine.Core as core class GraphManager(object): """Manager object for taking care of all low level Canvas tasks""" __dfgHost = None __dfgBi...
bsd-3-clause
3,717,452,607,569,508,400
33.192568
110
0.564025
false
4.008317
false
false
false
Volvagia356/pixiv-downloader
pixivdl-gui.py
1
8165
#!/usr/bin/env python import os,sys import pickle import threading from Queue import Queue from pixiv_api import Pixiv import pixivdl import Tkinter import ttk import tkFileDialog import tkMessageBox class Application(Tkinter.Frame): def __init__(self,master=None): Tkinter.Frame.__init__(self,master) ...
bsd-3-clause
-6,654,435,745,410,648,000
37.885714
92
0.595224
false
3.762673
false
false
false
savi-dev/quantum
quantum/plugins/cisco/nova/quantum_port_aware_scheduler.py
1
4417
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2011 Cisco Systems, 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...
apache-2.0
-547,319,518,738,498,100
37.408696
78
0.620331
false
4.178808
false
false
false