repo_name
stringlengths
6
90
path
stringlengths
4
230
copies
stringlengths
1
4
size
stringlengths
4
7
content
stringlengths
734
985k
license
stringclasses
15 values
hash
int64
-9,223,303,126,770,100,000
9,223,233,360B
line_mean
float64
3.79
99.6
line_max
int64
19
999
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
8.06
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
tbereau/auto_martini
src/auto_martini/output.py
1
2039
''' Created on March 13, 2019 by Andrew Abi-Mansour This is the:: _ _ _ _____ ___ __ __ _ ____ _____ ___ _ _ ___ / \ | | | |_ _/ _ \ | \/ | / \ | _ \_ _|_ _| \ | |_ _| / _ \| | | | | || | | | | |\/| | / _ \ | |_) || | | || \| || | / ___ \ |_| | | || |_| | | | | |/ ___ ...
gpl-2.0
-4,196,014,005,598,963,700
40.612245
129
0.513977
false
2.871831
false
false
false
Ircam-Web/mezzanine-organization
organization/shop/migrations/0003_productlink.py
1
1255
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-09-23 16:11 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('organization-core', '0004_auto_20160923_1141'), ('sh...
agpl-3.0
-4,433,921,869,456,827,000
38.21875
181
0.591235
false
3.897516
false
false
false
mdavezac/CondimentStation
_states/karabiner.py
2
1670
import salt.utils def profile(name, **params): profiles = __salt__['karabiner.list_profiles']().split() for key, value in params.iteritems(): params[key] = str(value) if name in profiles and len(params) == 0: return {'name': name, 'changes': {}, 'result': True...
mit
-1,055,393,554,067,269,500
36.111111
83
0.502395
false
3.883721
false
false
false
solvo/organilab
src/academic/views.py
1
2097
from django.shortcuts import render, get_object_or_404, redirect from cruds_adminlte.crud import CRUDView from academic.models import Procedure, ProcedureStep, ProcedureRequiredObject,\ ProcedureObservations from cruds_adminlte.inline_crud import InlineAjaxCRUD from django.urls.base import reverse_lazy from academi...
gpl-3.0
-1,841,552,251,157,932,300
33.393443
79
0.701955
false
3.724689
false
false
false
perfidia/andip
src/andip/arangodb.py
1
8332
# -*- coding: utf-8 -*- ''' Created on 15 mar 2014 @author: dominika ''' from arango import create from andip.default import DefaultProvider class ArangoProvider(DefaultProvider): def __init__(self, backoff = None): """Provider which browse data in neo4j graph database. :param url: database con...
mit
5,227,327,114,087,088,000
31.169884
126
0.545127
false
4.277207
true
false
false
ds-hwang/chromium-crosswalk
chrome/browser/resources/chromeos/chromevox/tools/generate_deps.py
37
2487
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. ''' Generates a deps.js file based on an input list of javascript files using Closure style provide/require calls. ''' import optpars...
bsd-3-clause
6,420,552,524,087,255,000
35.573529
77
0.618416
false
4.017771
false
false
false
meejah/gps-cluster
cluster-gps-data.py
1
23418
#!/usr/bin/env python ## GPS-data clustering software ## Copyright (C) 2008 mike warren (mike@mike-warren.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 v...
gpl-2.0
-3,832,808,717,279,730,000
35.995261
336
0.537834
false
3.808424
false
false
false
norayr/unisubs
apps/teams/migrations/0144_auto__add_field_billingrecord_project__chg_field_billingrecord_new_sub.py
4
42020
# -*- 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 field 'BillingRecord.project' db.add_column('teams_billingrecord', 'project', ...
agpl-3.0
7,085,572,526,152,065,000
94.719818
227
0.570038
false
3.700572
false
false
false
mccwdev/towers-of-hanoi
hanoi.py
1
5675
# -*- coding: utf-8 -*- # # Towers of Hanoi with use of stacks and graph searching # Copyright (C) 2016 August # 1200 Web Development # http://1200wd.com/ # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pub...
gpl-3.0
-2,989,955,386,885,135,000
36.833333
146
0.61533
false
3.753307
false
false
false
bolo1729/python-memopt
memopt/memopt.py
1
11482
#!/usr/bin/env python # Copyright (c) 2010-2014 Łukasz Bolikowski # # 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, co...
mit
1,546,562,607,087,564,000
23.375796
80
0.594112
false
2.802294
false
false
false
ville-k/tensorflow
tensorflow/tools/common/traverse.py
98
3484
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-7,664,508,877,103,562,000
36.869565
80
0.703215
false
4.132859
false
false
false
arameshkumar/base-nuxeo-drive
nuxeo-drive-client/nxdrive/engine/watcher/local_watcher.py
2
52318
''' @author: Remi Cattiau ''' from nxdrive.logging_config import get_logger from watchdog.events import FileSystemEventHandler from nxdrive.engine.workers import EngineWorker, ThreadInterrupt from nxdrive.utils import current_milli_time from nxdrive.utils import is_office_temp_file from nxdrive.client.local_client imp...
lgpl-2.1
-144,281,958,649,459,780
51.846465
209
0.53364
false
4.325589
false
false
false
cherrygirl/micronaet7
pricelist_model/wizard/create_pricelist.py
1
25516
# -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License a...
agpl-3.0
-2,524,252,638,117,257,000
44.883094
185
0.532594
false
4.110699
false
false
false
benrudolph/commcare-hq
corehq/apps/locations/migrations/0002_populate_sql_locations.py
1
6831
# encoding: utf-8 from dimagi.utils.chunked import chunked from south.v2 import DataMigration from corehq.apps.locations.models import Location, SQLLocation from corehq.apps.commtrack.models import SupplyPointCase from dimagi.utils.couch.bulk import get_docs import corehq.apps.locations.models as location_models from d...
bsd-3-clause
7,674,036,008,011,041,000
40.907975
161
0.539892
false
4.075776
false
false
false
MERegistro/meregistro
meregistro/apps/seguridad/models/Perfil.py
1
1699
# -*- coding: UTF-8 -*- from django.db import models from apps.seguridad.models import Ambito, Rol, Usuario from apps.seguridad.audit import audit @audit class Perfil(models.Model): usuario = models.ForeignKey(Usuario, related_name='perfiles') ambito = models.ForeignKey(Ambito) rol = models.ForeignKey(Rol) fecha_...
bsd-3-clause
-4,703,668,321,805,579,000
28.807018
95
0.728075
false
2.593893
false
false
false
JMG1/NiCr
Workbench/NiCrInit.py
1
8908
# -*- coding: utf-8 -*- # NiCr (Hot Wire CNC Cutter) workbench for FreeCAD # (c) 2016 Javier Martínez García #*************************************************************************** #* (c) Javier Martínez García 2016 * #* ...
gpl-2.0
2,541,831,291,025,404,400
37.713043
105
0.560422
false
4.438684
false
false
false
synctree/synctree-awsebcli
ebcli/controllers/setenv.py
2
1905
# Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
apache-2.0
6,917,153,609,947,582,000
40.434783
79
0.639895
false
3.985356
false
false
false
kawamuray/ganeti
lib/rpc_defs.py
1
27626
# # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2014 Google Inc. # # 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...
gpl-2.0
5,996,019,427,498,852,000
41.698609
80
0.650872
false
3.394274
false
false
false
pnulty/oiicss
code/initial.py
1
5610
# -*- coding: utf-8 -*- """ Created on Sun Sep 14 19:57:39 2014 plan: 1. do twitter retrieval 2. clean tweets heuristically 3. parse tweets syntactically 4. keyword search 5. person identification @author: paul """ #%% """ Stream listener code based on examples by Scott McHale https://github.com/computermacgyve...
gpl-2.0
-776,501,735,651,219,200
32.201183
137
0.623886
false
3.765101
false
false
false
Microsoft/PTVS
Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/conda/cli/main_remove.py
1
7833
# conda is distributed under the terms of the BSD 3-clause license. # Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause. from __future__ import absolute_import, division, print_function, unicode_literals from collections import defaultdict import logging from os.path import isdir import sys from .com...
apache-2.0
-3,478,237,782,332,216,000
39.169231
108
0.580365
false
3.834068
false
false
false
pelson/conda-build
conda_build/skeletons/rpm.py
1
29124
import argparse from conda_build.conda_interface import iteritems from conda_build.source import download_to_cache from conda_build.license_family import guess_license_family from copy import copy try: import cPickle as pickle except: import pickle as pickle import gzip import hashlib import io from os import (...
bsd-3-clause
-1,022,718,496,572,434,800
40.605714
164
0.524379
false
4.060226
false
false
false
ROHOST/enableDNS
project/backend/migrations/0001_initial.py
1
16309
# -*- 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 'userProfile' db.create_table(u'auth_userprofile', ( (u'id', self.gf('django.db.m...
gpl-2.0
-4,891,216,447,126,622,000
65.032389
187
0.57876
false
3.589129
false
false
false
ncphillips/django_rpg
accounts/forms.py
1
1934
from django.contrib.auth.forms import AuthenticationForm from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.forms import PasswordChangeForm from django.contrib.auth.forms import PasswordResetForm from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, ButtonHolder...
mit
-8,132,071,735,306,051,000
27.043478
80
0.581179
false
4.297778
false
false
false
amerizalde/reddit_imgur_scraper
scraper.py
1
5442
import BeautifulSoup as bs import re, praw, requests, os, glob, sys from sys import argv IMGUR_URL_PATTERN = re.compile(r'(http://i.imgur.com/(.*))(\?.*)?') # TODO : docstrings def downloadImage(imageUrl, localFileName): if "Pictures" not in os.listdir(os.getcwd()): os.mkdir("Pictures") localFileName ...
mit
-1,066,088,972,095,036,900
37.323944
81
0.594451
false
3.8378
false
false
false
pombredanne/python-ptrace
ptrace/syscall/posix_arg.py
1
2223
from ptrace.tools import readBits, formatBits from ptrace.signames import signalName # From /usr/include/bits/mman.h (Ubuntu Feisty, i386) MMAP_PROT_BITMASK = ( (1, "PROT_READ"), (2, "PROT_WRITE"), (4, "PROT_EXEC"), (0x01000000, "PROT_GROWSDOWN"), (0x02000000, "PROT_GROWSUP"), ) def formatMmapProt...
gpl-2.0
-3,963,036,326,259,300,400
26.444444
78
0.610886
false
2.593932
false
false
false
yudingding6197/fin_script
internal/compare_realtime.py
1
2473
#!/usr/bin/env python # -*- coding:utf8 -*- import os import urllib2,time import datetime from internal.realtime_obj import * from internal.trade_date import * ''' lst_non_yzcx_yzzt lst_non_yzcx_zt lst_non_yzcx_zthl lst_yzdt lst_dt lst_dtft ''' def get_zt_data(stcsItem, zt_dict): for i in stcsItem.lst_non_yz...
gpl-2.0
-4,697,059,688,466,913,000
27.310345
68
0.572067
false
1.9704
false
false
false
sloria/pipstat
pipstat.py
1
8817
#!/usr/bin/env python # -*- coding: utf-8 -*- """pipstat Prints download statistics for PyPI packages. Usage: pipstat <package> ... """ from __future__ import unicode_literals, print_function, division import re import sys import os import time import struct import math from collections import OrderedDict import...
mit
-2,365,146,020,032,873,500
32.271698
92
0.572304
false
3.780875
false
false
false
icsi-berkeley/ros_cqi
src/ros_cqi/darwin_interface.py
1
12490
import random from threading import Thread import math import rospy import time from std_msgs.msg import Float64 from sensor_msgs.msg import JointState from geometry_msgs.msg import Twist,Pose from gazebo_msgs.msg import ModelStates,LinkStates import tf import numpy as np from std_msgs.msg import * # from ros_cqi.gazeb...
gpl-2.0
-4,506,311,810,315,815,400
29.763547
110
0.531385
false
3.285977
false
false
false
jtrobec/pants
pants-plugins/src/python/internal_backend/sitegen/tasks/sitegen.py
2
14263
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import collections i...
apache-2.0
7,716,444,066,490,083,000
32.167442
100
0.6328
false
3.488748
true
false
false
duarteluis/losteod
losteod/practice/models.py
1
4282
from django.db import models from django.utils.translation import ugettext_lazy as _ from model_utils.models import TimeStampedModel from model_utils import Choices from phonenumber_field.modelfields import PhoneNumberField # External apps links from geodata.models import Place # from patient.models import Patient fr...
gpl-2.0
1,711,535,317,210,905,900
25.602484
92
0.66908
false
3.868112
false
false
false
blschatz/aff4
pyaff4/pyaff4/hashes.py
1
1897
# Copyright 2016,2017 Schatz Forensic Pty Ltd. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
apache-2.0
-6,461,192,652,429,665,000
27.757576
80
0.698998
false
3.253859
false
false
false
barnsnake351/nova
nova/tests/functional/api_sample_tests/test_rescue.py
4
4150
# Copyright 2012 Nebula, Inc. # Copyright 2013 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...
apache-2.0
-3,247,663,528,165,984,000
37.073394
78
0.596386
false
3.574505
true
false
false
100star/h2o
py/testdir_multi_jvm/test_parse_with_cancel.py
1
3012
import unittest, time, sys, random sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_import as h2i, h2o_jobs DELETE_KEYS = True class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_for_errors() @classmethod def setUpClass(cls): h2o.init(3, java_heap_GB=4) ...
apache-2.0
-8,431,273,331,982,492,000
43.294118
124
0.607902
false
3.765
false
false
false
Danielhiversen/home-assistant
homeassistant/components/camera/uvc.py
3
6420
""" Support for Ubiquiti's UVC cameras. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/camera.uvc/ """ import logging import socket import requests import voluptuous as vol from homeassistant.const import CONF_PORT from homeassistant.components.camera ...
mit
-5,670,983,259,629,592,000
30.940299
79
0.587695
false
4.144609
true
false
false
dmkent/gtimelog-redmine
log_time.py
1
2854
#!/usr/bin/env python """Tool to automatically log time from gTimeLog files to Redmine. Any task with an issue tag in it will contribute spent time to that issue. """ from datetime import date import logging import optparse import os import re from dateutil.parser import parse as parse_date import pandas impor...
mit
-6,789,813,825,676,506,000
26.442308
74
0.601612
false
3.66838
false
false
false
biotrump/ITK
Examples/Segmentation/WatershedSegmentation1.py
32
1483
#========================================================================== # # Copyright Insight Software Consortium # # 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...
apache-2.0
1,925,015,761,026,281,000
31.955556
77
0.693864
false
3.573494
false
false
false
anderson7ru/bienestarues
psicologiaapp/forms.py
1
4267
from django import forms from django.forms import ModelForm, Textarea, NumberInput, TextInput, DateInput, Select #from .models import Psicologia,ProcesoTerapeutico from .models import Psicologia, ProcesoTerapeutico, RegistroAvance from empleadosapp.models import Doctor Elecciones_Tecnicas = ( ('observacion','Obser...
mit
-5,899,655,658,180,286,000
59.971429
180
0.621983
false
3.3362
false
false
false
mikehankey/fireball_camera
tag-runner.py
1
5560
#!/usr/bin/python3 import subprocess import glob import os from pathlib import Path proc_dir = "/mnt/ams2/SD/proc/*" def parse_date (this_file): el = this_file.split("/") file_name = el[-1] file_name = file_name.replace("_", "-") file_name = file_name.replace(".", "-") fnel = file_name.split("-") ...
gpl-3.0
-2,356,733,371,669,973,500
34.414013
104
0.526439
false
3.146576
false
false
false
tuwiendsg/MELA
MELA-Extensions/MELA-ComplexCostEvaluationService/tests/spark/sensor.py
1
2423
import socket, time, random from threading import Thread spark_master_ip="10.99.0.48" spark_master_port=9999 sensorFrequency = 1 sensorsCount = 500 def sendDataToSocket(ip, port, data): clientsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) clientsocket.connect((spark_master_ip, spark_master_port)) ...
apache-2.0
-3,876,725,730,419,125,000
43.87037
205
0.467189
false
4.177586
false
false
false
UPPMAX/nsscache
nss_cache/maps/sshkey.py
2
2072
# Copyright 2014 Google Inc. # # 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 ho...
gpl-2.0
5,202,932,663,126,739,000
29.470588
73
0.710425
false
3.726619
false
false
false
DmitryADP/diff_qc750
external/webkit/Tools/Scripts/webkitpy/common/net/testoutput_unittest.py
15
6444
#!/usr/bin/env python # Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this lis...
gpl-2.0
-5,172,897,895,154,479,000
43.75
130
0.682495
false
3.815275
true
false
false
badbytes/pymeg
extra/nifti/image.py
1
22630
#emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*- #ex: set sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the PyNIfTI package for the # copyright and license terms. # ### ### ### ### ### ### #...
gpl-3.0
-7,450,687,381,324,502,000
33.444444
82
0.593372
false
4.204757
false
false
false
ComparativeGenomicsToolkit/Comparative-Annotation-Toolkit
tools/toilInterface.py
1
3426
""" Helper functions for toil-luigi interfacing """ from . import bio import math import argparse from toil.lib.humanize import human2bytes try: from toil.fileStores import FileID except ImportError: from toil.fileStore import FileID ### # Helper functions for luigi-toil pipelines ### def load_fasta_from_fil...
apache-2.0
-6,733,844,101,514,847,000
41.825
119
0.67338
false
3.648562
false
false
false
JY-Zhou/FreePSI
scripts/evaluateSplicedPsi.py
1
2410
import os import math import sys import json import numpy as np import scipy as scp import scipy.stats as stats from sklearn import metrics def filter(i, j): if len(truePsi[i]) < 40: if trueTpm[i] >= TPMFILTER and mask[i][j] > 0: return True return False def statFilter(): reserveGene ...
gpl-3.0
-9,128,138,484,145,800,000
27.023256
71
0.600415
false
2.896635
false
false
false
openstack/cloudkitty
cloudkitty/tests/utils.py
2
2001
# -*- coding: utf-8 -*- # Copyright 2018 Objectif Libre # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
apache-2.0
-1,393,067,384,837,356,000
33.5
78
0.596702
false
4.194969
false
false
false
lisaglendenning/pynet
source/pynet/events/serialize.py
1
13460
# @copyright # @license from __future__ import absolute_import import collections from peak.events import trellis from pypetri import net from ..io import sockbuf, socket from . import buffered ############################################################################# ##########################################...
mit
4,785,510,138,658,702,000
33.075949
87
0.482392
false
4.912409
false
false
false
thecookieraider/PyStar
Maze Generation/Main.py
1
2684
import Pathfinder import pygame DISPLAYSURF = None BASIC_FONT = None BOX_MAZE = 0x01 REG_MAZE = 0x02 def main(): global DISPLAYSURF, BASIC_FONT print('\n') win_w, win_h = get_windims() w, h = get_boxdims(win_w, win_h) diagonals = input("Would you like to give AStar the ability to move diagon...
mit
8,918,307,377,015,712,000
30.952381
115
0.574888
false
3.612382
false
false
false
htcondor/htcondor
src/condor_tests/test_htcondor_dags/dag/test_node_containment.py
1
1154
# Copyright 2020 HTCondor Team, Computer Sciences Department, # University of Wisconsin-Madison, WI. # # 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/LICE...
apache-2.0
-7,679,176,256,301,285,000
26.47619
74
0.70364
false
3.374269
false
false
false
tdjordan/tortoisegit
gitgtk/gitcmd.py
1
5566
# # A simple dialog to execute random command for TortoiseHg # # Copyright (C) 2007 TK Soh <teekaysoh@gmail.com> # import pygtk pygtk.require("2.0") import gtk import gobject import pango import os import threading import Queue from hglib import HgThread, hgcmd_toq, toutf from shlib import set_tortoise_icon, get_syst...
gpl-2.0
-919,059,043,341,690,600
31.360465
82
0.570967
false
3.683653
false
false
false
NicoVarg99/daf-recipes
ckan/ckan/ckan/ckan/lib/activity_streams.py
1
10068
# encoding: utf-8 import re from webhelpers.html import literal import ckan.lib.helpers as h import ckan.lib.base as base import ckan.logic as logic from ckan.common import _ # get_snippet_*() functions replace placeholders like {user}, {dataset}, etc. # in activity strings with HTML representations of particular ...
gpl-3.0
-4,411,543,734,515,603,500
38.328125
80
0.675109
false
4.04175
false
false
false
glon/django_test
mysite/urls.py
1
1531
"""mysite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
apache-2.0
2,364,230,815,313,625,600
44.029412
88
0.697583
false
3.568765
false
false
false
chenokay/ripozo
ripozo_tests/unit/dispatch/adapters/siren.py
2
8670
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import json import mock import six from ripozo.adapters import SirenAdapter from ripozo.exceptions import RestException from ripozo.resources.relationships import Relat...
gpl-2.0
-7,555,894,722,488,737,000
34.532787
118
0.602076
false
4.307004
true
false
false
pkerpedjiev/forna
forna_server.py
1
9511
#!/usr/bin/python """forna_server.py: A server for converting RNA secondary structures to force-directed graphs and doing something more.""" __author__ = "Stefan Hammer" __copyright__ = "Copyright 2014"...
apache-2.0
4,331,853,394,452,672,500
33.33574
126
0.567869
false
3.818145
false
false
false
bgalehouse/grr
gui/plugins/fileview_widgets.py
13
6850
#!/usr/bin/env python """Widgets for advanced display of files.""" from grr.gui import renderers from grr.lib import utils class HexView(renderers.TemplateRenderer): """Display a HexView of a file. Internal State: - aff4_path: The name of the aff4 object we are viewing now. - age: The version of the A...
apache-2.0
-2,107,428,899,800,185,600
32.091787
79
0.606715
false
3.588266
false
false
false
pmatigakis/jsbsim
tests/CheckTrim.py
3
3424
# CheckTrim.py # # Regression tests of the trim feature # # Copyright (c) 2016 Bertrand Coconnier # # 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 o...
lgpl-2.1
-1,200,185,649,620,738,000
43.467532
79
0.653329
false
3.627119
true
false
false
magicicada-bot/magicicada-server
magicicada/txlog/utils.py
1
7527
# Copyright 2008-2015 Canonical # Copyright 2015-2018 Chicharreros (https://launchpad.net/~chicharreros) # # 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 # Licens...
agpl-3.0
5,195,768,032,494,729,000
34.338028
78
0.682211
false
3.850128
false
false
false
senghoo/operator
app.py
1
1384
import os import logging import tornado.ioloop import tornado.web from tornado.options import define, options import controllers from utils import make_path from model import engine, Session from gsm import GSM from handler import init_handles define("port", default=8888, type=int) define("host", default="0.0.0.0") d...
mit
1,945,826,563,649,754,600
29.086957
79
0.661127
false
3.477387
false
false
false
jberci/resolwe
resolwe/elastic/pagination.py
1
1523
""".. Ignore pydocstyle D400. ================== Elastic Paginators ================== Paginator classes used in Elastic app. .. autoclass:: resolwe.elastic.pagination.LimitOffsetPostPagination """ from rest_framework.pagination import LimitOffsetPagination, _positive_int def get_query_param(request, key): "...
apache-2.0
-4,054,156,702,767,125,000
27.203704
74
0.604071
false
4.532738
false
false
false
m48/sgl
sgl/lib/TextSprite.py
1
12342
import sgl from sgl.lib.Rect import Rect from sgl.lib.Sprite import Sprite, RectSprite, Scene, App import sgl.lib.Time as time def is_string(thing): """ Returns whether `thing` is a string or not. """ if 'basestring' not in globals(): return isinstance(thing, str) else: return isinstance(t...
gpl-3.0
-8,625,688,995,167,473,000
28.385714
164
0.503727
false
3.80339
false
false
false
saddingtonbaynes/rez
src/rezgui/mixins/ContextViewMixin.py
3
1214
from rezgui.qt import QtCore from rezgui.models.ContextModel import ContextModel class ContextViewMixin(object): """Context view class mixin. Eg: class MyContextView(QWidget, ContextViewMixin): def __init__(self, context_model): super(MyContextView, self).__init__() ...
gpl-3.0
4,107,100,970,121,365,500
33.685714
67
0.611203
false
4.259649
false
false
false
argriffing/cvxpy
cvxpy/atoms/affine/vstack.py
11
2033
""" Copyright 2013 Steven Diamond This file is part of CVXPY. CVXPY 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. CVXPY is distributed i...
gpl-3.0
-7,327,869,829,915,756,000
31.269841
68
0.653222
false
4.057884
false
false
false
scolby33/address_extractor
src/address_extractor/__main__.py
1
3427
#!/usr/bin/env python3 """A script to extract US-style street addresses from a text file.""" import argparse import collections import os import re import sys import usaddress def parsed_address_to_human(address): """Turns a `usaddress` address tuple into a 3-tuple of strings roughly divided by the lines you woul...
mit
4,056,181,032,466,484,000
35.457447
311
0.640502
false
4.041274
false
false
false
wolfmanstout/dragonfly
dragonfly/engines/backend_kaldi/testing.py
2
1492
# # This file is part of Dragonfly. # (c) Copyright 2019 by David Zurow # Licensed under the LGPL. # # Dragonfly is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation, either version 3 of the License, or...
lgpl-3.0
4,397,152,756,933,050,400
34.52381
80
0.703753
false
3.595181
false
false
false
saisankargochhayat/algo_quest
leetcode/46.Permutations/soln.py
1
1250
from typing import List # Using backtracking class Solution: def permute(self, nums: List[int]) -> List[List[int]]: # curr = current elements in the iteration. # elements = remaining elements to be considered. # added = list of indicaters whether element added to curr or not. ...
apache-2.0
-6,106,606,895,229,140,000
32.810811
125
0.5256
false
4.194631
false
false
false
marcok/odoo_modules
hr_employee_time_clock/wizard/import_leave_requests.py
1
4154
# -*- coding: utf-8 -*- ############################################################################## # # Clear Groups for Odoo # Copyright (C) 2016 Bytebrand GmbH (<http://www.bytebrand.net>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser ...
agpl-3.0
-5,105,312,413,970,348,000
44.648352
79
0.526721
false
4.520131
false
false
false
muelli/mysql-proxy-python
examples/union.py
2
1604
# LICENSE BEGIN # # Copyright (c) 2010 Ysj.Ray # # 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 dis...
gpl-3.0
7,494,654,215,744,195,000
23.676923
71
0.696384
false
3.15748
false
false
false
ray525/djangular
backend/oauth_test/pyuser/migrations/0001_initial.py
1
1063
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-12-04 14:04 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migratio...
gpl-3.0
-5,969,970,288,418,507,000
34.433333
121
0.614299
false
4.120155
false
false
false
RAMSProject/rams
uber/menu.py
1
3509
from uber.common import * class MenuItem: access = None # list of permission levels allowed to display this menu href = None # link to render submenu = None # submenu to show name = None # name of Menu item to show def __init__(self, href=None, access=None, submenu=None, name=None): ...
agpl-3.0
-204,520,239,238,068,160
36.731183
110
0.575378
false
3.864537
false
false
false
GoogleCloudPlatform/dynamodb-spanner-migration
ddbpubsub.py
1
1653
# # 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, so...
apache-2.0
-6,963,972,389,264,981,000
36.568182
86
0.730792
false
3.86215
false
false
false
stxnext-kindergarten/presence-analyzer-bwiater
src/presence_analyzer/forms.py
1
1972
# -*- coding: utf-8 -*- """ Defines forms. """ from flask_wtf.form import FlaskForm from wtforms import HiddenField, PasswordField, TextField, validators from presence_analyzer.main import app class LoginOrRegisterForm(FlaskForm): """ Base form for LoginForm and RegisterForm. Defines username and password...
mit
-3,119,814,744,765,035,000
27.57971
79
0.60497
false
4.512586
false
false
false
uclouvain/osis
education_group/ddd/service/write/postpone_mini_training_and_orphan_group_modifications_service.py
1
4754
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
agpl-3.0
3,398,602,406,109,820,400
46.53
118
0.675363
false
3.814607
false
false
false
sanguinariojoe/FreeCAD
src/Mod/Draft/draftguitools/gui_offset.py
9
15086
# *************************************************************************** # * (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * (c) 2009, 2010 Ken Cline <cline@frii.com> * # * (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> * # * ...
lgpl-2.1
-4,654,320,490,950,746,000
44.577039
243
0.483163
false
4.358856
false
false
false
all-of-us/raw-data-repository
rdr_service/model/resource_search_results.py
1
1111
from sqlalchemy import event, Index, Column, Integer, ForeignKey, BigInteger from rdr_service.model.base import Base, model_insert_listener, model_update_listener from rdr_service.model.utils import UTCDateTime6 class ResourceSearchResults(Base): """ Resource Search Results Model """ __tablename__ =...
bsd-3-clause
7,212,412,127,240,986,000
38.678571
104
0.751575
false
3.87108
false
false
false
rouge8/pip
tests/lib/git_submodule_helpers.py
1
2640
from __future__ import absolute_import import textwrap from tests.lib import _create_main_file, _git_commit def _create_test_package_submodule(env): env.scratch_path.joinpath("version_pkg_submodule").mkdir() submodule_path = env.scratch_path / 'version_pkg_submodule' env.run('touch', 'testfile', cwd=sub...
mit
-4,428,424,041,635,468,000
35.666667
77
0.625
false
3.641379
true
false
false
kdart/pycopia
SNMP/pycopia/SNMP/__init__.py
1
4607
#!/usr/bin/python2.7 # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # 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
5,588,733,115,701,492,000
22.150754
91
0.70089
false
3.552043
false
false
false
optimizely/gcloud-python
gcloud/datastore/test___init__.py
1
6066
# Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
-4,360,693,509,295,424,500
35.323353
75
0.678701
false
3.936405
true
false
false
maweina/ambari-elk-service
src/package/scripts/status_params.py
1
1355
#!/usr/bin/env python """ 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");...
apache-2.0
4,236,327,434,833,021,400
41.375
79
0.777122
false
3.860399
true
false
false
aliafshar/pygtkhelpers
tests/test_forms.py
2
1222
from pygtkhelpers.utils import refresh_gui from pygtkhelpers.test import CheckCalled import gtk from pygtkhelpers.forms import FormView, Field from flatland import Dict, String, Integer, Boolean class PersonForm(FormView): schema_type = Dict.of( String.named('name'), Integer.named('age'), ...
lgpl-3.0
-1,725,122,664,915,798,300
22.056604
51
0.671031
false
3.471591
false
false
false
ivanistheone/waiter
runs/migrations/0001_initial.py
1
3627
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-06-07 23:03 from __future__ import unicode_literals import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion import runs.models import uuid class Migration(migrations.Migration): initial = T...
mit
-5,513,610,907,880,007,000
53.954545
163
0.61952
false
4.075281
false
false
false
johngian/mozillians
mozillians/groups/managers.py
3
1092
from django.db.models import Case, Count, IntegerField, Manager, Sum, When from django.db.models.query import QuerySet class GroupBaseManager(Manager): use_for_related_fields = True def get_queryset(self): """Annotate count of group members.""" qs = super(GroupBaseManager, self).get_queryset(...
bsd-3-clause
-8,706,275,646,818,700,000
26.3
74
0.608059
false
4.403226
false
false
false
jorgebaier/iic1103-s7-2016
clase1117/laberinto.py
1
2830
import os import time class Vector: def __init__(self,x,y): self.x=x self.y=y def __add__(self,v): return Vector(self.x+v.x,self.y+v.y) def __eq__(self,v): return self.x==v.x and self.y==v.y def __str__(self): return "(" + str(self.x) + ","+ str(self.y) + ")" class Laberinto: def __init__(self, path...
unlicense
8,140,865,529,593,895,000
26.466019
82
0.481796
false
3.211124
false
false
false
susam/ice
setup.py
1
2236
# The MIT License (MIT) # # Copyright (c) 2014-2017 Susam Pal # # 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, mo...
mit
226,347,976,487,531,900
36.898305
72
0.68381
false
4.250951
false
false
false
c-PRIMED/puq
puq/smolyak_funcs.py
1
3519
from numpy import * from scipy.special import jacobi, gamma, legendre from math import factorial """@package smolyak_funcs Functions for Smolyak UQ method """ def memoize(f, cache={}): def g(*args, **kwargs): key = ( f, tuple(args), frozenset(kwargs.items()) ) if key not in cache: cach...
mit
-6,310,329,653,000,538,000
25.458647
99
0.533106
false
3.046753
false
false
false
glenndrives/team_switch
teamswitch.py
2
4544
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' IMPORTANT READ!!! This code only works under Python 3.4.2 and up. ''' # (C) Copyright 2017 Glenn Hickman <glennh@gjjtjc.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as...
gpl-2.0
-8,661,761,672,758,434,000
38.859649
168
0.691901
false
3.0253
false
false
false
indro/t2c
apps/external_apps/schedule/forms.py
2
2370
from django import forms from schedule.models import Event import datetime import time class GlobalSplitDateTimeWidget(forms.SplitDateTimeWidget): def __init__(self, hour24 = False, attrs=None, *args, **kwargs): """ hour24 is a boolean. If set to true it will display like a normal SplitDate...
mit
-708,947,611,846,500,100
38.5
128
0.588186
false
4.324818
false
false
false
Feedcry/AzureODM-py
AzureODM/Fields.py
1
3648
""" AzureTableODM.Fields """ from datetime import datetime import simplejson as json from . import _datetime_json_encoder, _datetime_json_object_hook class GenericField(object): def __init__(self, _type, required=False, require_serializing=False, ...
bsd-3-clause
-6,919,605,396,024,784,000
25.244604
77
0.633498
false
4.514851
false
false
false
jeromecc/doctoctocbot
src/autotweet/tree.py
1
9715
import re import logging from typing import List, Optional import http.client import time import numpy as np from selenium.webdriver.common.action_chains import ActionChains from selenium.common.exceptions import NoSuchElementException, StaleElementReferenceException from bot.lib.statusdb import Addstatus from autotw...
mpl-2.0
-3,505,987,227,553,804,300
35.80303
93
0.580237
false
3.693916
false
false
false
lmbringas/Projecto-Pilas
personaje.py
1
3650
import pilas from pilas.actores import Actor from pilas.comportamientos import Comportamiento VELOCIDAD = 100 NORTE = 0 SUR = 2 ESTE = 1 OESTE = 3 class MiActor(Actor): def __init__(self, mapa, x=50, y=-50, imagen="Maton.png", velocidad=None,enemigos=[4,8,8,8,8,8,8,8,8,8,8,8,8,8,8,4]): Actor.__init__(s...
lgpl-2.1
-4,392,003,805,519,809,500
32.796296
121
0.608219
false
2.603424
false
false
false
amolenaar/gaphor
gaphor/UML/usecases/usecaseconnect.py
1
1744
""" Use cases related connection adapters. """ from gaphor import UML from gaphor.diagram.connectors import Connector, RelationshipConnect from gaphor.UML.usecases.extend import ExtendItem from gaphor.UML.usecases.include import IncludeItem from gaphor.UML.usecases.usecase import UseCaseItem @Connector.register(UseC...
lgpl-2.1
-3,588,916,324,894,989,000
29.596491
78
0.688073
false
4.113208
false
false
false
RicardoJohann/frappe
frappe/custom/doctype/property_setter/property_setter.py
1
3092
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.model.document import Document not_allowed_fieldtype_change = ['naming_series'] class PropertySetter(Document): def autoname(sel...
mit
5,374,390,233,962,951,000
34.54023
127
0.706016
false
3.158325
false
false
false
sam-m888/gprime
gprime/app/forms/mediaform.py
1
2660
# # gPrime - a web-based genealogy program # # Copyright (c) 2015 Gramps Development Team # # 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)...
gpl-2.0
3,284,954,630,264,767,500
28.555556
92
0.611278
false
3.816356
false
false
false
kjteske/groupmestats
groupmestats/memberlookup.py
1
2293
import argparse import os import groupy import yaml from ._config import DATA_DIR, get_groupme_token from groupmestats.grouplookup import get_group _MANUAL_FILENAME = os.path.join(DATA_DIR, "members.yaml") _AUTO_FILENAME = os.path.join(DATA_DIR, "members-generated.yaml") class MemberNotFoundError(RuntimeError): ...
mit
-6,085,145,156,437,151,000
28.779221
91
0.630615
false
3.544049
false
false
false
vanossj/pyAtlasBoneSegmentation
src/pyAtlasSegmentation.py
1
69213
''' Created on Jul 27, 2011 @author: grant Ideas for Improvement 1. Create Ball&Socket joint class as well as Hinge joint class that inherit from joint class, these classes will call a specific version of joint.rotate(). The ball&socket joint is very similar to spherical except the vector that...
mit
-3,671,730,544,201,504,300
52.369992
489
0.656669
false
3.606158
false
false
false
team-vigir/vigir_behaviors
vigir_flexbe_states/src/vigir_flexbe_states/update_dynamic_parameter_state.py
1
2197
#!/usr/bin/env python from flexbe_core import EventState import rospy from dynamic_reconfigure.client import Client """ Created on 11/03/2014 @author: Philipp Schillinger """ class UpdateDynamicParameterState(EventState): """ Updates a given trajectory controller parameter. """ LEFT_ARM_WRX = ['left_arm_traj_...
bsd-3-clause
-833,118,594,729,259,100
28.293333
143
0.665908
false
2.868146
false
false
false
nikha1/nyc-taxi
Tools/InMemoryGraph/Components.py
1
3298
from threading import Thread from socket import * import time import rdflib as rdf import json import utils.graphlib as gl import datetime as dt class GraphHandler: def __init__(self, observable, basetime = dt.datetime.now() ,cache_size=30): self.g = rdf.Graph() self.buffer = rdf.Graph() s...
mit
-968,147,284,624,529,500
26.491667
82
0.578229
false
3.88
false
false
false
RENCI/xDCIShare
hs_core/views/__init__.py
1
76892
from __future__ import absolute_import import json import datetime import pytz import logging from django.core.mail import send_mail from django.contrib.auth import authenticate, login as auth_login from django.contrib.auth.decorators import login_required from django.contrib.auth.models import Group, User from django...
bsd-3-clause
-8,713,043,228,192,318,000
43.549247
133
0.626671
false
4.116054
false
false
false
albertz/music-player
mac/pyobjc-framework-Cocoa/Examples/AppKit/CocoaBindings/FilteringController/FilteringControllerDocument.py
3
1724
# # FilteringControllerDocument.py # FilteringController # # Converted by u.fiedler on 05.02.05. # # The original version was written in Objective-C by Malcolm Crawford # at http://homepage.mac.com/mmalc/CocoaExamples/controllers.html from PyObjCTools import AppHelper from Cocoa import * class FilteringControl...
bsd-2-clause
354,614,769,919,587,140
25.9375
88
0.693155
false
3.660297
false
false
false
alvin319/CarnotKE
jyhton/Misc/make_checker.py
7
5115
import __builtin__ import sys import __builtin__ opt = lambda n: getattr(__builtin__, n, None) def f(): pass try: raise Exception except: _, _, tb = sys.exc_info() class C: f = f m = C.f types_list = [ object, type, unicode, dict, list, slice, super, staticmethod, float, opt('enumerate'), open, opt('...
apache-2.0
-1,311,923,850,236,981,800
23.357143
96
0.530401
false
3.428284
false
false
false
mxm/incubator-beam
sdks/python/apache_beam/runners/worker/statesampler_test.py
5
4459
# # 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
-3,705,870,611,867,241,500
37.773913
80
0.668984
false
3.991943
true
false
false
aquatix/imagine-gallery
imaginegallery/imagine/actions.py
1
15083
# encoding: utf-8 from __future__ import absolute_import import json import logging import os from datetime import datetime import exifread import imagehash import pytz import requests from django.conf import settings from PIL import ExifTags from PIL import Image as PILImage from PIL import ImageFile as PILImageFil...
apache-2.0
255,809,343,760,371,680
35.083732
119
0.612279
false
3.957754
false
false
false