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
sandromello/themis-py
src/themis/ratelimiter.py
1
8838
""" This module implements a RateLimiter class. RateLimiter is a Redis backed object used to define one or more rules to rate limit requests. This module can be run to show an example of a running RateLimiter instance. """ import logging, math, redis, time from itertools import izip class RateLimiter(object): """ ...
apache-2.0
-2,751,376,892,959,176,700
33.389105
130
0.625594
false
3.793133
false
false
false
KevinOConnor/klipper
klippy/extras/query_endstops.py
1
2160
# Utility for querying the current state of all endstops # # Copyright (C) 2018-2019 Kevin O'Connor <kevin@koconnor.net> # # This file may be distributed under the terms of the GNU GPLv3 license. class QueryEndstops: def __init__(self, config): self.printer = config.get_printer() self.endstops = [...
gpl-3.0
-2,217,313,421,855,998,500
47
80
0.615278
false
3.489499
false
false
false
Yelp/docker-compose
setup.py
1
1673
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import absolute_import from setuptools import setup, find_packages import codecs import os import re import sys def read(*parts): path = os.path.join(os.path.dirname(__file__), *parts) with codecs.open(path, ...
apache-2.0
-1,142,923,560,250,649,000
23.602941
68
0.590556
false
3.162571
true
false
false
tompecina/legal
legal/common/templatetags/compact.py
1
2052
# -*- coding: utf-8 -*- # # common/templatetags/compact.py # # Copyright (C) 2011-19 Tomáš Pecina <tomas@pecina.cz> # # This file is part of legal.pecina.cz, a web-based toolbox for lawyers. # # This application is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public Licen...
gpl-3.0
2,795,398,504,757,798,400
28.710145
72
0.670244
false
3.068862
false
false
false
CartoDB/cartoframes
cartoframes/data/observatory/catalog/repository/geography_repo.py
1
2591
from geopandas import GeoDataFrame from .....utils.geom_utils import set_geometry from .constants import COUNTRY_FILTER, CATEGORY_FILTER, PROVIDER_FILTER, PUBLIC_FILTER from .entity_repo import EntityRepository GEOGRAPHY_TYPE = 'geography' _GEOGRAPHY_ID_FIELD = 'id' _GEOGRAPHY_SLUG_FIELD = 'slug' _ALLOWED_FILTERS = ...
bsd-3-clause
-8,902,950,525,506,630,000
37.102941
111
0.643767
false
3.690883
false
false
false
impallari/Impallari-Fontlab-Macros
IMP Kerning/21 Analize Kerning all fonts.py
1
1594
#FLM: Analize Kerning Pairs in from all open Fonts # Description: # Count the occurence of kerning pairs across all open fonts # To-do: # It only report main pairs, not fully expanded if the font uses classes # Credits: # Pablo Impallari1 # http://www.impallari.com # Level of coincindence ( 1 to 100 ) # Example:...
apache-2.0
937,841,781,610,993,800
24.269841
84
0.691343
false
2.935543
false
false
false
guillaume-philippon/aquilon
tests/read_events.py
1
4738
#!/usr/bin/env python # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2013,2015,2016 Contributor # # 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...
apache-2.0
663,914,866,534,460,200
31.013514
83
0.658506
false
3.664346
true
false
false
allevaton/lana
src/Class.py
1
1334
# # Contains an encapsulation of class data for the schedules # This should not be abstracted as it is already in a final mode # The data for this class should be parsed by the individual # modules, and should be represented as a global class # class Class(): """A class to encapsulate all kinds of class data ...
gpl-2.0
-4,557,105,319,848,632,300
35.054054
67
0.532984
false
3.877907
false
false
false
stuckj/dupeguru
cocoa/base/ui/deletion_options.py
1
2030
ownerclass = 'DeletionOptions' ownerimport = 'DeletionOptions.h' result = Window(450, 240, "Deletion Options") messageLabel = Label(result, "") linkCheckbox = Checkbox(result, "Link deleted files") linkLabel = Label(result, "After having deleted a duplicate, place a link targeting the " "reference file to replace ...
gpl-3.0
261,472,818,439,872,830
40.428571
100
0.783744
false
3.731618
false
false
false
Diacamma2/financial
diacamma/invoice/migrations/0018_articlesituation.py
1
1572
# Generated by Django 3.2 on 2021-04-30 07:17 import django.core.validators from django.db import migrations, models import django.db.models.deletion import lucterios.framework.model_fields class Migration(migrations.Migration): dependencies = [ ('invoice', '0017_print_articlesituation'), ] ope...
gpl-3.0
-2,918,573,821,315,981,300
49.709677
273
0.659669
false
3.989848
false
false
false
groovehunter/datamapper
DataMapper.py
1
1544
import yaml import csv class HandlerBase(object): pass class CsvHandler(HandlerBase): def __init__(self): pass def load(self): csv.register_dialect('tabbed',delimiter="\t",quoting=csv.QUOTE_NONE) self.data = [] with open(self.src,'r') as f: reader = csv.r...
gpl-2.0
5,061,304,231,314,770,000
20.760563
76
0.499352
false
3.928753
false
false
false
djevans071/Rebalancing-Citibike
cleanup.py
1
1117
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Wed Jun 7 16:19:11 2017 @author: psamtik071 """ from workflow.data import trip_data import os for year in xrange(2017,2018): for month in xrange(1,13): basepath = 'tripdata/' to_filename = '{}{:02}-citibike-tripdata.csv'.format(year...
mit
7,779,977,621,227,614,000
28.394737
88
0.548791
false
3.200573
false
false
false
ealogar/curso-python
advanced/fib_fac.py
1
1159
#-*- coding: utf-8 -*- def factorial(n): """Return the factorial of n""" if n < 2: return 1 return n * factorial(n - 1) def fibonacci(n): """Return the nth fibonacci number""" if n < 2: return n return fibonacci(n - 1) + fibonacci(n - 2) def fib_fac(x=30, y=900): fib = ...
apache-2.0
3,533,258,224,906,285,600
21.72549
51
0.513374
false
3.05
false
false
false
fos/fos-legacy
fos/core/intersection.py
1
4809
import numpy as np def intersect_ray_sphere(p, d, sphereR, sphereC): """ Intersects ray r = p + td, |d| = 1, with sphere s Parameters ---------- p : (3,1) starting point of ray d : (3,1) normalized direction vector of ray sphereR : float sphere radius sphereC : ...
bsd-3-clause
-190,592,544,210,251,600
27.294118
95
0.539405
false
2.874477
false
false
false
JordanReiter/django-mailer
mailer/engine.py
1
5501
import time import os import smtplib import logging from mailer.lockfile import FileLock, AlreadyLocked, LockTimeout from socket import error as socket_error from django.conf import settings from django.core.mail import send_mail as core_send_mail try: # Django 1.2 from django.core.mail import get_connection ...
mit
6,249,034,943,903,731,000
41.643411
204
0.636066
false
4.25774
false
false
false
tvalacarta/tvalacarta
python/main-classic/channels/rtve.py
1
22750
# -*- coding: utf-8 -*- #------------------------------------------------------------ # tvalacarta - XBMC Plugin # Canal para RTVE # http://blog.tvalacarta.info/plugin-xbmc/tvalacarta/ #------------------------------------------------------------ import urlparse, re from core import config from core import logger from...
gpl-3.0
8,962,532,944,840,568,000
47.41791
517
0.63493
false
3.1343
false
false
false
emulbreh/eelale
eelale/cli.py
1
2228
import click import subprocess import os import logging from .builder import Builder logger = logging.getLogger(__name__) @click.group() def main(): logging.basicConfig( level=logging.INFO, format='%(asctime)s [%(levelname)s] %(name)s: %(message)s', ) @main.command() @click.option( '-...
mit
4,085,580,199,796,000,000
25.52381
175
0.635548
false
3.769882
false
false
false
wdbm/abstraction
classification_ttH_ttbb_1_from_saved_model.py
1
4988
#!/usr/bin/env python """ ################################################################################ # # # classification_ttH_ttbb_1_from_saved_model # # ...
gpl-3.0
-6,672,606,103,455,961,000
37.96875
96
0.453087
false
5.043478
false
false
false
gooddata/openstack-nova
nova/compute/api.py
1
281186
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Piston Cloud Computing, Inc. # Copyright 2012-2013 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # ...
apache-2.0
-3,930,178,248,232,551,000
45.794142
79
0.579275
false
4.635138
false
false
false
sebMathieu/dsima
server/lgiinterface.py
1
1067
##@package lgiinterface # Interface to list the generated instances. #@author Sebastien MATHIEU import os import xml.etree.ElementTree as ElementTree import asyncio,websockets # Interact with the user to interact with the instance generator module. # @param client Client we are interacting with. @asyncio.co...
bsd-3-clause
-6,826,134,603,561,917,000
30.333333
132
0.712277
false
3.430868
false
false
false
telefonicaid/orchestrator
src/orchestrator/api/ldap_view.py
1
21117
# # Copyright 2018 Telefonica Espana # # This file is part of IoT orchestrator # # IoT orchestrator is free software: you can redistribute it and/or # modify it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option)...
agpl-3.0
-5,715,640,797,791,896,000
45.006536
78
0.496283
false
4.527659
false
false
false
nok/sklearn-porter
sklearn_porter/estimator/classifier/MLPClassifier/__init__.py
1
9667
# -*- coding: utf-8 -*- import os from json import encoder from json import dumps from sklearn_porter.estimator.classifier.Classifier import Classifier class MLPClassifier(Classifier): """ See also -------- sklearn.neural_network.MLPClassifier http://scikit-learn.org/stable/modules/generated/ ...
mit
8,164,837,116,001,158,000
35.617424
80
0.53574
false
4.38214
false
false
false
tmt514/mtsa-dishes-translator
app/data/__init__.py
1
1599
from .parsepokemon import add_pokemons from .parsejokes import add_jokes from .parsecategories import add_categories from app.models import db, Term, Photo, Location, User, Joke, Category, Termcategories, Description import os import pickle import json if os.path.exists('app/data/pokemon_names_mapping') == False: ...
mit
6,186,210,763,107,593,000
46.029412
136
0.706692
false
2.815141
false
false
false
community-ssu/telepathy-gabble
tests/twisted/vcard/update-rejected.py
1
1263
""" Regression test for fd.o #20442, where the XMPP error returned by a server that doesn't like the avatar you tried to set was not mapped to a TP error before being sent over the bus. """ from twisted.words.xish import domish from servicetest import call_async from gabbletest import exec_test, expect_and_handle_get...
lgpl-2.1
3,823,451,831,685,819,000
28.372093
92
0.676168
false
3.133995
true
false
false
googleapis/googleapis-gen
google/ads/googleads/v6/googleads-py/google/ads/googleads/v6/services/services/ad_group_criterion_simulation_service/transports/grpc.py
1
10538
# -*- 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
3,827,448,597,332,809,000
44.619048
120
0.619283
false
4.748986
false
false
false
jamespcole/home-assistant
homeassistant/components/synology_chat/notify.py
1
2008
""" SynologyChat platform for notify component. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/notify.synology_chat/ """ import json import logging import requests import voluptuous as vol from homeassistant.const import CONF_RESOURCE, CONF_VERIFY_SSL ...
apache-2.0
4,965,785,065,355,764,000
29.892308
78
0.65488
false
4.081301
false
false
false
ua-snap/downscale
snap_scripts/downscaling_v2/OLD_downscaling_v2/wrap_downscaler_cru_ts324_01_slurm_tem.py
1
2369
# # # EXAMPLE RUN SINGLE MODEL def run_model( fn, command ): import os, subprocess head = '#!/bin/sh\n' + \ '#SBATCH --ntasks=32\n' + \ '#SBATCH --nodes=1\n' + \ '#SBATCH --ntasks-per-node=32\n' + \ '#SBATCH --account=snap\n' + \ '#SBATCH --mail-type=FAIL\n' + \ '#SBATCH --mail-user=malindgren@alask...
mit
3,552,470,111,626,347,500
32.842857
130
0.60363
false
2.594743
false
false
false
dutwfk/pytest
base/queue.py
1
1032
__author__ = 'kris' class Queue(object): def __init__(self, size=16): self.queue = [] self.size = size self.front = 0 self.rear = size - 1 def isEmpty(self): return self.rear == 0 def isFull(self): if (self.front - self.rear + 1) == self.size: ...
mit
3,347,516,269,478,357,500
21.434783
53
0.506783
false
3.969231
false
false
false
eudoxos/sphinxcontrib-embedly
sphinxcontrib/embedly.py
1
5637
# -*- coding: utf-8 -*- """ sphinxcontrib.embedly ~~~~~~~~~~~~~~~~~~~~~ :copyright: Copyright 2013-2014 by the contributors (see AUTHORS file) :license: BSD, see LICENSE for details. """ from __future__ import print_function, unicode_literals, absolute_import import os from docutils import nodes from ...
bsd-2-clause
-739,285,607,462,079,500
31.773256
161
0.612915
false
3.801079
true
false
false
bytescout/ByteScout-SDK-SourceCode
Cloud API Server/PDF To Text API/Python/Convert PDF To Text From Uploaded File/ConvertPdfToTextFromUploadedFile.py
1
3217
import os import requests # pip install requests # Please NOTE: In this sample we're assuming Cloud Api Server is hosted at "https://localhost". # If it's not then please replace this with with your hosting url. # Base URL for PDF.co Web API requests BASE_URL = "https://localhost" # Source PDF file SourceFile = ".\...
apache-2.0
-4,017,771,427,214,986,000
32.175258
110
0.606155
false
4.046541
false
false
false
ChatAI/dumbots
bots/SynBot/SynBot.py
1
3930
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Simple Bot to reply to Telegram messages from telegram.ext import Updater from telegram import ReplyKeyboardMarkup import logging import os from nltk.corpus import wordnet as wn from lib.wn import * gWord = 'internet' # Enable logging logging.basicConfig( f...
gpl-3.0
-2,590,771,391,261,764,000
30.190476
99
0.626463
false
3.521505
false
false
false
tri2sing/IntroPython
Loops.py
1
1308
from sys import float_info as sfi def square_root (n): '''Square root calculated using Netwton's method ''' x = n/2.0 while True: y = (x + n/x)/2 # As equality in floating numbers can be elusive, # we check if the numbers are close to each other. if abs(y-x) < sfi.epsil...
apache-2.0
8,439,470,421,023,596,000
24.153846
60
0.547401
false
3.144231
false
false
false
DavidBarishev/DDtankFarmingBot
Ddtank_farm_bot/Framework/CommonItems.py
1
1198
"""Has presets for common items Attributes: random_card (dict): Random card item exp_1 (dict): Exp pill lv 1 exp_2 (dict): Exp pill lv 2 exp_3 (dict): Exp pill lv 3 exp_4 (dict): Exp pill lv 4 """ import Items import Inventory from Util import image_path_main exp_1 = { "item_img": image_path_...
gpl-3.0
-3,529,443,610,802,917,400
23.958333
58
0.657763
false
3.177719
false
false
false
fginter/dep_search_serve
serve_depsearch.py
1
6001
#!/usr/bin/env python3 # This code can run in both Python 2.7+ and 3.3+ import cgi from flask import Flask, Markup import flask import json import requests import six import six.moves.urllib as urllib # use six for python 2.x compatibility import traceback DEBUGMODE=False try: from config_local import * #use to ...
apache-2.0
5,265,060,962,744,545,000
43.783582
283
0.653724
false
3.245538
false
false
false
CloudBoltSoftware/cloudbolt-forge
rules/find_and_delete_old_sync_jobs/find_old_sync_jobs.py
1
1052
""" IF Rule Action Locate sync jobs older than the provided amount of days """ import os os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' import sys import datetime import json sys.path.append('/opt/cloudbolt') from common.methods import set_progress from utilities.logger import ThreadLogger logger = ThreadLogger(__...
apache-2.0
-2,208,363,094,936,291,800
32.935484
104
0.695817
false
3.382637
false
false
false
deepmind/trfl
trfl/policy_gradient_ops.py
1
16797
# Copyright 2018 The trfl 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 law...
apache-2.0
-7,097,839,571,736,575,000
48.258065
80
0.688397
false
4.103836
false
false
false
thomaserlang/storitch
tests/upload.py
1
2441
import requests, logging, json from storitch import config, config_load, logger def upload_multipart(): r = requests.post( 'http://127.0.0.1:{}/store'.format(config['port']), files={'file': open('test1.txt', 'rb')} ) logging.debug(r.text) logging.debug(r.status_code) r.raise_for_sta...
mit
-842,656,900,377,164,300
31.48
123
0.540041
false
3.187173
true
false
false
idivanov/amazing-game
game.py
1
6382
from battle import * from weapon import * import maps import random class Game(): def __init__(self, map): self.map = map self.player_location = 0 self.character = None def print_map(self): '''printing the map''' self.update_location() for row in range(maps.ROW...
gpl-3.0
-4,598,051,306,032,373,000
33.874317
78
0.532435
false
3.98875
false
false
false
niavok/perroquet
perroquetlib/gui/gui_message_dialog.py
1
2149
# -*- coding: utf-8 -*- # Copyright (C) 2009-2011 Frédéric Bertolus. # # This file is part of Perroquet. # # Perroquet is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at...
gpl-3.0
-2,429,260,379,607,803,400
32.546875
74
0.690265
false
3.682676
false
false
false
2degrees/twapi-users
setup.py
1
1970
############################################################################## # # Copyright (c) 2015, 2degrees Limited. # All Rights Reserved. # # This file is part of twapi-users # <https://github.com/2degrees/twapi-users>, which is subject to the # provisions of the BSD at # <http://dev.2degreesnetwork.com/p/2degree...
bsd-3-clause
-7,853,972,193,506,642,000
34.818182
79
0.62335
false
3.971774
false
false
false
mlesche/deep_seq_pipeline
deep_seq_pipeline/src/configfile/createconfigFastqScreen.py
1
7124
#!/usr/bin/env python ''' The MIT License (MIT) Copyright (c) <2014> <Mathias Lesche> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights ...
mit
661,324,221,369,928,000
33.926471
171
0.675463
false
3.805556
true
false
false
psav/cfme_tests
cfme/utils/appliance/__init__.py
1
123036
import json import logging import socket import traceback from copy import copy from datetime import datetime from tempfile import NamedTemporaryFile from textwrap import dedent from time import sleep, time import attr import dateutil.parser import fauxfactory import os import re import requests import sentaku import ...
gpl-2.0
-1,851,766,126,545,638,000
40.79212
100
0.596159
false
4.084454
true
false
false
maxpumperla/betago
betago/dataloader/index_processor.py
1
4131
# This Source Code Form is subject to the terms of the Mozilla Public License, # v. 2.0. If a copy of the MPL was not distributed with this file, You can # obtain one at http://mozilla.org/MPL/2.0/. from __future__ import print_function from __future__ import absolute_import import os import sys import multiprocessing ...
mit
-410,448,613,732,599,400
34.307692
104
0.575163
false
4.065945
false
false
false
reinforceio/tensorforce
tensorforce/core/objectives/__init__.py
1
1414
# Copyright 2020 Tensorforce Team. 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
7,275,374,175,043,447,000
38.277778
97
0.738331
false
4.259036
false
false
false
Groestlcoin/electrumx-grs
tests/lib/test_addresses.py
1
2130
# Copyright (c) 2017, the ElectrumX authors # # All rights reserved. # # The MIT License (MIT) # # 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 limit...
mit
-5,922,166,777,629,881,000
34.5
75
0.741315
false
3.532338
false
false
false
fnl/libfnl
src/fnl/text/token_new.py
1
6670
""" .. py:module:: fnl.text.token :synopsis: A tuple structure to hold token metadata. .. moduleauthor:: Florian Leitner <florian.leitner@gmail.com> .. License: GNU Affero GPL v3 (http://www.gnu.org/licenses/agpl.html) """ from operator import itemgetter, methodcaller from fn import _ from fn.monad import optionabl...
agpl-3.0
-8,545,638,999,496,082,000
33.921466
97
0.594753
false
3.701443
false
false
false
WorldSEnder/MCAnm
scripts/io_export_mhfc/utils.py
1
11769
# Logging: easier workflow with some utility methods to log and handle errors from collections import defaultdict, namedtuple from enum import Enum import bpy import os import sys import traceback class LogLevel(Enum): DEBUG = 'debug' INFO = 'info' WARNING = 'warning' ERROR = 'error' FATAL = 'fata...
gpl-2.0
-32,218,441,258,716,172
34.990826
132
0.619169
false
4.142555
false
false
false
elliotf/appenginewiki
wiki.py
1
9987
#!/usr/bin/env python # # Copyright 2008 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...
lgpl-2.1
6,221,738,379,135,605,000
29.448171
108
0.608892
false
3.879953
false
false
false
f3at/feat
src/feat/agents/base/alert.py
1
7462
# F3AT - Flumotion Asynchronous Autonomous Agent Toolkit # Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. # 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...
gpl-2.0
-4,525,965,524,705,380,000
32.918182
77
0.649022
false
4.10451
false
false
false
dieterich-lab/FUCHS
GCB_testset/FUCHS/get_mate_information.py
1
5784
# script to identify circles where both mates map over the junction import pysam import os import argparse import pybedtools import tempfile parser = argparse.ArgumentParser(description='Extracts mate information and identify singe and double breakpoint fragments') # input parser.add_argument('bamfolder', metavar = ...
gpl-3.0
2,426,196,590,104,939,500
41.529412
270
0.66926
false
3.222284
false
false
false
bikalabs/bika.wine
bika/wine/controlpanel/bika_winetypes.py
1
3152
from AccessControl.SecurityInfo import ClassSecurityInfo from bika.wine import bikaMessageFactory as _ from bika.wine.config import PROJECTNAME from bika.wine.interfaces import IWineTypes from bika.lims import bikaMessageFactory as _b from bika.lims.browser.bika_listing import BikaListingView from plone.app.content.bro...
agpl-3.0
8,972,393,778,364,871,000
36.082353
73
0.579632
false
3.984829
false
false
false
blackchair/news-yc
frontpage.py
1
4592
import os import json import logging from urllib import quote from xml.dom.minidom import parseString from datetime import datetime import webapp2, jinja2 from google.appengine.api.urlfetch import fetch from google.appengine.api import memcache JINJA_ENVIRONMENT = jinja2.Environment( loader=jinja2.FileSystemLoad...
mit
-6,088,560,428,802,341,000
39.637168
154
0.515679
false
3.993043
false
false
false
ByteInternet/drf-oidc-auth
oidc_auth/util.py
1
1153
import functools from django.core.cache import caches from .settings import api_settings class cache(object): """ Cache decorator that memoizes the return value of a method for some time. Increment the cache_version everytime your method's implementation changes in such a way that it returns values th...
mit
5,006,340,279,037,631,000
35.03125
97
0.648742
false
4.059859
false
false
false
urrego093/proyecto_mv
applications/admin/languages/es.py
1
26019
# -*- coding: utf-8 -*- { '!langcode!': 'es', '!langname!': 'Español', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"actualice" es una expresión opcional como "campo1=\'nuevo_valor\'". No se puede actualizar o eliminar resultados de un JOIN', '%s %...
gpl-3.0
-3,982,503,381,662,950,400
51.746421
700
0.721359
false
2.991533
true
false
false
kadashu/satori
satori-rules/plugin/memcache/60_memcache.py
1
1626
#!/usr/bin/python # -*- coding: utf-8 -*- # -- stdlib -- import json import socket import subprocess import telnetlib import time # -- third party -- # -- own -- # -- code -- ts = int(time.time()) proc = subprocess.Popen(['/bin/bash', '-c', r'''ps -ef |grep memcached|grep -v grep |sed -n 's/.* *-p *\([0-9]\{1,5\}\)...
apache-2.0
3,021,739,656,081,259,500
25.655738
157
0.53936
false
2.994475
false
false
false
jpacg/su-binary
jni/selinux/gui/usersPage.py
1
5487
## usersPage.py - show selinux mappings ## Copyright (C) 2006,2007,2008 Red Hat, 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) ...
gpl-2.0
2,246,079,205,972,420,400
33.080745
140
0.609805
false
3.638594
false
false
false
Azure/azure-sdk-for-python
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/aio/_template_specs_client.py
1
4199
# 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 may ...
mit
2,766,160,840,868,600,000
47.825581
128
0.69207
false
4.462274
true
false
false
opieters/wcamera
src/motion_detector.py
1
5950
#!/usr/bin/env python # this code was inspired by this tutorial by Adrian Rosebrock: # http://www.pyimagesearch.com/2015/06/01/home-surveillance-and-motion-detection-with-the-raspberry-pi-python-and-opencv/ import time, datetime, json, cv2, warnings import RPi.GPIO as GPIO from argparse import ArgumentParser from imu...
mit
-4,295,866,812,982,044,000
36.898089
157
0.564706
false
4.274425
false
false
false
Fodij/ZonStroom
read/P1tofiles.py
1
8337
#!/usr/bin/python versie = 1.0 from datetime import datetime, timedelta import re import serial import sys from metingen import meting # --- Meter lees informatie --- # Maximum aantal regels dat gelezen mag worden # dient om programma te stoppen wanneer er geen 'eofline' voorbij komt maxlines = 30 # Einde van berich...
gpl-2.0
-2,265,219,109,054,684,700
31.189189
134
0.623006
false
2.784569
false
false
false
mrosenstihl/PulsePrograms
autoPFGMASSEY/auto-PFG-MASSEY_exp.py
1
5445
import numpy as N class ParameterSet: """ From http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52308 Alex Martelli """ def __init__(self, **kwds): self.__dict__.update(kwds) def MASSEY(**parameter_set): e=Experiment() for key in parameter_set.keys(): e.set_desc...
bsd-2-clause
-43,041,400,716,493,464
35.797297
116
0.474564
false
3.336397
false
false
false
Mercy-Nekesa/sokoapp
sokoapp/request/admin.py
1
3023
import json from datetime import timedelta, date from django.utils.translation import ugettext_lazy as _ from django.shortcuts import render_to_response from functools import update_wrapper from django.template import RequestContext from django.contrib import admin from django.http import HttpResponse from request.mo...
mit
7,751,704,638,266,843,000
34.564706
132
0.597089
false
3.925974
false
false
false
pokermania/pokerengine
setup.py
1
5092
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from os.path import basename from glob import glob from distutils.core import setup from distutils.command.build import build as DistutilsBuild class ExtendedBuild(DistutilsBuild): def run(self): os.system("make -C po") os.system("bash ...
gpl-3.0
-8,928,794,915,129,660,000
44.464286
84
0.587588
false
2.765888
false
false
false
Noysena/TAROT
Filter_data.py
1
4059
# -*- coding: utf-8 -*- """ Created on Thu Jul 7 18:09:24 2016 @author: nu """ from astropy.coordinates import SkyCoord from astroquery.vizier import Vizier from astropy import units as u from astropy.table import Table import numpy as np import os, time def reoffset(d2d, matches, Cdata, Ccata): n = 0 while ...
gpl-3.0
5,036,790,887,645,295,000
42.180851
162
0.651392
false
2.6443
false
false
false
hagabbar/pycbc_copy
pycbc/io/live.py
1
16023
import logging import os import pycbc import numpy import lal from pycbc_glue.ligolw import ligolw from pycbc_glue.ligolw import lsctables from pycbc_glue.ligolw import utils as ligolw_utils from pycbc_glue.ligolw.utils import process as ligolw_process from pycbc_glue.ligolw import param as ligolw_param from pycbc impo...
gpl-3.0
3,165,173,620,786,652,700
42.422764
95
0.592835
false
3.399024
false
false
false
openilabs/falconlab
env/lib/python2.7/site-packages/falcon/bench/bench.py
1
6616
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import argparse from collections import defaultdict import cProfile from decimal import Decimal import gc import random import sys import timeit try: import guppy except ImportError: heapy = None else: heapy = guppy.hpy()...
mit
2,771,928,568,808,080,400
25.46
79
0.58715
false
3.735178
false
false
false
npo-poms/pyapi
npoapi/xml/media.py
1
640297
# ./npoapi/xml/media.py # -*- coding: utf-8 -*- # PyXB bindings for NM:aaac8a39e00bcd1804b49bf5b5b8b83fb686b430 # Generated 2021-06-13 22:15:50.850058 by PyXB version 1.2.6 using Python 3.8.2.final.0 # Namespace urn:vpro:media:2009 [xmlns:media] from __future__ import unicode_literals import pyxb import pyxb.binding i...
gpl-3.0
-2,637,278,550,881,976,000
56.410293
918
0.716241
false
3.37868
false
false
false
census-ecosystem/opencensus-microservices-demo
src/recommendationservice/recommendation_server.py
1
4084
#!/usr/bin/python # # Copyright 2018 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 ag...
apache-2.0
186,685,864,770,840,540
36.127273
107
0.706905
false
3.923151
false
false
false
kyelewisstgc/EventMaster-Python
tests/test_old.py
1
4851
#Import Libraries import eventmaster as EM from time import sleep import random import sys def run_test(name_string, command_send_string, command_recieve_string, test_untyped): sys.stdout.write('{0!s} Test ...'.format(name_string)) guid_1 = eval(command_send_string) while s3.has_been_processed(guid_1) != 1: ti...
mit
-1,224,262,246,352,609,000
35.473684
219
0.638013
false
2.583067
true
false
false
Freso/listenbrainz-server
listenbrainz/tests/integration/test_api.py
1
36910
import json import time import pytest from flask import url_for import listenbrainz.db.user as db_user import listenbrainz.db.user_relationship as db_user_relationship from listenbrainz import db from listenbrainz.tests.integration import ListenAPIIntegrationTestCase from listenbrainz.webserver.views.api_tools import...
gpl-2.0
7,448,170,422,559,113,000
42.321596
127
0.599512
false
3.714775
true
false
false
botswana-harvard/tshilo-dikotla
td_maternal/forms/maternal_arv_preg_form.py
1
8440
from edc_appointment.models import Appointment from edc_constants.constants import YES, NO, NOT_APPLICABLE from django import forms from django.apps import apps as django_apps from ..models import (MaternalArvPreg, MaternalArv, MaternalLifetimeArvHistory) from .base_maternal_model_form import BaseMaternalModelForm ...
gpl-2.0
-5,251,576,594,172,909,000
45.888889
133
0.598697
false
4.042146
false
false
false
spadgenske/Jeopardy
jeoparpy/ui/intro.py
1
6128
""" intro.py DESCRIPTION: Functions implementing the beginning of the JeoparPy introduction sequence. Intro music plays, the title fades in over a background, and the subtitle appears. Upon pressing any key, the rules screen appears. Pressing a key again ends the sequence. USAGE: Main should only need to ca...
gpl-3.0
8,658,366,588,429,702,000
31.595745
79
0.641155
false
3.621749
false
false
false
spoonysonny/SAKS-tutorials
chengying/entities/ic_74hc595.py
1
2361
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2016 NXEZ.COM. # http://www.nxez.com # # Licensed under the GNU General Public 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.gnu.org/licen...
gpl-2.0
7,145,231,907,859,546,000
23.340206
77
0.547649
false
3.513393
false
false
false
dkasak/pacal
pacal/examples/singularities.py
1
2567
#!=================================================================== #! Examples of distributions with singularities #!=================================================================== from functools import partial from pylab import * from mpl_toolkits.axes_grid.inset_locator import zoomed_inset_axes from mpl_toolk...
gpl-3.0
-4,821,428,241,829,560,000
31.493671
150
0.534086
false
2.858575
false
false
false
quiltdata/quilt-compiler
lambdas/es/indexer/index.py
1
23450
""" send documents representing object data to elasticsearch for supported file extensions. note: we truncate outbound documents to DOC_SIZE_LIMIT characters (to bound memory pressure and request size to elastic) a little knowledge on deletes and delete markers: if bucket versioning is on: - `aws s3api delete-obje...
apache-2.0
-3,470,820,596,382,642,000
35.356589
116
0.553817
false
4.348229
false
false
false
ocdude/mbzextract
mbzextract/plugins/assignment/assignment.py
1
8744
import os import xml.etree.ElementTree as et import html from datetime import datetime from jinja2 import Environment, PackageLoader class moodle_module: def __init__(self, **kwargs): self.backup = kwargs['backup'] self.temp_dir = kwargs['temp_dir'] self.db = kwargs['db'] self.dir...
mit
-2,250,443,401,529,729,000
48.123596
222
0.483074
false
4.940113
false
false
false
synth3tk/the-blue-alliance
controllers/admin/admin_media_controller.py
1
3104
import json import logging import os from google.appengine.ext.webapp import template from controllers.base_controller import LoggedInHandler from helpers.media_helper import MediaParser from helpers.media_manipulator import MediaManipulator from models.media import Media class AdminMediaDashboard(LoggedInHandler):...
mit
-390,828,834,690,328,260
30.673469
100
0.633054
false
3.969309
false
false
false
ic-hep/DIRAC
Resources/Catalog/ConditionPlugins/test/Test_FilenamePlugin.py
1
1420
""" Test the FilenamePlugin class""" import unittest from DIRAC.Resources.Catalog.ConditionPlugins.FilenamePlugin import FilenamePlugin __RCSID__ = "$Id $" class TestfilenamePlugin( unittest.TestCase ): """ Test the FilenamePlugin class""" def setUp(self): self.lfns = [ '/lhcb/lfn1', '/lhcb/anotherlfn', '/o...
gpl-3.0
-7,581,871,400,807,415,000
25.792453
82
0.635211
false
3.169643
true
false
false
zang3t5u/DCSC_Robots
dcsc_consensus/scripts/Leader_class.py
1
1041
from numpy.matlib import * from numpy.linalg import * import numpy as np import time class Leader: def __init__(self, kp, kd, dt, state = array([[0], [0], [0], [0]])): self.A = array([[-kp+kd/dt, -kd/dt, 0, 0], [1, -1, 0, 0], [0, 0, -kp+kd/dt, -kd/dt], [0, 0, 1, -1]]) self.B = array([[kp, 0], [0, 0], [0, kp], ...
gpl-2.0
7,395,056,700,263,450,000
23.209302
102
0.569645
false
2.272926
false
false
false
scality/manila
manila/tests/compute/test_nova.py
1
12412
# Copyright 2014 Mirantis 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 a...
apache-2.0
-7,645,553,551,109,569,000
35.398827
79
0.609491
false
3.643088
true
false
false
veteman/thepython2blob
floppyinforead.py
1
8961
#Copyright 2015 B. Johan G. Svensson #Licensed under the terms of the MIT license (see LICENSE). from __future__ import division import string, struct, collections import fsslib, floppytrack #import floppyinforead #dsk = floppyinforead.analyzedisc('j:\\Transfer\\CloudKingdom.fss') ##-Take a coffee break....
mit
-6,355,469,575,399,865,000
36.792208
106
0.582747
false
3.58727
false
false
false
Byron/btractor
src/python/btractor/alf/base.py
1
12523
#-*-coding:utf-8-*- """ @package btractor.alf.base @brief Base classes for use with tractor @author Sebastian Thiel @copyright [GNU Lesser General Public License](https://www.gnu.org/licenses/lgpl.html) """ from __future__ import unicode_literals from butility.future import str __all__ = ['AlfOperatorMeta', 'AlfOpera...
lgpl-3.0
675,927,405,643,338,900
38.012461
119
0.558413
false
4.704358
false
false
false
decodio/test_er
epps_reseller/__openerp__.py
1
3639
# -*- encoding: utf-8 -*- ############################################################################## # # Odoo, Open Source Management Solution # This module copyright (C) 2015 Slobodni-programi d.o.o.# # # This program is free software: you can redistribute it and/or modify # it under the terms of th...
agpl-3.0
7,411,549,032,246,315,000
26.360902
105
0.622424
false
3.858961
false
false
false
praekelt/vumi-freeswitch-esl
vxfreeswitch/tests/test_client.py
1
10118
""" Tests for vxfreeswitch.client. """ from zope.interface import implementer from twisted.internet.interfaces import IStreamClientEndpoint from twisted.internet.defer import inlineCallbacks, Deferred, fail, succeed from twisted.internet.protocol import ClientFactory from twisted.test.proto_helpers import StringTrans...
bsd-3-clause
-8,122,824,378,007,507,000
33.06734
75
0.631251
false
4.167216
true
false
false
fthoele/tensormoments
tensormoments/tools.py
1
5153
import pandas as pd import numpy as np from operator import and_ from six import iteritems from functools import reduce import warnings def transformGroupToReal(dataframe): """ Takes a dataframe and transforms the groups in it to a real representation. Args: dataframe: Returns: A copy of...
mit
-5,701,005,479,903,698,000
30.619632
129
0.605473
false
3.715213
false
false
false
vrooje/panoptes_analysis
basic_project_stats.py
1
8792
#Python 2.7.9 (default, Apr 5 2015, 22:21:35) import sys # file with raw classifications (csv) # put this way up here so if there are no inputs we exit quickly before even trying to load everything else try: classfile_in = sys.argv[1] except: #classfile_in = 'data/2e3d12a2-56ca-4d1f-930a-9ecc7fd39885.csv' ...
gpl-2.0
2,390,939,211,970,713,600
43.857143
154
0.704163
false
3.651163
false
false
false
HalcyonChimera/osf.io
website/routes.py
1
55026
# -*- coding: utf-8 -*- from __future__ import absolute_import import os import httplib as http import requests import urlparse import waffle import json from flask import request from flask import send_from_directory from flask import Response from flask import stream_with_context from flask import g from django.core...
apache-2.0
-9,182,283,988,473,625,000
30.407534
182
0.509414
false
4.256014
false
false
false
pixeltasim/IRCBot-Pixeltasim
plugins/scp.py
1
1594
from whiffle import wikidotapi from util import hook import re import time,threading @hook.command def scp(inp): #this is for WL use, easily adaptable to SCP ".scp <Article #> -- Will return exact match of 'SCP-Article#'" api = wikidotapi.connection() #creates API connection api.Site = "scp-wiki" pages = api.refre...
unlicense
500,851,740,016,759,800
45.911765
184
0.673149
false
3.286598
false
false
false
jolynch/mit-tab
mittab/apps/tab/views.py
1
14458
from django.contrib.auth.decorators import permission_required from django.contrib.auth import logout from django.conf import settings from django.http import HttpResponse, JsonResponse, Http404 from django.shortcuts import render, reverse, get_object_or_404 import yaml from mittab.apps.tab.archive import ArchiveExpor...
mit
2,092,619,775,941,231,000
33.588517
88
0.572832
false
3.908624
false
false
false
AlanWarren/dotfiles
.config/ranger/apps_bak.py
1
7092
# Copyright (C) 2009, 2010 Roman Zimbelmann <romanz@lavabit.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # ...
gpl-2.0
-5,672,769,681,852,613,000
29.437768
114
0.656796
false
2.924536
false
false
false
andrmuel/gr-dab
python/fic.py
1
7506
#!/usr/bin/env python # # Copyright 2008 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) ...
gpl-3.0
1,466,706,085,345,232,100
45.333333
328
0.602718
false
3.177815
false
false
false
berycoin-project/berycoin
test/functional/berycoin-spend-op-call.py
1
2271
#!/usr/bin/env python3 from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from test_framework.script import * from test_framework.mininode import * from test_framework.berycoin import * from test_framework.address import * from test_framework.blocktools import * import tim...
gpl-3.0
-3,772,808,376,688,454,700
38.155172
192
0.672831
false
3.369436
true
false
false
windelbouwman/ppci-mirror
tools/compile_musl_libc.py
1
2076
""" Helper script to help in compilation of the musl libc. See for the musl library: https://www.musl-libc.org/ """ import os import logging import glob import time import traceback from ppci.api import cc from ppci.lang.c import COptions from ppci.common import CompilerError, logformat home = os.environ['HOME'] mu...
bsd-2-clause
-8,647,182,432,270,367,000
27.833333
74
0.587187
false
3.223602
false
false
false
wcmckee/nikola
nikola/plugins/command/import_wordpress.py
1
52729
# -*- coding: utf-8 -*- # Copyright © 2012-2016 Roberto Alsina and others. # Permission is hereby granted, free of charge, to any # person obtaining a copy of this software and associated # documentation files (the "Software"), to deal in the # Software without restriction, including without limitation # the rights t...
mit
5,451,225,839,017,826,000
43.760611
245
0.54728
false
4.211165
false
false
false
jpedrorl/Robotics-AI
final/robbie.py
1
10715
import copy import math from time import time # remote API script REMOTE_API_OBJ = 'RemoteAPI' REMOTE_API_FUNC = 'resetSimulation' # robot constants STUCK_MARGIN = 1e-2 STUCK_TIMEOUT = 10 FALL_HEIGHT = 7e-2 # robot joints names TAIL_JOINT = "tailJoint" LEG_TOP_JOINT = "robbieLegJoint1" LEG_MIDDLE_JOINT = "robbieLegJ...
mit
9,150,720,905,400,978,000
34.716667
116
0.597294
false
3.524671
false
false
false
DylanSecreast/uoregon-cis-portfolio
uoregon-cis-433/Testing stuff/TestingSyn.py
1
1040
import socket import random import sys import threading from scapy.all import * if len(sys.argv) != 5: print "Usage: %s <TargetIp> <Port>" % sys.argv[0] sys.exit(1) target = sys.argv[1] port = int(sys.argv[2]) total = 0 conf.iface = 'en1' class syn(threading.Thread): global target global port ...
gpl-3.0
-7,891,160,487,441,633,000
18.259259
126
0.556731
false
3.301587
false
false
false
Luminous311/gtgapp
equipment/views.py
1
2156
from django.shortcuts import render_to_response from equipment.models import * """def getalltypes(): e = EquipmentType.objects.select_related() dict = {} for i in e: if str(i.equipment_class) in dict: dict[str(i.equipment_class)].append(str(i)) else: dict[str(i.equip...
mit
-1,836,965,884,439,657,000
34.933333
132
0.674397
false
3.769231
false
false
false
parkr/Angels-vs-Demons
activity.py
1
7979
#! /usr/bin/python # # Author: Parker Moore # Class: COMP 206 - McGill University # Winter 2011 # Assignment 5 # Team Quad-Core Programmers # print "Content-type: text/html\n\n" import cgitb; cgitb.enable() class Page: def __init__(self): self.template_page = "index.html.pyt" self.inventory_file = "inventory....
gpl-2.0
6,670,208,012,786,311,000
35.43379
230
0.624389
false
2.836474
false
false
false
strogo/turbion
turbion/bits/openid/views/server.py
1
6676
from django import http from django.contrib import auth from django.views.generic.simple import direct_to_template from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import force_unicod...
bsd-3-clause
8,777,114,912,668,532,000
32.38
97
0.649641
false
4.090686
false
false
false
macauleycheng/AOS_OF_Example
00-table-group-unit-test/17-L2_Overlay_Group_Flood_Over_UC_Tunnel/edit_config.py
1
8084
import pkg_resources pkg_resources.require("ncclient==0.4.3") from ncclient import manager import ncclient #due to ofconfig design problem, it need fill port feature #but we won't use it currently. #of-agent nexthop 2 destination user-input-dst-mac ethernet 1/2 vid 2 config_nexthop_ucast_xml=""" <confi...
apache-2.0
277,871,642,250,651,300
33.769912
119
0.517566
false
3.334983
true
false
false
euclidjda/deep-quant
scripts/build_datfile.py
1
2682
#! /usr/bin/env python3 # Copyright 2016 Euclidean Technologies Management LLC 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/LIC...
mit
-2,462,238,654,152,892,400
34.289474
80
0.641685
false
3.689133
false
false
false