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
tedlaz/pyted
qtprint3/report_table.py
1
14003
# -*- coding: utf-8 -*- ''' Created on 3 Mar 2013 @author: tedlaz version 1.0 ''' import decimal import PyQt5.QtCore as Qc import PyQt5.QtGui as Qg import PyQt5.QtPrintSupport as Qp PAGE_NUMBER_TEXT = 'Σελίδα' def isNum(value): # Einai to value arithmos, i den einai ? """ use: Returns False i...
gpl-3.0
-5,898,960,593,881,512,000
33.205063
78
0.538257
false
3.27354
false
false
false
eywalker/datajoint-python
tests/test_attach.py
1
2251
from nose.tools import assert_true, assert_equal, assert_not_equal from numpy.testing import assert_array_equal import tempfile from pathlib import Path import os from .schema_external import Attach def test_attach_attributes(): """ test saving files in attachments """ # create a mock file table = Attach...
lgpl-2.1
-4,984,724,155,670,180,000
33.106061
104
0.643714
false
3.334815
false
false
false
kirienko/gourmet
src/gourmet/plugins/nutritional_information/shopping_plugin.py
1
3423
import os.path from gi.repository import Gtk import gourmet.GourmetRecipeManager import gourmet.recipeManager from gourmet.i18n import _ from gourmet.plugin import ShoppingListPlugin from gourmet.prefs import Prefs from .nutritionLabel import NutritionLabel class ShoppingNutritionalInfoPlugin (ShoppingListPlugin):...
gpl-2.0
421,188,104,683,355,140
36.206522
105
0.589833
false
3.521605
false
false
false
NMTHydro/Recharge
utils/amf_obs_analysis.py
1
2326
# =============================================================================== # Copyright 2016 dgketchum # # 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/licens...
apache-2.0
483,245,684,274,130,100
45.52
97
0.575236
false
3.518911
false
false
false
ksenia007/dlaCluster
fractalDimensionality.py
1
1799
""" This function finds the fractal dimensionality of the cluster """ from DLAcluster import DLAcluster import numpy import matplotlib.pyplot as plt from scipy.optimize import curve_fit radiusArray=numpy.arange(10,80,5) mass=[] for i in radiusArray: massValue,matrix=DLAcluster(i,False) #import radius and Tru...
mit
5,911,563,522,774,789,000
30.017241
92
0.600334
false
3.548323
false
false
false
bzshang/yelp-photo-classification
scripts/create_img_lst.py
1
1895
""" Create a multi-label image list file according to http://myungjun-youn-demo.readthedocs.org/en/latest/python/io.html """ __author__ = 'bshang' import numpy as np import pandas as pd from sklearn import preprocessing def convert_label_to_array(str_label): str_label = str_label.split(' ') return [int(x) fo...
apache-2.0
6,522,732,187,429,842,000
32.839286
106
0.594723
false
2.866868
false
false
false
hplustree/trove
trove/instance/tasks.py
1
5160
# Copyright 2012 OpenStack Foundation # 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 requ...
apache-2.0
-3,250,915,738,083,927,000
40.95122
78
0.532752
false
4.328859
false
false
false
darren-wang/op
oslo_policy/sql.py
1
4073
# Copyright 2012 OpenStack LLC # # 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 writin...
apache-2.0
-7,294,282,229,451,771,000
39.73
77
0.630739
false
3.753917
false
false
false
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_parameters.py
1
2077
# 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
2,804,683,573,402,267,000
39.72549
96
0.636013
false
4.457082
false
false
false
political-memory/django-representatives-votes
representatives_votes/migrations/0001_initial.py
1
2777
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Dossier', fields=[ ('id', models.AutoField(verb...
agpl-3.0
-1,841,945,215,058,576,400
45.283333
142
0.544833
false
4.393987
false
false
false
jamslevy/gsoc
thirdparty/google_appengine/google/appengine/api/user_service_pb.py
1
2072
#!/usr/bin/env python # # Copyright 2007 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 o...
apache-2.0
-8,208,109,922,592,143,000
21.769231
74
0.666988
false
3.590988
false
false
false
swanysimon/rd2weekly
summary/scoring.py
1
1405
from collections import namedtuple from itertools import groupby Player = namedtuple("Player", "name cbs_id_number in_lineup active_pitcher") class Team: def __init__(self, name, division): self.name = name self.division = division self.players = [] self.wins = [] self.l...
mit
3,190,130,946,123,452,400
27.673469
76
0.589324
false
3.746667
false
false
false
babyliynfg/cross
tools/project-creator/Python2.6.6/Lib/test/test_csv.py
1
40695
# -*- coding: iso-8859-1 -*- # Copyright (C) 2001,2002 Python Software Foundation # csv package unit tests import sys import os import unittest from StringIO import StringIO import tempfile import csv import gc from test import test_support class Test_Csv(unittest.TestCase): """ Test the underl...
mit
149,992,621,648,327,900
36.831107
108
0.506573
false
3.763873
true
false
false
faush01/plugin.video.embycon
resources/lib/datamanager.py
1
12522
# Gnu General Public License - see LICENSE.TXT import json from collections import defaultdict import threading import hashlib import os import cPickle import time from .downloadutils import DownloadUtils from .simple_logging import SimpleLogging from .item_functions import extract_item_info from .kodi_utils import H...
gpl-2.0
4,095,778,726,364,563,000
37.176829
107
0.576026
false
3.987898
false
false
false
D-iii-S/Bobic
last.py
1
1151
import os import time import utils class last: def __init__(self): self.nolast = "No foreign lastlog" def lastlog(self): fd = os.popen("last -10 -w -F") users = [utils.get_username()] nolastlog = True for line in fd: line = line.strip() backup = line if line == "": break pieces = line.spl...
apache-2.0
-2,221,521,439,989,490,200
20.716981
69
0.590791
false
2.89196
false
false
false
boblefrag/python-rest-api-framework
tests/controllers_test.py
1
3913
from unittest import TestCase import json import time from werkzeug.wrappers import BaseResponse from werkzeug.test import Client from app import ApiApp from rest_api_framework.authentication import ApiKeyAuthentication from rest_api_framework.datastore import PythonListDataStore from rest_api_framework import models...
mit
1,717,447,640,130,257,000
28.421053
78
0.567851
false
4.136364
true
false
false
missionpinball/mpf
mpf/tests/test_RGBColor.py
1
6414
import unittest from mpf.core.rgba_color import RGBAColor from mpf.core.rgb_color import RGBColor, RGBColorCorrectionProfile class TestRGBColor(unittest.TestCase): def test_default_color(self): """Test the default color.""" color = RGBColor() self.assertEqual((0, 0, 0), color.rgb) ...
mit
1,871,851,357,513,084,400
39.594937
86
0.603991
false
3.579241
true
false
false
vbwagner/ctypescrypto
tests/testec.py
1
2298
from ctypescrypto import pyver from ctypescrypto.oid import Oid from ctypescrypto.ec import create from base64 import b16decode from subprocess import Popen, PIPE import unittest def dump_key(key): """ Convert key into printable form using openssl utility Used to compare keys which can be stored in differen...
mit
-1,205,380,533,858,710,000
38.62069
119
0.692341
false
2.833539
true
false
false
sorgerlab/belpy
indra/tools/reading/starcluster_reading/process_reach_from_s3.py
1
1614
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import sys import pickle import logging from indra.sources import reach from indra.literature import s3_client if __name__ == '__main__': usage = "Usage: %s pmid_list start_index end_index" % sys.argv[0] if ...
mit
3,977,894,421,920,643,000
32.625
78
0.60223
false
3.376569
false
false
false
kg-bot/SupyBot
plugins/RequestBot/__init__.py
1
2605
### # Copyright (c) 2015, KG-Bot # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of conditions, and t...
gpl-3.0
3,945,267,707,427,858,400
37.308824
79
0.760845
false
4.208401
false
false
false
PinguinoIDE/pinguino-ide
pinguino/qtgui/ide/custom_widgets/code_editor/syntax.py
1
3711
#! /usr/bin/python #-*- coding: utf-8 -*- import datetime today = datetime.datetime.now() Autocompleter = {} Autocompleter["directive"] = ["define", "include", "ifndef", "endif", "undef", "if", "elif", "else", "error", "warning"] #from const.h const = [ "PI", "HALF_PI", "TWO_PI", "DEG_TO_RAD", "RAD_TO_DEG", "NULL", ...
gpl-2.0
1,781,279,100,530,614,800
38.913978
183
0.516033
false
2.693033
false
false
false
geonition/dashboard
dashboard/models.py
1
2789
from django.db import models from django.contrib.gis.db import models as geomodels from django.core.urlresolvers import reverse from django.utils import translation from django.contrib.auth.models import User from django.db.models import Avg, Count from django.core.mail import send_mail from django.conf import settings...
mit
2,679,844,413,973,452,300
41.907692
205
0.594478
false
4.520259
false
false
false
uclouvain/osis_louvain
base/models/enums/vacant_declaration_type.py
1
2117
############################################################################## # # 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
-7,085,030,439,298,773,000
41.32
87
0.674386
false
3.435065
false
false
false
sussexstudent/falmer
falmer/events/migrations/0034_auto_20190919_1108.py
1
1311
# Generated by Django 2.2.4 on 2019-09-19 10:08 from django.conf import settings from django.db import migrations, models import django_extensions.db.fields class Migration(migrations.Migration): dependencies = [ ('events', '0033_auto_20190820_1356'), ] operations = [ migrations.AddFiel...
mit
2,254,729,209,743,373,600
31.775
124
0.596491
false
4.298361
false
false
false
pombredanne/invenio
modules/bibsword/lib/bibsword_client_templates.py
1
42258
# -*- coding: utf-8 -*- ## This file is part of Invenio. ## Copyright (C) 2010 CERN. ## ## Invenio 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...
gpl-2.0
-329,531,007,690,559,500
36.899552
165
0.46874
false
4.116306
false
false
false
gebhard73/dshield
srv/dshield/weblogsubmit.py
1
3107
#!/usr/bin/env python # submit logs to DShield 404 project import os import sys import sqlite3 from DShield import DshieldSubmit from datetime import datetime import json # We need to collect the local IP to scrub it from any logs being submitted for anonymity, and to reduce noise/dirty data. # To do: turn below into...
gpl-2.0
-6,164,848,956,159,228,000
32.408602
148
0.650789
false
3.305319
false
false
false
Asalle/coala
coalib/results/Result.py
1
12073
import uuid from os.path import relpath from coala_utils.decorators import ( enforce_signature, generate_ordering, generate_repr, get_public_members) from coalib.bearlib.aspects import aspectbase from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY from coalib.results.SourceRange import SourceRange # Omit ...
agpl-3.0
5,308,395,310,088,770,000
35.47432
80
0.553384
false
4.885876
false
false
false
sunspotter/database
orm2.py
1
11253
import datetime from sqlalchemy import create_engine, exists from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, Integer, String, DateTime, Float, Boolean,\ ForeignKey from sqlalchemy.orm import relationship def _convert_bool(s): ''' Function to be just used here!! ...
gpl-3.0
-4,029,971,202,083,332,000
40.677778
407
0.514085
false
3.63
false
false
false
danielhb/kimchi
tests/test_host.py
1
5041
# -*- coding: utf-8 -*- # # Project Kimchi # # Copyright IBM, Corp. 2015 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any lat...
lgpl-3.0
-8,401,846,286,958,856,000
36.619403
79
0.623686
false
3.76475
true
false
false
jeremycline/pulp_puppet
pulp_puppet_extensions_admin/pulp_puppet/extensions/admin/repo/status.py
2
13189
# -*- coding: utf-8 -*- # # Copyright © 2012 Red Hat, Inc. # # This software is licensed to you under the GNU General Public # License as published by the Free Software Foundation; either version # 2 of the License (GPLv2) or (at your option) any later version. # There is NO WARRANTY for this software, express or impli...
gpl-2.0
-68,426,790,368,538,670
44.633218
112
0.640355
false
4.308396
false
false
false
doylew/detectionsc
format_py/n_gram_training_short.py
1
1889
import os import glob ##################################################### ######Init the arff################################## ##################################################### os.remove("ngram_short.arff") file_ = open("ngram_short.arff", "a") file_.write("@RELATION sys_attack\n") file_.write("@ATTRIBUTE "...
mit
7,991,673,332,914,937,000
23.217949
96
0.511911
false
3.127483
false
false
false
Fat-Zer/FreeCAD_sf_master
src/Mod/Draft/draftguitools/gui_stretch.py
2
24251
# *************************************************************************** # * (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
5,800,105,577,930,970,000
49.947479
254
0.400849
false
4.975585
false
false
false
helloztq/helloztq.github.io
_drafts/minimap.py
1
1681
#-*- coding:utf-8 -*- import os import json ROOT_PATH = os.path.dirname(os.path.realpath(__file__)) SRC_PATH = ROOT_PATH + "/../../../../doc/最终文档及资源/images/world/erjiditu/erjiditu/Json/erjiditu_1.json" OUT_LUA_PATH = ROOT_PATH + "/../Resources/script/minimap/minimap.lua" f = open(SRC_PATH) jsonstr = f.read() f.clo...
mit
3,696,986,919,335,329,000
40.7
124
0.538092
false
2.480655
false
false
false
david-cattermole/qt-learning
python/qtLearn/windows/reparent/reparentWindow.py
1
4228
""" Usage: >>> import qtLearn.windows.reparent.reparentWindow >>> qtLearn.windows.reparent.reparentWindow.main() """ import sys import time import Qt.QtWidgets as QtWidgets import qtLearn.uiUtils as uiUtils import qtLearn.widgets.nodesMayaWidget as nodeMayaWidget import qtLearn.windows.reparent.forms.ui_getNodes as...
bsd-3-clause
-3,869,595,958,491,443,000
26.633987
73
0.655629
false
3.58609
false
false
false
mehmetalianil/Kreveik
setup.py
1
2419
# Copyright 2012 Mehmet Ali ANIL # # 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 applicabl...
apache-2.0
-1,643,781,602,302,675,500
36.796875
166
0.63456
false
3.933333
false
false
false
openwfm/wrfxpy
src/recover_catalog.py
1
3815
from __future__ import absolute_import from __future__ import print_function from forecast import make_job_file, JobState, process_arguments, load_sys_cfg import json import logging import sys,glob import os.path as osp simulations_path = osp.abspath('simulations') # copy here job_id/wfc catalog_path = osp.join(sim...
mit
3,069,693,406,301,629,400
42.850575
106
0.530799
false
3.585526
false
false
false
myvoice-nigeria/myvoice
myvoice/survey/migrations/0006_auto__del_field_surveyquestion_for_display__del_field_surveyquestion_d.py
1
12977
# -*- 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): # Deleting field 'SurveyQuestion.for_display' db.delete_column(u'survey_s...
bsd-2-clause
-4,653,175,298,091,208,000
73.586207
195
0.551283
false
3.597727
false
false
false
stryder199/RyarkAssignments
Assignment2/ttt/code_activator/python/lists/list_slices_defaultUL_io.py
1
1268
# what sublist is extracted by default lower/upper indexes? question_type = 'input_output' source_language = 'python' hotspot_declarations = [ ['$x0','int'],['$x1','int'],['$x2','int'],['$x3','int'],['$x4','int'], ['$y0','int'],['$y1','int'],['$y2','int'], ] group_list = [ ['list_slices_defaultUL_io_forwa...
mit
481,491,523,882,367,600
19.451613
78
0.593849
false
1.975078
false
true
false
tapichu/highway-maps
src/highway-maps/carreteras/tests/models.py
1
1206
from django.test import TestCase from carreteras.models import * class ModelsTestCase(TestCase): # Load test data fixtures = ['test'] class EstadoTestCase(ModelsTestCase): def test_should_have_test_data(self): self.assertEqual(len(Estado.objects.all()), 32) def test_should_return_name_when_converted_to_string...
mit
-2,839,571,837,537,421,300
32.5
60
0.757048
false
2.740909
true
false
false
scy-phy/minicps
examples/s3-2017/scada.py
1
1366
""" scada.py """ from minicps.devices import SCADAServer from utils import SCADA_PROTOCOL, STATE from utils import SCADA_PERIOD_SEC from utils import IP from utils import CO_0_2a, CO_1_2a, CO_2_2a, CO_3_2a from utils import HR_0_2a import time RTU2A_ADDR = IP['rtu2a'] + ':502' RTU2B_ADDR = IP['rtu2b'] + ':502' SCADA...
mit
-7,721,036,023,228,098,000
22.152542
77
0.565154
false
2.950324
false
false
false
inspirehep/inspire-next
tests/integration/workflows/test_utils.py
1
5633
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2020 CERN. # # INSPIRE is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later...
gpl-3.0
8,209,969,628,254,175,000
30.824859
95
0.604119
false
3.686518
true
false
false
vikkyrk/incubator-beam
sdks/python/apache_beam/coders/coder_impl.py
1
25372
# # 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
-995,709,935,074,878,100
33.661202
80
0.689382
false
3.687791
false
false
false
nighres/nighres
nighres/brain/mp2rage_dura_estimation.py
1
4959
import numpy as np import nibabel as nb import os import sys import nighresjava from ..io import load_volume, save_volume from ..utils import _output_dir_4saving, _fname_4saving, \ _check_topology_lut_dir, _check_available_memory def mp2rage_dura_estimation(second_inversion, skullstrip_mask, ...
apache-2.0
-5,286,006,519,294,991,000
35.19708
83
0.627546
false
3.951394
false
false
false
jwilk/mwic
tests/test_trim.py
1
1946
# Copyright © 2014-2016 Jakub Wilk <jwilk@jwilk.net> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the “Software”), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, mer...
mit
8,090,106,356,451,535,000
29.983871
79
0.642374
false
3.597378
false
false
false
Jumpscale/jumpscale_portal8
apps/portalbase/macros/page/login/1_main.py
1
3948
def main(j, args, params, tags, tasklet): page = args.page page.addCSS("/jslib/bootstrap/css/bootstrap-3-3-1.min.css") page.addCSS("/jslib/old/bootstrap/css/bootstrap-responsive.css") page.addCSS("/jslib/flatui/css/flat-ui.css") page.addCSS("/jslib/font-awesome/css/font-awesome.min.css") page.ad...
apache-2.0
6,315,472,374,606,857,000
30.584
142
0.568389
false
3.427083
false
false
false
andreasrosdal/freeciv-web
pbem/mailstatus.py
1
4297
'''********************************************************************** Copyright (C) 2009-2016 The Freeciv-web project 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, eithe...
agpl-3.0
-8,122,000,766,746,526,000
41.544554
164
0.627414
false
3.660136
false
false
false
thermokarst/qiime2
qiime2/metadata/tests/test_metadata_column.py
1
36564
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2020, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
bsd-3-clause
-5,118,677,128,262,354,000
35.627255
79
0.546835
false
3.486314
true
false
false
chazzam/adventofcode
d16.py
1
2145
#!/usr/bin/env python import argparse import os.path import sys import collections # -i 10000 -s 20 # -i 10010000000110000 -s 272 # -i 10010000000110000 -s 35651584 def get_options(argv=None): """parse the commandline options. Check for all supported flags and do any available pre-processing """ opts = argpa...
apache-2.0
2,452,010,722,828,176,000
23.655172
67
0.652214
false
3.187221
false
false
false
scwuaptx/CTF
2017-writeup/asis/canakmgf.py
1
1050
#!/usr/bin/env python # -*- coding: utf-8 -*- from pwnpwnpwn import * from pwn import * import time #host = "10.211.55.6" #port = 8888 host = "128.199.247.60" port = 10001 r = remote(host,port) def alloca(size,data): r.recvuntil("5. Run away") r.sendline("1") r.recvuntil("?") r.sendline(str(size)) ...
gpl-2.0
-7,564,741,886,792,836,000
18.090909
61
0.629524
false
2.292576
false
false
false
LRGH/elfesteem
tests/test_minidump_manipulation.py
1
1684
#! /usr/bin/env python import os __dir__ = os.path.dirname(__file__) from test_all import run_tests, assertion, hashlib from elfesteem.minidump_init import Minidump def test_MD_windows(assertion): md = open(__dir__+'/binary_input/windows.dmp', 'rb').read() assertion('82a09a9d801bddd1dc94dfb9ba6eddf0', ...
lgpl-2.1
8,207,295,610,560,033,000
34.083333
71
0.620546
false
2.996441
true
false
false
bitmazk/cmsplugin-redirect
cmsplugin_redirect/cms_plugins.py
1
1251
"""CMS Plugins for the ``cmsplugin_redirect`` app.""" from django.utils.translation import ugettext_lazy as _ from django.http import HttpResponseRedirect from cms.plugins.link.forms import LinkForm from cms.plugin_pool import plugin_pool from cms.plugin_base import CMSPluginBase from .models import ForceRedirectPlug...
mit
-5,765,137,024,366,025,000
33.75
77
0.680256
false
4.5
false
false
false
stack-of-tasks/sot-dyninv
python/mocap/footprint_parser.py
1
2502
''' Read the file coming from the Oscar footprint extraction, and display the position at the proper time interval, using the RF and LF objects of robotviewer. ''' from numpy import * # --- FOOT PRINT PARSER ------------------------------------------------------------ class FootPrintParser: def __init__(self,rob...
lgpl-3.0
6,610,572,883,476,368,000
31.921053
96
0.470424
false
3.274869
false
false
false
MostlyOpen/odoo_addons_jcafb
myo_person_mng_cst/wizard/address_mng_create_wizard.py
1
5196
# -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # 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 #...
agpl-3.0
5,497,097,607,140,637,000
36.114286
84
0.493072
false
3.951331
false
false
false
f304646673/PhpDebugger
src/socket_protocol.py
1
1073
# To change this license header, choose License Headers in Project Properties. # To change this template file, choose Tools | Templates # and open the template in the editor. class socket_protocol: def __init__(self): self.response = "" pass def pack_request(self, request): request...
apache-2.0
-2,110,549,869,557,461,000
25.85
78
0.55452
false
4.257937
false
false
false
sarleon/WebScanner
core/spider.py
1
2076
import requests from config import config from multiprocessing.pool import ThreadPool from util.printer import printer from util.content import parse_robots_txt,parse_res import urllib3 urllib3.disable_warnings() requests.packages.urllib3.disable_warnings() class Spider: WEB_ROOT=config.WEB_ROOT def wor...
gpl-3.0
-4,954,073,716,851,211,000
26.315789
131
0.597303
false
3.610435
true
false
false
certtools/contactdb
old2/old/db/initialize/pgpImporter.py
1
2345
#!/usr/bin/env python2.7 import pprint import gnupg import re import logging import psycopg2 from psycopg2 import errorcodes # need to call init() to initialize this gpgdict = dict() # ---------------------------------------------------- # functions def insert_pgp_key(k, dbcursor): if (k == None or k == ""): ...
agpl-3.0
1,824,992,953,328,917,800
28.683544
119
0.571855
false
3.270572
false
false
false
mdzik/bearded-octo-wookie
ZouHeBC.py
1
9179
from bearded_octo_wookie.lbm import * from sympy import * from fractions import Fraction from bearded_octo_wookie.MRT import genFeq, getMRT from sympy.utilities.codegen import codegen #W = np.array([Rational(_W) / Rational(36) for _W in W[:] * 36.]) U = [var('U_0'), var('U_1')] rho = var('rho') D = 2 Q = 9 def g...
apache-2.0
-9,052,371,557,334,107,000
23.34748
101
0.43447
false
2.540548
false
false
false
nash-x/hws
nova/api/openstack/compute/contrib/huawei/extended_actions.py
1
1813
import webob from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova import compute from nova import exception from nova.openstack.common import log as logging from nova.openstack.common.gettextutils import _ LOG = logging.getLogger(__name__) class ExtendedActionsController(wsgi.Con...
apache-2.0
-8,890,084,542,298,031,000
33.207547
79
0.666299
false
4.368675
false
false
false
ifwe/brocade-tool
setup.py
1
2919
#!/usr/bin/env python """ Copyright 2015 Ifwe 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...
apache-2.0
5,088,481,423,400,502,000
30.728261
79
0.646797
false
4.076816
false
false
false
googleapis/googleapis-gen
google/ads/googleads/v6/googleads-py/google/ads/googleads/v6/errors/types/internal_error.py
1
1220
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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...
apache-2.0
1,228,454,453,813,239,600
29.5
74
0.686885
false
3.973941
false
false
false
Naeka/vosae-app
www/core/migrations/0006_normalize_font_names.py
1
1040
# -*- coding: utf-8 -*- from south.v2 import DataMigration from core.models import Tenant from core.pdf.conf.fonts import mapping class Migration(DataMigration): def forwards(self, orm): supported_fonts = mapping.keys() for tenant in Tenant.objects(): if tenant.report_settings.font_n...
agpl-3.0
9,108,190,033,753,548,000
30.515152
80
0.604808
false
3.924528
false
false
false
Dolyphin/FSI_1D
Lax_Wendroff.py
1
2122
% ------------------------------ % filename: Lax_Wendroff.m % % We recall that vsol: % column 1: the volumic mass % column 2: the momentum % column 3: the total energy (per volum unit) function [vsol, vflux]=Lax_Wendroff(gamm1,ifct,Delta_t,vsol,vpres,wx, conec, vcor_n, vcor_np1,number); [nnt, ndln] = size(vsol); [ne...
gpl-3.0
5,450,060,205,453,099,000
27.293333
102
0.63148
false
2.4447
false
false
false
probabble/roundware-server
roundwared/audiotrack.py
1
10047
# Roundware Server is released under the GNU Affero General Public License v3. # See COPYRIGHT.txt, AUTHORS.txt, and LICENSE.txt in the project root directory. # TODO: Figure out how to get the main pipeline to send EOS # when all audiotracks are finished (only happens # when repeat is off) # TODO: Reimplement pan...
agpl-3.0
-3,624,491,594,080,919,600
38.246094
131
0.574699
false
3.963314
false
false
false
BrianSwift/JunoCam
Juno3D/singleChannelOBJs/P00_102G.obj.py
1
10051
# Setup Blender for Juno3D rendering # Requires JunocamLibrary.blend to be loaded before running this import bpy from mathutils import Quaternion # import Juno3D geometry and textures Wavefront OBJ bpy.ops.import_scene.obj(filepath="/Users/bswift/Downloads/PJ0EFB/P00_102G.obj",axis_forward='Y', axis_up='Z') # Replace ...
mit
8,841,822,718,561,269,000
46.410377
110
0.773654
false
2.600517
false
false
false
ezod/adolphus
adolphus/yamlparser.py
1
13782
"""\ YAML parser module. @author: Aaron Mavrinac @organization: University of Windsor @contact: mavrin1@uwindsor.ca @license: GPL-3 """ import os import yaml from math import pi import pkg_resources from itertools import chain from .robot import Robot from .solid import Solid from .laser import RangeModel from .cov...
gpl-3.0
8,007,242,541,659,513,000
37.497207
84
0.493034
false
4.166264
false
false
false
lightbase/WSCacicNeo
wscacicneo/model/all_reports.py
1
7688
#!/usr/env python # -*- coding: utf-8 -*- __author__ = 'adley' from requests.exceptions import HTTPError from wscacicneo import config import logging from liblightbase.lbbase.struct import Base, BaseMetadata from liblightbase.lbbase.lbstruct.group import * from liblightbase.lbbase.lbstruct.field import * from liblight...
gpl-2.0
-3,582,415,873,444,309,000
24.929054
79
0.551661
false
4.171196
false
false
false
NejcZupec/ggrc-core
src/ggrc/automapper/rules.py
1
5417
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> from collections import namedtuple import itertools import logging from ggrc import models Attr = namedtuple('Attr', ['name']) type_ordering = [['Audit'], ['Program'], ['Regulation', 'Pol...
apache-2.0
5,939,661,096,293,722,000
28.928177
79
0.564704
false
3.769659
false
false
false
ehsanfar/ofspy_Lite
ofspy/federateLite.py
1
14346
import re # import random from .elementLite import Satellite, GroundStation from .qlearner import QlearnerStorage, QlearnerCost from .generalFunctions import matchVariance class FederateLite(): def __init__(self, name, context, costSGL, costISL, storagePenalty = 100, strategy = 1): """ @param name...
apache-2.0
-4,556,431,127,364,762,000
36.653543
160
0.60428
false
3.788223
false
false
false
pupils/pupils
pupils/actividad/models.py
1
1369
# -*- coding: utf-8 -*- """ Copyright (C) 2012 Fco. Javier Lucena Lucena (https://forja.rediris.es/users/franlu/) Copyright (C) 2012 Serafín Vélez Barrera (https://forja.rediris.es/users/seravb/) This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public Li...
agpl-3.0
5,601,697,293,969,844,000
35.945946
85
0.765179
false
3.587927
false
false
false
fboers/jumegX
jumeg_preproc_data.py
1
15296
#import os import mne from jumeg.jumeg_base import jumeg_base #from jumeg.decompose.ocarta import ocarta #from jumeg.ctps import ctps #from jumeg import jumeg_plot ################################################################# # # apply epocher data # ##################...
bsd-3-clause
-1,812,626,027,738,260,700
34.822014
181
0.553805
false
3.716229
false
false
false
kronenpj/python-for-android
pythonforandroid/recipes/libsodium/__init__.py
1
1210
from pythonforandroid.toolchain import Recipe, shprint, shutil, current_directory from os.path import exists, join import sh class LibsodiumRecipe(Recipe): version = '1.0.16' url = 'https://github.com/jedisct1/libsodium/releases/download/{version}/libsodium-{version}.tar.gz' depends = [] patches = ['s...
mit
8,509,477,309,329,966,000
38.032258
128
0.655372
false
3.27027
false
false
false
jseabold/statsmodels
statsmodels/tsa/statespace/representation.py
4
44869
""" State Space Representation Author: Chad Fulton License: Simplified-BSD """ import numpy as np from .tools import ( find_best_blas_type, validate_matrix_shape, validate_vector_shape ) from .initialization import Initialization from . import tools class OptionWrapper(object): def __init__(self, mask_attri...
bsd-3-clause
5,586,837,975,756,007,000
39.061607
79
0.571998
false
4.46591
false
false
false
ovnicraft/suds
suds/wsse.py
1
6846
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser 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 distributed in the hope that it will b...
lgpl-3.0
7,100,247,521,210,390,000
28.508621
118
0.599036
false
3.805447
false
false
false
incuna/django-user-management
user_management/api/serializers.py
1
6257
from django.contrib.auth import get_user_model from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers, validators from user_management.utils.validators import validate_password_strength User = get_user_model() class UniqueEmailValidator(validators.UniqueValidator): def f...
bsd-2-clause
1,266,843,194,220,928,300
30.60101
83
0.629855
false
4.51443
false
false
false
facebookresearch/Detectron
detectron/utils/segms.py
1
9915
# Copyright (c) 2017-present, Facebook, 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...
apache-2.0
-6,994,483,454,064,312,000
34.537634
83
0.604539
false
3.167732
false
false
false
perkinslr/pypyjs
addedLibraries/multiprocessing/synchronize.py
1
10778
# # Module implementing synchronization primitives # # multiprocessing/synchronize.py # # Copyright (c) 2006-2008, R Oudkerk # 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. Redistribution...
mit
935,930,518,360,757,800
29.882521
78
0.590462
false
4.041245
false
false
false
amirouche/pythonium
pythonium/compliant/builtins/list.py
1
2405
class ListIterator: def __init__(self, obj): self.list = obj self.index = 0 self.length = len(obj) def __iter__(self): return self def __next__(self): if self.index == self.length: raise StopIteration index = self.index self.index = self...
lgpl-2.1
-2,493,964,963,930,566,700
23.05
51
0.521414
false
4.069374
false
false
false
subins2000/TorrentBro
torrentbro/Settings.py
1
2160
#!/usr/bin/python3 from PyQt5.QtCore import QSettings from PyQt5.QtWidgets import QDialog from torrentbro.ui import Ui_Settings class Settings(QDialog): def __init__(self): super().__init__() self.initUI() self.initEvents() self.exec_() self.show() def initUI(self)...
gpl-3.0
-6,252,303,686,053,160,000
31.238806
80
0.631944
false
3.724138
false
false
false
jimktrains/achd-downloader
get-achd.py
1
22063
#!/usr/bin/env python3 import csv import copy from bs4 import BeautifulSoup import httplib2 from urllib.parse import urlencode import sys def extract_record(row): #<tr> #<td align="left"> # <font color="#333333"> # <a id="ctl00_ContentPlaceHolder1_gvFSO_ctl51_hypJavascript"></a> # <a href...
gpl-3.0
3,967,313,637,979,219,000
50.071759
938
0.602774
false
3.084009
false
false
false
Eyra-is/Eyra
Backend/server-interface/qc/scripts/create_wrong_prompts/prepBadData.py
1
3531
# Copyright 2016 The Eyra 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 applicable la...
apache-2.0
-1,588,329,630,693,001,500
36.978495
151
0.610025
false
3.84222
false
false
false
JeewakaSankalpa/CaptsLog
captslog/ui/mainwindow.py
1
3456
from PyQt4 import QtCore, QtGui from PySide import QtCore, QtGui from centralwidget import CentralWidget try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _fromUtf8(s): return s try: _encoding = QtGui.QApplication.UnicodeUTF8 def _translate(context, text, disambig): ...
mit
6,875,469,999,496,511,000
37.831461
79
0.676215
false
4.199271
false
false
false
jelford/activesoup
src/activesoup/driver.py
1
6820
import functools from typing import Any, Dict, Optional, Callable from urllib.parse import urljoin import requests import activesoup import activesoup.html from activesoup.response import CsvResponse, JsonResponse class DriverError(RuntimeError): """Errors that occur as part of operating the driver Th...
mit
3,605,680,454,093,410,000
35.084656
98
0.634751
false
4.093637
false
false
false
gbnk0/pyptables
pyptables/utils.py
1
2004
import os import sys import subprocess default_binpath = "/sbin/iptables" def rule_to_list(rule): listrule = [] if rule.chain: listrule.append("-A") listrule.append(rule.chain.name) if rule.in_if: listrule.append("-i") listrule.append(rule.in_if) if rule.out_if: ...
mit
662,567,184,734,610,600
22.313953
66
0.54491
false
3.390863
false
false
false
tholum/PiBunny
system.d/library/tools_installer/tools_to_install/impacket/impacket/dcerpc/v5/dcom/vds.py
2
9527
# Copyright (c) 2003-2016 CORE Security Technologies # # This software is provided under under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # for more information. # # Author: Alberto Solino (@agsolino) # # Description: # [MS-VDS]: Virtual Disk Service (VDS) Protocol...
mit
3,806,137,423,759,355,400
34.416357
161
0.605752
false
3.380767
false
false
false
kmunve/APS
aps/util/nc_index_by_coordinate.py
1
2835
#!/usr/bin/env python # -*- coding: utf-8 -*- from numpy import pi, cos, sin, ravel, unravel_index try: from scipy.spatial import cKDTree except ImportError: print('The kdtree_fast method requires the scipy.spatial module.') print('Ignore this warning when using the tunnel_fast method.') __author__ = 'km...
mit
2,649,610,192,237,887,500
33.585366
117
0.651499
false
3
false
false
false
sss/calibre-at-bzr
src/calibre/devices/android/driver.py
2
15233
# -*- coding: utf-8 -*- __license__ = 'GPL v3' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import os import cStringIO from calibre.devices.usbms.driver import USBMS HTC_BCDS = [0x100, 0x0222, 0x0224, 0x0226, 0x227, 0x228, 0x229, 0x0231, 0x9999] class ANDROID(...
gpl-3.0
904,141,470,946,328,600
35.182898
100
0.471017
false
2.981018
false
false
false
googleapis/python-aiplatform
samples/model-builder/conftest.py
1
10253
# Copyright 2021 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
-4,148,279,109,015,027,700
27.013661
86
0.671803
false
3.700108
true
false
false
grokkers/cr-async
examples/example.py
1
1824
# Inside an async function import crasync import asyncio import time profiles = [] async def main(loop): client = crasync.Client() profile = await client.get_profile('2CYUUCC8') print(profile) print('Current Trophies: ' + str(profile.current_trophies)) chest_cycle = ', '.join([profile.get_chest...
mit
-7,403,707,339,414,221,000
23.648649
72
0.61568
false
3.514451
false
false
false
summer-liu/events_cache_scripts
report/cache07.py
1
9566
from pymongo import MongoClient import multiprocessing import threading import datetime import time cache = MongoClient(host='10.8.8.111', port=27017, connect=False)['cache25'] db30 = MongoClient(host='10.8.8.111', port=27017, connect=False)['onionsBackupOnline'] events = db30['events'] userAttr = cache['userAttr'] d...
mit
6,925,926,000,981,343,000
30.675497
141
0.402676
false
4.478464
false
false
false
Alicimo/codon_optimality_code
legacy_code/latest_version/get_tRNA.py
1
3296
#!/usr/bin/env python import BeautifulSoup as BS import urllib2, re, os, sys, difflib def get_full_name(abrv_name): full_name = None for line in open('tRNA_species.csv'): if line.split(',')[0].strip() == abrv_name: full_name = line.split(',')[1][:-1] break return...
gpl-2.0
603,382,137,521,152,800
24.952756
98
0.599211
false
2.73527
false
false
false
hduisa/hctf2015-all-problems
Black-Eat-Black/site/you_guest_my_name.py
1
2720
#!/usr/bin/env python #-*- coding:utf-8 -*- from flask import Flask from flask import request from flask import Response from werkzeug.routing import BaseConverter import requests import io_file import urllib import time #import sys #reload(sys) #sys.setdefaultencoding('utf8') class MyanyConverter(BaseConverter): we...
gpl-2.0
-3,154,486,464,751,355,000
22.787611
77
0.596354
false
2.704225
false
false
false
philbinj/fastcluster
fastcluster.py
1
5823
#!/usr/bin/env python import os, sys import ctypes import tables import numpy as np import numpy.random as npr libfastann = ctypes.CDLL('libfastann.so') try: libfastcluster = ctypes.CDLL('libfastcluster.so') except OSError, e: libfastcluster = ctypes.CDLL('./libfastcluster.so') def get_suffix(dtype): re...
bsd-3-clause
-2,437,418,610,296,758,300
27.544118
95
0.559505
false
3.262185
false
false
false
quentinlautischer/291MiniProject2
lib/python3.5/site-packages/bsddb3/dbtables.py
1
30208
#----------------------------------------------------------------------- # # Copyright (C) 2000, 2001 by Autonomous Zone Industries # Copyright (C) 2002 Gregory P. Smith # # License: This is free software. You may use this software for any # purpose including modification/redistribution, so long as ...
apache-2.0
-3,544,381,186,436,402,000
35.884005
135
0.51387
false
4.458745
false
false
false
Samueljh/MinecraftPiMods
SimpleChat.py
1
2111
# -*- coding: utf-8 -*- import minecraft.minecraft as minecraft import minecraft.block as block import time from Tkinter import * from Tkinter import StringVar mc = minecraft.Minecraft.create() pos = mc.player.getTilePos() root = Tk() def sayhi(): mc.postToChat('[Guest] Hi') time.sleep(2) def saybye(): ...
mpl-2.0
1,882,186,573,971,093,200
23.264368
95
0.710564
false
2.952448
false
false
false
e-q/scipy
scipy/stats/tests/test_continuous_basic.py
1
26460
import pickle import numpy as np import numpy.testing as npt import pytest from pytest import raises as assert_raises from scipy.integrate import IntegrationWarning from scipy import stats from scipy.special import betainc from. common_tests import (check_normalization, check_moment, check_mean_expect, ...
bsd-3-clause
-8,904,847,995,878,024,000
39.335366
100
0.613303
false
3.156011
true
false
false
LabProdam/LabDiario
Prodam/Prodam.py
1
3637
#!/usr/bin/python #coding: utf-8 from Common import * from DiarioTools.Parser import * from DiarioTools.Process import * from DiarioTools.Search import * import re wordsOfInterest = ["Prodam", "Pro-dam", "EMPRESA DE TECNOLOGIA DA INFORMAÇÃO E COMUNICAÇÃO", "Emp. Tec. da Informação e Comunicação", ...
gpl-2.0
-6,001,605,457,719,008,000
26.892308
141
0.600386
false
2.875496
false
false
false
Kate-Willett/Climate_Explorer
PYTHON/ReformatGrids.py
1
7023
#!/usr/local/sci/bin/python # PYTHON3 # # Author: Kate Willett # Created: 16 October 2015 # Last update: 20 July 2020 # Location: /data/local/hadkw/HADCRUH2/UPDATE2014/PROGS/PYTHON/ # GitHub: https://github.com/Kate-Willett/Climate_Explorer/tree/master/PYTHON/ # ----------------------- # CODE PURPOSE AND OUTPUT # ---...
cc0-1.0
-2,623,122,444,399,294,000
37.587912
152
0.56258
false
3.01287
false
false
false
yavuzhan/carPricePrediction-ML
scrapingSahibinden.py
1
8100
# -*- coding: utf-8 -*- # yavuzhan sahibinden.com Ford Focus webscrap & write to csv import urllib.parse import urllib.request from urllib.request import urlopen as uReq from bs4 import BeautifulSoup as soup import re filename1 = "S_sahibinden.csv" f = open(filename1, "w") # for write headers = "year,km,cc,f...
gpl-3.0
4,280,474,797,969,772,500
42.751381
155
0.552222
false
3.587245
false
false
false
skirpichev/omg
diofant/tests/polys/test_factortools.py
1
30099
"""Tools for polynomial factorization routines in characteristic zero.""" import pytest from diofant import (EX, FF, QQ, RR, ZZ, DomainError, I, nextprime, pi, ring, sin, sqrt) from diofant.polys.polyconfig import using from diofant.polys.specialpolys import f_polys, w_polys __all__ = () f_0, ...
bsd-3-clause
-896,794,340,217,578,800
32.705487
82
0.413236
false
2.367949
true
false
false
skyfallen/SecondDataScienceBowl
Code/Forum_code/Keras/models/VGG15/model.py
1
2880
from __future__ import print_function from keras.models import Sequential from keras.layers.convolutional import Convolution2D, MaxPooling2D, ZeroPadding2D from keras.layers.core import Activation, Flatten, Dense, Dropout from keras.regularizers import l2 from keras.optimizers import Adam from keras import backend as ...
mit
-6,484,837,056,140,195,000
33.285714
92
0.670486
false
2.917933
false
false
false