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
y-lan/python-hiveserver2
example/example.py
1
4896
import sys from thrift.protocol.TBinaryProtocol import TBinaryProtocol from thrift.transport.TSocket import TSocket from thrift.transport.TTransport import TBufferedTransport import sasl from cloudera.thrift_sasl import TSaslClientTransport from TCLIService import TCLIService from TCLIService.ttypes import TOpenSessi...
apache-2.0
841,611,044,743,546,000
33
113
0.685253
false
3.813084
true
false
false
tdtrask/ansible
lib/ansible/modules/system/user.py
1
76201
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012, Stephen Fromm <sfromm@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': ...
gpl-3.0
9,207,479,960,453,178,000
32.972804
137
0.518195
false
4.011001
false
false
false
Niharika29/bugtracker
bugtracker/bugform/migrations/0001_initial.py
1
3830
# -*- 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 model 'BugModel' db.create_table(u'bugform_bugmodel', ( ...
mit
-8,162,443,334,297,934,000
51.479452
92
0.574674
false
3.623463
false
false
false
hip-odoo/odoo
addons/website_event_track/controllers/main.py
5
6012
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import collections import datetime import pytz from odoo import fields, http from odoo.http import request from odoo.tools import html_escape as escape, html2plaintext class WebsiteEventTrackController(http.Controller...
agpl-3.0
4,715,310,819,447,169,000
44.18797
168
0.563561
false
3.872423
false
false
false
pkleimert/hrpt
apps/pollster/models.py
1
51517
# -*- coding: utf-8 -*- import warnings from django.db import models, connection, transaction, IntegrityError, DatabaseError from django.contrib.auth.models import User from django.forms import ModelForm from django.core.validators import RegexValidator from cms.models import CMSPlugin from xml.etree import ElementTr...
agpl-3.0
7,208,818,112,332,948,000
38.506902
136
0.569987
false
3.907836
false
false
false
sigurdga/samklang-blog
samklang_blog/models.py
1
2547
from django.db import models from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User, Group from django.contrib.sites.models import Site from taggit.managers import TaggableManager from samklang_utils import markdown, slugify from samklang_utils.managers import PermissionMan...
agpl-3.0
-6,131,094,714,866,915,000
40.754098
184
0.663133
false
3.870821
false
false
false
uknomecarlos/SMARTAlarmSW
PutTogether/main.py
1
4200
from PointOfInterest import * from path import * from xbee import ZigBee from WirelessFunctions import * import time import serial import Queue import termios, fcntl, sys, os fd = sys.stdin.fileno() oldterm = termios.tcgetattr(fd) newattr = termios.tcgetattr(fd) newattr[3] = newattr[3] & ~termios.ICANON & ~termios.E...
mit
7,045,585,730,481,047,000
31.307692
81
0.596905
false
3.143713
false
false
false
KiviMao/kivi
Script/Show-Comments-story/Get-All-User.py
1
1268
#!/usr/bin/python3 import MySQLdb import os import re db = MySQLdb.connect("etos39.cn.ao.ericsson.se","automation","automation","gerrit_data_new") # db = MySQLdb.connect("localhost","root","root","work" ) cursor = db.cursor() cursor.execute('SELECT reviewer_username FROM comments GROUP BY reviewer_username') users...
apache-2.0
-2,548,353,246,092,161,500
36.323529
251
0.552839
false
3.532033
false
false
false
mgaillard/CNNFeaturesRobustness
features_extractor/main.py
1
9880
""" A program that extract features from images using CNN. """ import argparse import sys from os.path import isdir import numpy as np from image_features import FeatureExtractor, FeaturesNpzIO, FeaturesHdf5IO def main(): # parse program arguments parser = argparse.ArgumentParser() parser.add_argument...
gpl-3.0
3,966,462,580,146,087,400
49.661538
107
0.382731
false
4.620674
false
false
false
Hoikas/korman
korman/ui/ui_toolbox.py
1
1445
# This file is part of Korman. # # Korman is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Korman is distributed i...
gpl-3.0
3,638,843,941,275,409,000
34.243902
86
0.686505
false
3.594527
false
false
false
monikagrabowska/osf.io
addons/base/models.py
1
30775
import abc import os import time import markupsafe import requests from django.db import models from framework.auth import Auth from framework.auth.decorators import must_be_logged_in from framework.exceptions import HTTPError, PermissionsError from mako.lookup import TemplateLookup from osf.models.base import BaseMod...
apache-2.0
1,737,133,200,023,061,200
31.225131
127
0.579951
false
4.35598
true
false
false
soylentdeen/Graffity
src/BCI/fibre_tips.py
1
10191
#!/usr/bin/env python # -*- coding: utf-8 -*- #avg 110,429166666667 142,303939393939 39,4660202129861 17,303315566334 358,067727272727 145,667575757576 39,0507475838317 18,0599499387257 607,147575757576 146,828787878788 39,4196129733035 17,4218484639878 854,394393939394 146,564696969697 38,...
mit
6,268,545,257,541,182,000
38.634241
303
0.554781
false
2.854021
false
false
false
personalrobotics/dartpy
scripts/grasp_fuze_bottle.py
1
7160
#!/usr/bin/env python from __future__ import division, print_function import dartpy import numpy import os.path WORKSPACE_BASE = '/home/mkoval/storage/dartpy-ws' ROBOT_POSE = numpy.array([ [ -2.220e-16, 1.000e+00, 0.000e+00, 2.050e+00], [ -1.000e+00, -2.220e-16, -0.000e+00, 3.050e+00], [ -0.000e...
bsd-2-clause
4,882,178,688,475,679,000
35.530612
79
0.658659
false
2.771971
false
false
false
vikkyrk/incubator-beam
sdks/python/apache_beam/examples/complete/game/hourly_team_score.py
1
12102
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
4,256,046,447,590,686,700
40.023729
80
0.665262
false
3.990109
false
false
false
hiisi13/django-south-central
south_central/migration.py
1
1816
import os from django.utils import importlib class Migrations(list): def __init__(self, app_name): self._app_name = app_name migrations_dir = self._ensure_migrations_dir(app_name) self._load_migrations(migrations_dir) def migrations_module(self): return self._app_name + '.a...
bsd-3-clause
2,838,243,364,388,195,000
32.018182
97
0.560022
false
4.117914
false
false
false
bvalot/panISa
validate/validate.py
1
3556
#!/usr/bin/python # -*- coding: utf-8 -*- ##Copyright (c) 2017 Benoit Valot and Panisa Treepong ##benoit.valot@univ-fcomte.fr ##UMR 6249 Chrono-Environnement, Besançon, France ##Licence GPL """Validate panISa [search (IS) insertion on a genome] by simulation read""" import sys import argparse import tempfile import ...
gpl-3.0
8,381,343,015,888,777,000
41.831325
90
0.699859
false
3.434783
false
false
false
RHInception/re-worker-output
replugin/outputworker/__init__.py
1
4228
# -*- coding: utf-8 -*- # Copyright © 2014 SEE AUTHORS FILE # # This program 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, or # (at your option) any later version. # #...
agpl-3.0
8,644,221,077,200,686,000
35.128205
78
0.585285
false
4.185149
false
false
false
rc500/ardrone_archive_aarons_laptop
ardrone/native.py
1
1120
"""Module to handle importing native modules via ctypes. """ import ctypes import os import logging log = logging.getLogger() def load_dll(name): """Attempt to load a DLL from the lib directory under ardrone/native. Appropriate platform suffices are attempted. *name* is the filename (without platform extensi...
apache-2.0
-5,403,136,657,152,677,000
27
81
0.644643
false
3.533123
false
false
false
grzanka/ibodata
ibodata/lateral_profile.py
1
6329
import math import numpy as np from beprof.profile import Profile class LateralProfile(Profile): def penumbra_right(self): """ In case of good data returns floating-point number In case of corrupted data returns nan """ return self.x_at_y(0.1, True) - self.x_at_y(0.9, Tru...
gpl-3.0
-85,395,117,010,977,300
37.591463
120
0.54748
false
3.399033
false
false
false
NicovincX2/Python-3.5
Statistiques/Estimation (statistique)/Régression/Régression logistique/logistic_path.py
1
1070
# -*- coding: utf-8 -*- import os # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # License: BSD 3 clause from datetime import datetime import numpy as np import matplotlib.pyplot as plt from sklearn import linear_model from sklearn import datasets from sklearn.svm import l1_min_c iris = datasets.load_i...
gpl-3.0
8,527,585,440,940,499,000
20.4
79
0.626168
false
2.988827
false
false
false
handshakinglemma/wedther
wedther.py
1
2543
# wedther # Generates tweets for the current weather in Edmonton, AB. # Tweets the current temperature and an emoji that represents the # current weather conditions. # If there is a current weather alert, it also tweets that. import tweepy from secret_wedther import * from get_weather import get_weather def main(): ...
mit
-2,016,450,442,182,445,000
35.328571
92
0.578451
false
3.680174
false
false
false
HamzaBoughraira/The-Serial-Robot
Software/plotmanager.py
1
7943
__author__ = 'HAMZA BOUGHRAIRA' """ this file contains three classes: the plotmanager class to plot data on a static plot the histogramplotmanager to extract histograms from the video and plot them on a static plot the liveplotmanager class to make a real time data visualisation on a dynamic plot""" import matplotli...
gpl-2.0
222,517,405,126,067,200
35.104545
96
0.567544
false
3.571493
false
false
false
katholt/Kleborate
kleborate/mlstBLAST.py
1
11132
#!/usr/bin/env python3 """ Reports best match * : best matching allele is not precise match -nLV : best matching ST is n-locus variant If an annotation column is provided (such as clonal complex) in the final column of the profiles file, this annotation will be reported in column 2 of the output table. Copyright...
gpl-3.0
4,516,834,976,861,138,000
36.355705
99
0.605192
false
3.423124
false
false
false
ipeet/edit
ui/quick_open.py
1
3326
#!/usr/bin/env python3 # Copyright 2015 Iain Peet # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. from gi.repository...
gpl-3.0
7,484,563,316,449,438,000
34.021053
74
0.611846
false
3.542066
false
false
false
leighmacdonald/autobit
docs/conf.py
1
9313
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # AutoBit documentation build configuration file, created by # sphinx-quickstart on Tue Jun 23 15:36:02 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # au...
mit
-6,095,576,841,352,236,000
31.003436
79
0.705788
false
3.682483
true
false
false
fermenreq/Django-Football-News
mundoDeportivo/src/saveData.py
1
6222
#encoding: utf-8 import tkMessageBox import urllib2 from bs4 import BeautifulSoup import os import django from pip._vendor.pyparsing import unicodeString import unicodedata os.environ.setdefault("DJANGO_SETTINGS_MODULE", "src.settings") django.setup() from mundoDeportivo.models import * url = 'http://www.mundodeport...
gpl-3.0
7,050,665,513,348,777,000
42.760563
144
0.52607
false
3.754683
false
false
false
mcfey/String-Jumble
stringjumble.py
1
1387
""" stringjumble.py Author: Mary Feyrer Credit: Tess Snyder, Daniel Wilson Assignment: The purpose of this challenge is to gain proficiency with manipulating lists. Write and submit a Python program that accepts a string from the user and prints it back in three different ways: * With all letters in reverse. * Wi...
mit
-3,410,008,328,795,271,700
23.333333
115
0.688536
false
3.138009
false
false
false
lexdene/drape
drape/cookie.py
1
2728
''' module for cookie ''' import time GMT_FORMAT = '%a, %d %b %Y %H:%M:%S GMT' class Cookie(object): ''' cookie object ''' def __init__(self, request): self.__request = request # data read from request self.__requestdata = dict() # data to flush to response self.__re...
gpl-3.0
8,152,843,907,818,454,000
28.333333
74
0.514296
false
4.171254
false
false
false
arahatashun/cansat
log/flightlog.py
1
10378
#!/usr/bin/env python3 # -*- coding: utf-8 -*- filename1 = "before_light.txt" filename2 = "during_light.txt" filename3 = "after_light.txt" """ ファイルの書式は以下の通り filename1(光判定開始前) diffmin:0.000000 latitude:40.142240 longitude:139.987303 altitude:18.400000 acclx:0.086426 accly:-1.038574 acclz:0.257568 gyrox:0.385254 gyroy:...
mit
-568,796,244,131,297,100
34.454545
67
0.502564
false
3.363184
false
false
false
Runsher/89s
spider_copy.py
1
9454
#coding:utf8 ''' Created on 2010-9-15 @author: chenggong ''' import urllib2 import re import socket DEBUG = 0 ''' 工具类 ''' class Tools(): #log函数 @staticmethod def writelog(level,info,notify=False): if DEBUG == 0: try: print "["+level+"]"+info.decode('UTF-8').encode('...
bsd-3-clause
-3,722,633,561,464,901,000
29.354949
101
0.515404
false
3.056357
false
false
false
keryfyN/OPTO-website
shell.py
1
2779
import os from application import * from application.default_settings import _basedir os.environ['PYTHONINSPECT'] = 'True' # Create database directory if not exists. create_db_dir = _basedir + '/db' if not os.path.exists(create_db_dir): os.mkdir(create_db_dir, mode=0o755) def init_db(): app = create_app() ...
bsd-3-clause
3,664,246,158,259,516,000
37.597222
160
0.515653
false
2.661877
false
false
false
DolphinDream/sverchok
nodes/quaternion/quaternion_math.py
1
10984
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
gpl-3.0
5,688,933,907,942,660,000
37.676056
112
0.594592
false
3.771978
false
false
false
calpeyser/google-cloud-python
trace/google/cloud/trace/_gax.py
1
7710
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
-1,647,950,157,754,176,800
35.028037
79
0.627626
false
4.101064
false
false
false
gabstopper/smc-python
smc/elements/group.py
1
10963
""" Groups that are used for element types, such as TCPServiceGroup, Group (generic), etc. All group types inherit from GroupMixin which allow for modifications of existing groups and their members. """ from smc.base.model import Element, ElementCreator from smc.api.exceptions import ElementNotFound from smc.base.util ...
apache-2.0
-5,853,714,813,928,997,000
31.531157
81
0.613701
false
4.697087
false
false
false
dfridovi/compressed_sensing
src/python/test_basis_fourier_2D.py
1
1704
""" Test script. Run Fourier decomposition on a 2D image and see what we get. """ import numpy as np import matplotlib.pyplot as plt from scipy import misc import BasicFunctions as bf import Sketching as sketch # Parameters. IMAGE_PATH = "../../data/" IMAGE_NAME = "lenna.png" SIZE = (50, 50) K = (SIZE[0]*SIZE[1]*0.7...
gpl-2.0
-8,025,874,577,818,857,000
25.215385
74
0.724178
false
2.943005
false
true
false
sumugapadman/Heroku_Python_Sf
app.py
1
1183
import os from flask import Flask, request, render_template from flask_restful import Resource, Api, reqparse from simple_salesforce import Salesforce app = Flask(__name__) api = Api(app) #Initialize a connection with Salesforce sf = Salesforce(username=os.environ.get('SALESFORCE_USERNAME'), password=os.environ.get('...
mit
6,873,754,097,960,730,000
33.794118
162
0.701606
false
3.520833
false
false
false
JOHNKYON/DSTC
DSTC2/traindev/scripts/prettyPrint.py
1
1860
import os import json import sys ############################################################################# # Pretty print a specified dialog # ############################################################################# def jsonItemToCued(i): if len(i) > 2: p...
mit
-2,565,459,592,054,479,000
31.068966
91
0.458065
false
3.556405
false
false
false
mariusbaumann/pyload
module/plugins/accounts/MyfastfileCom.py
1
1279
# -*- coding: utf-8 -*- from time import time from module.common.json_layer import json_loads from module.plugins.Account import Account class MyfastfileCom(Account): __name__ = "MyfastfileCom" __type__ = "account" __version__ = "0.03" __description__ = """Myfastfile.com account plugin""" ...
gpl-3.0
-8,768,191,317,547,773,000
35.542857
121
0.588741
false
3.654286
false
false
false
ianthetechie/dmon
dmon_service.py
1
2354
#!/usr/bin/env python import datetime import subprocess import pymongo import config # Database config client = pymongo.MongoClient(config.db_connection_string) db = client.dmon def update_ping(host): ping_command = 'ping -c 5 -i 6 %s' % host # Run the ping command in a shell proc = subprocess.Popen(ping...
mit
-175,506,108,730,093,630
30.386667
101
0.567545
false
3.846405
false
false
false
mgaldieri/py-affective
pyaffective/agent.py
1
6027
# -*- coding:utf-8 -*- """ The MIT License (MIT) Copyright (c) 2015 Mauricio Galdieri 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 t...
mit
651,250,938,626,638,300
35.077844
89
0.600332
false
3.746891
false
false
false
18mr/call-congress
call_server/user/models.py
1
3190
from datetime import datetime from sqlalchemy_utils.types import phone_number from werkzeug import generate_password_hash, check_password_hash from flask_login import UserMixin from ..extensions import db from sqlalchemy import func from .constants import (USER_ROLE, USER_ADMIN, USER_STAFF, US...
agpl-3.0
-2,509,964,320,201,416,700
31.55102
96
0.610972
false
4.012579
false
false
false
bodacea/datasciencefordevelopment
Code_examples/python/gis_utilities.py
1
5165
#!/usr/bin/env python """utilities.py: datafile checking and format conversions """ import csv import gdal import json import numpy as np import os import shapefile from gdalconst import * from osgeo import osr, gdal from random import randint import matplotlib.pyplot as plt import pandas """ Do basic checks on any...
cc0-1.0
2,469,358,331,416,104,400
27.854749
103
0.612391
false
3.273131
false
false
false
scality/manila
manila/utils.py
1
20309
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
apache-2.0
-37,176,145,464,904,300
32.022764
79
0.602098
false
4.200414
false
false
false
franklingu/leetcode-solutions
questions/convert-a-number-to-hexadecimal/Solution.py
1
1481
""" Given an integer, write an algorithm to convert it to hexadecimal. For negative integer, two’s complement method is used. Note: All letters in hexadecimal (a-f) must be in lowercase. The hexadecimal string must not contain extra leading 0s. If the number is zero, it is represented by a single zero character '...
mit
-712,128,432,362,692,600
22.645161
219
0.546315
false
3.923077
false
false
false
2013Commons/hue
apps/search/src/search/urls.py
1
2596
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
1,011,998,191,622,624,100
59.372093
145
0.725347
false
3.698006
false
false
false
tsw-apropos/mapbiographer
mapBiographer/transfer_worker.py
1
38190
# -*- coding: utf-8 -*- """ /*************************************************************************** transferContent A QGIS plugin Effectively conduct direct to digital map biographies and traditional land use studies ------------------- begin...
gpl-2.0
-8,691,162,037,607,654,000
44.195266
142
0.502016
false
4.397743
false
false
false
lmazuel/azure-sdk-for-python
azure-mgmt-batchai/azure/mgmt/batchai/models/operation_py3.py
1
1562
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-1,671,300,082,715,670,800
35.325581
109
0.589629
false
4.462857
false
false
false
roneivni/repository.iptvglobal
plugin.video.iptvglobal-0.0.1/defaut.py
1
8212
#!/usr/bin/env python # -*- coding: UTF-8 -*- # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distri...
gpl-2.0
4,502,021,898,087,707,000
34.682609
126
0.561959
false
3.276248
false
false
false
sealevelresearch/tide-wrangler
tide_wrangler/parsers/poltips.py
1
1757
#!/usr/bin/env python import datetime import logging import re import pytz from .row import Row logger = logging.getLogger(__name__) __all__ = ['get_parser'] DATETIME_FORMAT = '%Y-%m-%dT%H:%M:%SZ' class Parser(): def __init__(self, f): self._fobj = f def get(self): return generate_rows...
mit
5,585,803,616,736,352,000
21.525641
77
0.562891
false
3.082456
false
false
false
cloudbase/coriolis
coriolis/api/v1/utils.py
1
5327
# Copyright 2018 Cloudbase Solutions Srl # All Rights Reserved. import functools import json from oslo_log import log as logging from webob import exc from coriolis import constants from coriolis import exception from coriolis import schemas LOG = logging.getLogger(__name__) def _get_show_deleted(val): if va...
agpl-3.0
-2,186,908,326,845,801,000
32.929936
79
0.605782
false
4.43178
false
false
false
trbs/pid
pid/base.py
1
7603
import os import sys import errno import atexit import signal import logging import tempfile from .utils import ( determine_pid_directory, effective_access, ) try: from contextlib import ContextDecorator as BaseObject except ImportError: BaseObject = object DEFAULT_PID_DIR = determine_pid_directory() ...
apache-2.0
2,437,433,229,364,245,500
30.288066
103
0.585032
false
3.970235
false
false
false
mfcloud/python-zvm-sdk
zvmsdk/sdkwsgi/requestlog.py
1
2577
# Copyright 2017 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
apache-2.0
-3,003,853,398,583,577,000
33.824324
78
0.592938
false
4.007776
false
false
false
ibarbech/hexapod-robot
dynamixelpython/src/jointmotorI.py
1
2171
# # Copyright (C) 2016 by YOUR NAME HERE # # This file is part of RoboComp # # RoboComp 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-3.0
-7,759,007,051,365,108,000
30.014286
86
0.741133
false
3.183284
false
false
false
SINGROUP/pycp2k
pycp2k/classes/_each241.py
1
1114
from pycp2k.inputsection import InputSection class _each241(InputSection): def __init__(self): InputSection.__init__(self) self.Just_energy = None self.Powell_opt = None self.Qs_scf = None self.Xas_scf = None self.Md = None self.Pint = None self.Meta...
lgpl-3.0
8,676,828,739,605,507,000
41.846154
447
0.576302
false
2.908616
false
false
false
MortalCatalyst/data-science-from-scratch
code/naive_bayes.py
1
4455
from collections import Counter, defaultdict from .machine_learning import split_data import math import random import re import glob def tokenize(message): message = message.lower() # convert to lowercase all_words = re.findall("[a-z0-9']+", message) # extract the words return se...
unlicense
7,235,500,243,756,407,000
30.595745
77
0.590348
false
3.475039
false
false
false
mishbahr/staticgen-demo
staticgen_demo/blog/middleware.py
1
1941
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import messages from django.contrib.admin.models import DELETION, LogEntry from django.contrib.admin.options import get_content_type_for_model from django.core.urlresolvers import NoReverseMatch, Resolver404, resolve, reverse from dja...
bsd-3-clause
6,755,188,183,978,036,000
32.465517
95
0.603812
false
4.38149
false
false
false
Japanuspus/Site-in-a-Dropbox
app/siteinadropbox/metadataparser/__init__.py
1
4962
""" metadataparser is designed to read metadata fields from light markup pages in a way that is compatible with docutils [bibinfo][rst] fields as well as Multimarkdown's [multimarkdown][metadata fields]. To do so, we follow the markup-specification of [multimarkdown] with the additions that - a colon can be added befo...
mit
-2,036,771,226,459,483,400
30.0125
97
0.600967
false
3.808135
false
false
false
cristian99garcia/cedit-activity
toolbars.py
1
12704
#!/usr/bin/env python # -*- coding: utf-8 -*- # # toolbars.py por: # Cristian García <cristian99garcia@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 the Li...
gpl-2.0
-9,012,994,782,312,661,000
37.728659
79
0.639298
false
3.552293
false
false
false
sumpfgottheit/pdu1800_data_provider
mGameController.py
1
53276
""" mGameController 0.5 GitHub Page: https://github.com/thedixieflatline/mGameController mGameController an app for the game Assetto Corsa. Provides the ability to get control inputs from game devices in Assetto Corsa App developed by David Trenear Please submit bugs or requests to the Assetto Corsa forum http://www.a...
mit
1,187,605,848,490,593,500
70.085447
218
0.674148
false
3.886561
false
false
false
ARM-software/trappy
trappy/plotter/LinePlot.py
1
5826
# Copyright 2015-2017 ARM Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
apache-2.0
6,403,431,100,848,697,000
32.291429
86
0.618091
false
4.076977
false
false
false
mhubig/borg
borg/archiver.py
1
79356
from binascii import hexlify, unhexlify from datetime import datetime from hashlib import sha256 from operator import attrgetter import argparse import functools import inspect import io import os import shlex import signal import stat import sys import textwrap import traceback from . import __version__ from .helpers...
bsd-3-clause
-5,541,820,737,315,505,000
51.974633
148
0.554337
false
4.676528
false
false
false
robcarver17/systematictradingexamples
plots_for_perhaps/diversification_stacked.py
1
4407
import numpy as np import matplotlib.pyplot as plt from matplotlib.pyplot import plot, show, xticks, xlabel, ylabel, legend, yscale, title, savefig, rcParams, figure, hist, text, bar, subplots import Image def variance_f(sigma): x=[1.0/sigma.shape[0]]*sigma.shape[0] return 1.0/((np.matrix(x)*sigma*np.matrix(x)...
gpl-2.0
7,880,365,369,759,761,000
28.38
141
0.66349
false
2.707002
false
false
false
richard-roberts/Mocappie
src/selection/greedy.py
1
1138
from src.analysis.error_table import ErrorTable from src.animation.animation import Animation from src.animation.timeline import Timeline from src.selection.selection import Selection from src.selection.selector import Selector class Greedy(Selector): def __init__(self, name: str, animation: Animation, error_tabl...
gpl-3.0
5,771,792,359,581,733,000
36.933333
88
0.668717
false
3.780731
false
false
false
angus-ai/angus-doc
restful/building-blocks/services/voicedetection/voicedetection_streaming.py
1
3258
# -*- coding: utf-8 -*- import Queue import StringIO import wave import time import angus.client import pyaudio import sys import numpy as np CHUNK = 8192 PYAUDIO_FORMAT = pyaudio.paInt16 NUMPY_FORMAT = np.int16 def list_inputs(): p = pyaudio.PyAudio() for i in range(p.get_device_count()): info = p.g...
apache-2.0
-8,075,002,163,145,350,000
26.15
80
0.565991
false
3.656566
false
false
false
manoldonev/algo1-assignments
src/course1/week3/tests/test_quicksort.py
1
1439
"""Test cases for quicksort.""" from src.course1.week3.quicksort import sort as randomized_quicksort def test_quicksort_empty(): assert randomized_quicksort([]) == [] def test_quicksort_single(): assert randomized_quicksort([1]) == [1] def test_quicksort_single_negative(): assert randomized_quicksort...
mit
-8,849,367,988,674,081,000
20.477612
68
0.622655
false
2.777992
true
false
false
snjv180/PythonStudy
g4.py
1
1763
'''Minion hierarchy ================ Rumor has it there's a mad scientist out there who has abducted hundreds of rabbits to test out a new zombie serum. Agent Beta Rabbit, spy and brilliant mathematician, storms into the room: "I know who's behind that plan. It's a man who calls himself Professor Boolean. My prelimi...
gpl-2.0
1,643,973,777,272,500,700
43.075
408
0.752694
false
3.799569
false
false
false
CylonicRaider/websocket-server
websocket_server/constants.py
1
2599
# websocket_server -- WebSocket/HTTP server/client library # https://github.com/CylonicRaider/websocket-server """ WebSocket protocol constants. """ # Opcode constants. # Individual constants OP_CONT = 0x00 # Continuation frame OP_TEXT = 0x01 # Text frame OP_BINARY = 0x02 # Binary frame OP_CLOSE = 0x08 # Close ...
mit
1,683,054,240,346,302,000
29.576471
67
0.628703
false
2.953409
false
false
false
gurneyalex/odoo
addons/l10n_id_efaktur/models/account_move.py
3
16521
# -*- encoding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 import re from odoo import api, fields, models, _ from odoo.exceptions import UserError, ValidationError FK_HEAD_LIST = ['FK', 'KD_JENIS_TRANSAKSI', 'FG_PENGGANTI', 'NOMOR_FAKTUR', 'MASA_PAJAK', 'TAHUN_P...
agpl-3.0
6,258,708,929,065,364,000
53.345395
308
0.579505
false
3.248968
false
false
false
tleonhardt/CodingPlayground
dataquest/DataCleaning/cleaning_walkthrough.py
1
16880
#!/usr/bin/env python """ One of the most controversial issues in the US educational system is the efficacy of standardized tests, and whether they are unfair to certain groups. Given our prior knowledge about this topic, investigating the correlations between SAT scores and demographic factors might be an interesting ...
mit
-8,648,524,419,303,749,000
42.171355
150
0.729443
false
3.468256
false
false
false
stormi/tsunami
src/primaires/commerce/commandes/questeur/liste.py
1
2887
# -*-coding:Utf-8 -* # Copyright (c) 2012 LE GOFF Vincent # 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 # l...
bsd-3-clause
7,355,718,507,935,323,000
43.338462
79
0.679736
false
3.937158
false
false
false
mattgiguere/pyutil
pyutil/getChironSpec.py
1
3784
#!/usr/bin/env python """ Created on 2015-02-22T19:41:02 """ from __future__ import division, print_function import sys import argparse import re try: import numpy as np except ImportError: print('You need numpy installed') sys.exit(1) try: from astropy.io import fits except ImportError: print('...
mit
2,407,426,479,247,826,000
31.076271
94
0.605708
false
3.415162
false
false
false
RocketRedNeck/PythonPlayground
rc.py
1
1788
# Standard imports from matplotlib import pyplot as pl import numpy as np from scipy import integrate # 3rd party imports # local imports tmax = 10 tstep = 0.001 # 0.5 V --> 0.25 J # 2.0 V --> 4.0 J V0 = 27 R = 0.300 # 0.5 C --> 0.5 J # 2.0 C --> 2.0 J N = 1 C0 = 2*4.5 #1.e-6*(3*2200 + 3*1800 + 3*1500 + 3*1500 +...
mit
-3,407,934,204,173,364,700
18.434783
83
0.56264
false
2.554286
false
false
false
Zo0x/hedhes
app/viewers/tv.py
1
4992
from flask import render_template, flash, url_for, redirect, send_from_directory, jsonify, request from app import app, tmdb, lib from app.forms import SearchForm, TVSettingsForm, MovieSettingsForm, QualityForm, SettingsForm from app.models import Movie, TV, TVSeason, TVEpisode, TVEpisodeFile, MovieFile, Settings, Log ...
mit
-9,162,881,793,755,484,000
35.437956
114
0.606771
false
3.262745
false
false
false
Akrog/cinder
cinder/volume/drivers/emc/emc_cli_fc.py
1
9214
# Copyright (c) 2012 - 2015 EMC Corporation, 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 # # ...
apache-2.0
8,971,587,132,897,877,000
36.004016
79
0.590949
false
4.356501
false
false
false
OneStopTransport/dorothy-demo
src/server.py
1
3564
import json import os import requests from flask import Flask from flask.ext.jsonpify import jsonify from consts import GOODS from consts import JSON_FILE from consts import ROUTE_TYPES from consts import SIZES from utils import build_urls from utils import build_urls_detail from utils import create_vehicle_attrs fro...
mit
4,922,850,870,152,798,000
34.64
78
0.675084
false
3.662898
false
false
false
marcusmoller/pyorpg-client
src/sound.py
1
2302
import random import pygame import pygame.mixer from pygame.locals import * from constants import * import global_vars as g class SoundEngine(): def __init__(self): if not pygame.mixer: print "Warning, sounds are disabled!" pygame.mixer.init() # states self.playingSound = False ...
mit
-1,478,827,367,461,006,300
28.525641
86
0.576455
false
3.49848
false
false
false
Succeed-Together/bakfu
classify/ml/ml_sklearn.py
1
2016
# -*- coding: utf-8 -*- ''' Random Forest classifier ''' from sklearn.cluster import DBSCAN from sklearn import metrics from sklearn.preprocessing import StandardScaler from ...core.routes import register from .base import BaseMl, BaseMlSk from sklearn.naive_bayes import GaussianNB from sklearn.ensemble import AdaBoo...
bsd-3-clause
-772,749,530,036,598,100
27
83
0.606647
false
3.692308
false
false
false
ubc/compair
compair/learning_records/xapi/statement.py
1
3304
from flask import request, session as sess from flask_login import current_user from tincan import Statement, ActivityList, \ Extensions, Context, ContextActivities from compair.core import impersonation from .actor import XAPIActor from .activity import XAPIActivity from .context import XAPIContext from compair...
gpl-3.0
2,300,507,818,800,348,200
39.292683
145
0.674031
false
4.150754
false
false
false
ankitrgadiya/cs50
pset7/finance/helpers.py
1
1647
import requests import urllib.parse from flask import redirect, render_template, request, session from functools import wraps def apology(message, code=400): """Render message as an apology to user.""" def escape(s): """ Escape special characters. https://github.com/jacebrowning/meme...
gpl-3.0
515,902,811,945,641,300
26.016393
112
0.562234
false
3.884434
false
false
false
valohai/valohai-cli
valohai_cli/commands/login.py
1
4552
from typing import Optional import click from click.exceptions import Exit from urllib.parse import urlparse from valohai_cli import __version__ from valohai_cli.api import APISession from valohai_cli.consts import default_app_host, yes_option from valohai_cli.exceptions import APIError from valohai_cli.messages impo...
mit
3,662,715,152,642,620,000
38.241379
117
0.620826
false
3.809205
false
false
false
was4444/chromium.src
tools/checklicenses/checklicenses.py
1
23516
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Makes sure that all files contain proper licensing information.""" import json import optparse import os.path import subproces...
bsd-3-clause
-7,075,687,572,436,457,000
29.780105
96
0.594999
false
3.324756
false
false
false
kaldras/django-rest-framework-json-api
example/models.py
1
1271
# -*- encoding: utf-8 -*- from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible class BaseModel(models.Model): """ I hear RoR has this by default, who doesn't need these two fields! """ created_at = models.DateTimeField(auto...
bsd-2-clause
-408,068,529,383,970,600
23.921569
70
0.685287
false
3.782738
false
false
false
yohanesgultom/id-openie
scripts/tag2stanfordner.py
1
2905
''' Convert Named-Entity tagged file (Open NLP format) to Stanford NLP format (token-based) @Author yohanes.gultom@gmail Tagged file example (2 sentences): "Internal DPD Sulsel mudah-mudahan dalam waktu dekat ada keputusan. Sudah ada keputusan kita serahkan ke DPP dan Rabu ini kita akan rapat harian soal itu," kata <...
mit
294,497,830,232,602,400
43.015152
241
0.531153
false
3.143939
false
false
false
hiidef/hiicart
hiicart/gateway/amazon/gateway.py
1
5880
"Amazon Payments Gateway" import urllib from django.utils import timezone from django.utils.safestring import mark_safe from hiicart.gateway.amazon import fps, ipn from hiicart.gateway.amazon.settings import SETTINGS as default_settings from hiicart.gateway.base import PaymentGatewayBase, SubmitResult, GatewayError, C...
mit
2,400,022,062,368,495,000
41.608696
141
0.605612
false
3.89662
false
false
false
NMisko/monkalot
bot/commands/emotereply.py
1
2850
"""Commands: "!call", "!any", "!word".""" from bot.commands.abstract.command import Command from bot.utilities.permission import Permission from bot.utilities.tools import replace_vars class EmoteReply(Command): """Output a msg with a specific emote. E.g.: 'Kappa NOW Kappa THATS Kappa A Kappa NICE Kappa ...
mit
5,880,711,208,206,949,000
31.022472
70
0.487368
false
3.84097
false
false
false
diegonalvarez/tournament-stats
complejos/migrations/0001_initial.py
1
5809
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Complejo' db.create_table(u'complejos_complejo', ( (u'id', self.gf('django.db.mo...
mit
8,232,989,026,454,835,000
68.166667
195
0.568084
false
3.559436
false
false
false
maui-packages/qt-creator
tests/system/suite_HELP/tst_HELP06/test.py
1
8070
############################################################################# ## ## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ## Contact: http://www.qt-project.org/legal ## ## This file is part of Qt Creator. ## ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this f...
lgpl-2.1
-5,244,726,796,075,862,000
58.777778
110
0.698141
false
4.079879
false
false
false
jcchoiling/learningPython
s13/Day05/practice/weater.py
1
2236
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Janice Cheng # import requests # import json # #获取天气数据API # #通过 http request 取天气的数据 # response = requests.get("http://wthrcdn.etouch.cn/weather_mini?city=上海") # response.encoding = 'utf-8' # print("Before", type(response)) #把它变成字符串 # #然后进行反序列化,把字符串转换成 Python 的数...
gpl-3.0
7,374,002,172,710,456,000
38.418605
775
0.579103
false
1.53442
false
false
false
f-saravi/pyChess
chessMan.py
1
2699
''' Created on Jul 9, 2016 @author: farid ''' from definitions import * class chessman(): def __init__(self , cell , color): ''' Constructor ''' self._color = color self._cell = cell def is_legal_move(self): pass def is_legal_capture(self): ...
mit
417,055,203,386,701,000
28.032258
106
0.519081
false
3.570106
false
false
false
QEF/postqe
postqe/pp.py
1
5170
#!/usr/bin/env python3 #encoding: UTF-8 import numpy as np import os.path from .readutils import ( read_charge_file_hdf5, read_wavefunction_file_hdf5, write_charge, create_header ) from .compute_vs import compute_v_bare, compute_v_h, compute_v_xc # from .pyqe import pyqe_getcelldms # TODO this function must be re...
lgpl-2.1
-6,809,099,076,402,655,000
41.03252
147
0.594971
false
3.175676
false
false
false
ales-erjavec/orange-bio
orangecontrib/bio/widgets/OWGenExpress.py
2
31374
""" <name>GenExpress</name> <description>Expression data from GenExpress.</description> <icon>icons/GenCloud.svg</icon> <priority>36</priority> """ from __future__ import absolute_import import Orange import genesis import sys, os from collections import defaultdict import math from datetime import date import numpy...
gpl-3.0
4,278,838,225,748,298,000
34.331081
142
0.564002
false
4.151098
false
false
false
pageauc/pi-timolo
source/pi-timolo-67/config.py
1
11028
# User Configuration variable settings for pitimolo # Purpose - Motion Detection Security Cam # Updated - 20-Jun-2017 IMPORTANT - Required for pi-timolo.py ver 6.71 or Greater # Done by - Claude Pageau configTitle = "pi-timolo ver 6.71 Default Settings" configName = "config.py" #=====================================...
mit
-6,393,423,796,417,106,000
71.552632
136
0.691966
false
3.966906
false
false
false
nimbus154/OratoricalDecaf
Project/vote.py
1
2096
# vote.py # Handles server-side logic for voting # by Chad Wyszynski (chad.wyszynski@csu.fullerton.edu) import webapp2 from google.appengine.api import users import datastore import json import logging class RequestHandler(webapp2.RequestHandler): # valid vote types vote_types = {"up": 1, "down": -1} # H...
mit
-571,040,256,718,358,200
37.814815
80
0.584447
false
4.277551
false
false
false
gcompris/GCompris-site
gcompris.py
1
14746
#!/usr/bin/python3 # -*- coding: utf-8 -*- import codecs import os import sys import jinja2 import time import datetime from datetime import date import re import gettext from email import utils from importlib import reload from ActivityInfo import ActivityInfo from ApplicationInfo import ApplicationInfo from PyQt5.Q...
gpl-3.0
-637,743,981,847,891,600
31.090308
124
0.621182
false
3.457285
false
false
false
autotest/arc
arc/test.py
1
4019
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
gpl-2.0
-6,014,770,550,388,229,000
28.335766
79
0.658622
false
3.677036
true
false
false
Aalto-LeTech/a-plus
exercise/admin.py
1
3075
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from exercise.models import ( CourseChapter, BaseExercise, StaticExercise, ExerciseWithAttachment, Submission, SubmittedFile, ) def real_class(obj): """ Returns the leaf class name of an exercise....
gpl-3.0
95,493,726,640,703,220
32.064516
82
0.650732
false
3.867925
false
false
false
KarolBedkowski/mna
mna/lib/logging_setup.py
1
2775
#!/usr/bin/python2.4 # -*- coding: utf-8 -*- """ Logging setup. Copyright (c) Karol Będkowski, 2014 This file is part of mna Licence: GPLv2+ """ __author__ = "Karol Będkowski" __copyright__ = "Copyright (c) Karol Będkowski, 2014" __version__ = "date" import sys import os.path import logging import tempfile import tim...
gpl-2.0
-8,185,003,031,624,034,000
30.146067
79
0.595238
false
3.79726
false
false
false
ergonomica/ergonomica
ergonomica/lib/interface/completer.py
1
8251
#!/usr/bin/env python # -*- coding: utf-8 -*- # -*- coding: utf-8 -*- """ [lib/interface/completer.py] The autocomplete engine for ergonomica. """ # for completing directory/filenames import os import subprocess import re from prompt_toolkit.completion import Completer, Completion from ergonomica.lib.lang.tokenizer...
gpl-2.0
-8,813,913,990,432,990,000
32.954733
235
0.516907
false
4.162967
false
false
false
tumi8/nasty
tools/insert.py
1
15483
# -*- coding: utf-8 -*- #Programm zum Kopieren und Einfügen von Datensätzen in Halbstunden- Tages- und Wochentabellen #erstellt am: 26.5.2006 #letzte Änderung am 2.7.2006 #erstellt von: Manuel Meiborg (manuel.meiborg@gmx.de) #Version 2.0 # #Dieses Script ermöglicht es, bestimmte Intervalle von Netzverkehrsdaten innerha...
gpl-2.0
6,494,683,366,602,204,000
63.656904
173
0.484437
false
3.759854
false
false
false
myarjunar/QGIS
python/plugins/processing/algs/qgis/LinesToPolygons.py
1
3546
# -*- coding: utf-8 -*- """ *************************************************************************** LinesToPolygons.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ***********************...
gpl-2.0
8,705,109,327,395,645,000
35.556701
125
0.535815
false
4.4325
false
false
false