repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
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
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
vvoland/py3status
py3status/modules/weather_owm.py
1
29150
# -*- coding: utf-8 -*- """ Display ultimately customizable weather. This module allows you to specify an icon for nearly every weather scenario imaginable. The default configuration options lump many of the icons into a few groups, and due to the limitations of UTF-8, this is really as expressive as it gets. This mo...
bsd-3-clause
1,267,535,162,416,054,500
34.735547
85
0.576739
false
collective/zettwerk.users
setup.py
1
1553
from setuptools import setup, find_packages import os version = '0.2.dev0' install_requires = [ 'setuptools', # -*- Extra requirements: -*- ] tests_require = [ 'mocker', ] setup(name='zettwerk.users', version=version, description="Additional user information for Plone", ...
gpl-2.0
-6,070,823,635,687,436,000
31.354167
84
0.607856
false
iron-bun/python_scripts
scrape_your_plate/scrape_your_plate.py
1
7791
#!/usr/bin/env python3 # # Scrape recipes from pepperplate.com. # import requests from bs4 import BeautifulSoup import lxml.html import json import time import getpass import re import os class pepperplate_recipe: def __init__(self, id, html): self.id = id self.soup = BeautifulSoup(html) def...
unlicense
8,452,935,934,564,985,000
31.327801
165
0.566294
false
candycode/qpy
test/baseclass.py
1
1893
# QPy - Copyright (c) 2012,2013 Ugo Varetto # 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 cond...
bsd-3-clause
-2,239,623,393,493,448,000
41.088889
87
0.751717
false
tuxofil/sort-media
sort_media.py
1
14535
#!/usr/bin/env python """ This script helps to sort images and videos by date and time. It searches given source directory recursively for media files (images and movies), fetch date and time information from them and copies it (or moves, see '--move' command line option) to destination directory. New file location ...
bsd-2-clause
-3,257,157,324,738,049,000
31.15708
77
0.581218
false
alfa-addon/addon
plugin.video.alfa/channels/tnaflix.py
1
7036
# -*- coding: utf-8 -*- #------------------------------------------------------------ import sys PY3 = False if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int if PY3: import urllib.parse as urlparse # Es muy lento en PY2. En PY3 es nativo else: import...
gpl-3.0
-8,309,674,059,046,816,000
44.070513
139
0.61556
false
wittrup/crap
whitespace/definitions.py
1
2242
whspchars = "\t\n " nonwhite = bytearray(set(range(0x00, 0x100)) - {9, 10, 32}) """http://compsoc.dur.ac.uk/whitespace/tutorial.html Whitespace tutorial The only lexical tokens in the whitespace language are Space (ASCII 32), Tab (ASCII 9) and Line Feed (ASCII 10). By only allowing line feed as a token, CR/LF problems...
mit
-2,076,799,982,940,555,000
58.026316
216
0.665031
false
Nicotine-Plus/nicotine-plus
pynicotine/plugins/multipaste/__init__.py
1
2462
# COPYRIGHT (C) 2020-2021 Nicotine+ Team # COPYRIGHT (C) 2009 Daelstorm <daelstorm@gmail.com> # COPYRIGHT (C) 2008 Quinox <quinox@users.sf.net> # # GNU GENERAL PUBLIC LICENSE # Version 3, 29 June 2007 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Pub...
gpl-3.0
7,843,400,834,001,445,000
35.746269
120
0.639318
false
Dubrzr/dsfaker
dsfaker/generators/date.py
1
1107
import numpy from . import Generator, ScalingOperator, BoundedGenerator class RandomDatetime(Generator): def __init__(self, generator: BoundedGenerator, start: numpy.datetime64, end: numpy.datetime64, unit): """ A timezone-aware class to generate datetimes between start and end (inclusive) follow...
mit
7,846,631,893,601,746,000
43.28
134
0.64589
false
Jaapp-/cloudomate
cloudomate/gateway/bitpay.py
1
2301
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os from math import pow import electrum.bitcoin as bitcoin from electrum import paymentrequest as pr from future import standard_library from future.moves.urllib ...
lgpl-3.0
-7,944,241,061,399,661,000
31.408451
115
0.646675
false
wheeler-microfluidics/teensy-minimal-rpc
rename.py
1
2609
from __future__ import absolute_import import sys import pandas as pd from path_helpers import path def main(root, old_name, new_name): names = pd.Series([old_name, new_name], index=['old', 'new']) underscore_names = names.map(lambda v: v.replace('-', '_')) camel_names = names.str.split('-').map(lambda x...
gpl-3.0
-8,312,201,469,927,363,000
36.811594
78
0.558835
false
jerjou/gssheet
gssheet/spreadsheet.py
1
9422
import cgi import csv import datetime import json import re import oauth2 class Cell: def __init__(self, xml): self.row = xml['gs$cell']['row'] self.col = xml['gs$cell']['col'] self.value = xml['gs$cell']['inputValue'] self.edit_url = (l['href'] for l in xml['link'] if 'edit' == l['rel']).next() d...
bsd-2-clause
-3,269,858,196,076,954,000
27.638298
90
0.573445
false
mcfletch/django-assets
django_assets/env.py
1
8523
import imp import threading from importlib import import_module from django.apps import apps from django.contrib.staticfiles import finders from django.conf import settings from webassets.env import ( BaseEnvironment, ConfigStorage, Resolver, url_prefix_join) from django_assets.glob import Globber, has_magic __...
bsd-2-clause
5,771,456,800,310,562,000
33.228916
78
0.611756
false
JeromeParadis/django-activity-stream
actstream/migrations/0007_auto__add_field_follow_started.py
1
6331
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models try: # timezone support for django > 1.4 from django.utils import timezone tz = timezone except ImportError: tz = d...
bsd-3-clause
8,487,151,324,711,568,000
71.770115
204
0.561365
false
cedricbonhomme/Grenouille
watcher.py
1
2434
#! /usr/bin/env python # -*- coding: utf-8 -*- # Grenouille - An online service for weather data. # Copyright (C) 2014 Cédric Bonhomme - http://cedricbonhomme.org/ # # 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 th...
agpl-3.0
-7,473,430,504,389,210,000
25.445652
79
0.637896
false
anurag03/integration_tests
cfme/tests/automate/custom_button/test_cloud_objects.py
1
4937
import pytest import fauxfactory from widgetastic_patternfly import Dropdown from cfme.cloud.provider.openstack import OpenStackProvider from cfme.markers.env_markers.provider import ONE_PER_TYPE from cfme.utils.appliance.implementations.ui import navigate_to from cfme.utils.log import logger pytestmark = [ pyt...
gpl-2.0
-4,903,172,113,030,429,000
32.815068
99
0.655459
false
strogo/djpcms
djpcms/apps/cache.py
1
5941
from copy import deepcopy from django.core.cache import cache from django.contrib.sites.models import Site from django.db.models import signals from django.http import Http404 from djpcms import sites from djpcms.models import Page from djpcms.views import appsite from djpcms.views.baseview import pageview class Pa...
bsd-3-clause
7,900,610,637,577,406,000
31.464481
105
0.529709
false
nafitzgerald/allennlp
allennlp/modules/token_embedders/embedding.py
1
13971
import gzip import logging from overrides import overrides import numpy import torch from torch.nn.functional import embedding import h5py from allennlp.common import Params from allennlp.common.checks import ConfigurationError from allennlp.common.file_utils import cached_path from allennlp.data import Vocabulary fr...
apache-2.0
-4,872,697,086,478,548,000
46.359322
108
0.610622
false
arannasousa/pagseguro_xml
exemplos/testes_assinatura.py
1
6513
# coding=utf-8 # --------------------------------------------------------------- # Desenvolvedor: Arannã Sousa Santos # Mês: 12 # Ano: 2015 # Projeto: pagseguro_xml # e-mail: asousas@live.com # --------------------------------------------------------------- import loggin...
gpl-2.0
5,631,187,900,823,134,000
26.476793
118
0.590078
false
sailorsenergy/windb2
bin/insert-mesowest-data.py
1
5096
#!/usr/bin/env python3 # # # Mike Dvorak # Postdoc # UC Berkeley # Civil and Environmental Engineering # dvorak@berkeley.edu # # Created: 2013-07-09 # Modified: 2016-01-22 # # # Description: Inserts CSV files from Mesowest (mesowest.utah.edu). The CSV files are the type you get when you save # the "CSV" files, which ar...
gpl-3.0
-6,013,748,427,673,454,000
31.458599
187
0.681515
false
all-of-us/raw-data-repository
tests/tool_tests/test_curation_etl.py
1
17171
from datetime import datetime from rdr_service.code_constants import CONSENT_FOR_STUDY_ENROLLMENT_MODULE, EMPLOYMENT_ZIPCODE_QUESTION_CODE, PMI_SKIP_CODE,\ STREET_ADDRESS_QUESTION_CODE, STREET_ADDRESS2_QUESTION_CODE, ZIPCODE_QUESTION_CODE from rdr_service.etl.model.src_clean import SrcClean from rdr_service.model....
bsd-3-clause
-5,724,208,699,402,696,000
44.306069
125
0.649409
false
hansbrenna/NetCDF_postprocessor
area_calculator.py
1
1415
# -*- coding: utf-8 -*- """ Created on Thu Jun 25 13:07:42 2015 @author: hanbre """ from __future__ import print_function from math import * import numpy as np R=6378*1000 #Earth's radius lat1=radians(12.31579) #latitude and longitude boundaries for the calculation lat2=radians(16.10526) lon1=268.5 lon2=272.5 P=29.7...
gpl-3.0
-8,894,281,081,695,982,000
25.222222
96
0.708127
false
cowlicks/odo
odo/into.py
1
4707
from __future__ import absolute_import, division, print_function import functools from toolz import merge from multipledispatch import Dispatcher from .convert import convert from .append import append from .resource import resource from .utils import ignoring import datashape from datashape import discover from d...
bsd-3-clause
-1,310,497,420,108,693,200
29.967105
90
0.656682
false
dgilland/alchy
setup.py
1
1592
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from setuptools import setup, find_packages def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() def parse_requirements(filename): return [line.strip() for line in read(filename).strip().split('\n') ...
mit
8,434,848,589,541,545,000
29.615385
71
0.606784
false
pFernbach/hpp-rbprm-corba
script/scenarios/sandbox/siggraph_asia/hyq_mountain/mount_hyq.py
1
9629
#Importing helper class for RBPRM from hpp.corbaserver.rbprm.rbprmbuilder import Builder from hpp.corbaserver.rbprm.rbprmfullbody import FullBody from hpp.corbaserver.rbprm.problem_solver import ProblemSolver from hpp.gepetto import Viewer #reference pose for hyq from hyq_ref_pose import hyq_ref from hpp.corbaserver.r...
lgpl-3.0
-1,662,335,096,747,913,000
28.356707
159
0.662374
false
lisaglendenning/pynet
tests/events/test_sockets.py
1
2810
# @copyright # @license r""" History ------- - Apr 8, 2011 @lisa: Created """ import unittest from pynet.events.sockets import * ############################################################################# ############################################################################# class TestCaseSockets(unit...
mit
-8,685,764,323,175,461,000
28.578947
77
0.521708
false
vivekpabani/projecteuler
python/012/problem_012.py
1
1116
#!/usr/bin/env python """ Problem Definition : The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The first ten terms would be: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ... Let us list the factors of the first seven triangle n...
apache-2.0
-4,799,293,626,819,717,000
18.578947
174
0.594086
false
seakers/daphne_brain
AT/analysis/AnomalyDetectionAgreements.py
1
5289
import logging from django.shortcuts import render from django.http import Http404 from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status import pandas as pd import numpy as np import json def fill_neighbors(series, radius): n = series.shape[0] ...
mit
6,911,759,693,028,830,000
43.445378
135
0.615239
false
RocketRedNeck/PythonPlayground
pidSim2.py
1
20497
# -*- coding: utf-8 -*- """ pidSim2.py A simulation of a vision control to steering PID loop accounting for communication and processing latency and variation; demonstrates the impact of variation to successful control. THIS VERSION models the control as a 1st order input (velocity) and then integrates once to get po...
mit
8,180,067,789,737,755,000
43.56087
133
0.694346
false
chebee7i/twitter
data/rsync.py
1
1182
""" Script to backup Twitter data using rsync. A lockfile ensures that this script does not run until the previous run has finished. """ from __future__ import print_function import errno import fcntl import glob import os import subprocess import sys import time import configparser config = configparser.ConfigPa...
unlicense
-8,303,988,705,077,570,000
21.730769
75
0.598139
false
pexip/pygobject
tests/test_docstring.py
1
4923
from __future__ import absolute_import import unittest import gi.docstring from gi.repository import Regress from gi.repository import GIMarshallingTests from gi.repository import Gio from gi.repository import GObject from gi.repository import GLib try: from gi.repository import Gtk except ImportError: Gtk ...
lgpl-2.1
-3,265,956,672,390,998,000
35.738806
115
0.6039
false
alexey4petrov/pythonFlu
Foam/Ref/MULES_interfaces.py
1
1138
## pythonFlu - Python wrapping for OpenFOAM C++ API ## Copyright (C) 2010- Alexey Petrov ## Copyright (C) 2009-2010 Pebble Bed Modular Reactor (Pty) Limited (PBMR) ## ## 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 F...
gpl-3.0
-5,444,624,529,596,405,000
41.148148
111
0.673111
false
hust921/PS1-Remapper
Remapper_defines.py
1
1040
from collections import namedtuple Button = namedtuple("Button", ["name", "winVal", "mask"]) buttons = [ Button(name="psxLeft", winVal=0x25, mask=1), # Arrow Left Button(name="psxDown", winVal=0x28, mask=2), # Arrow Down Button(name="psxRight", winVal=0x27, mask=4), # Arrow Right ...
mit
7,600,898,205,253,320,000
60.176471
70
0.583654
false
cortesi/qtile
libqtile/widget/mpd2widget.py
1
5933
from . import base from libqtile.log_utils import logger from six import u, text_type from socket import error as socket_error from mpd import MPDClient, ConnectionError, CommandError # Shortcuts # TODO: Volume inc/dec support keys = { # Left mouse button "toggle": 1, # Right mouse button "stop": 3, ...
mit
8,775,754,530,389,253,000
28.517413
87
0.578797
false
jmikko/fairnessML
hyperparameter_curve_kernel.py
1
13422
from load_data import load_binary_diabetes_uci, load_heart_uci, load_breast_cancer,\ load_adult, load_adult_race, load_adult_race_white_vs_black, laod_propublica_fairml, laod_propublica_fairml_race,\ laod_propublica_fairml_hotencoded, load_default, load_hepatitis, load_arrhythmia from load_data import load_expe...
gpl-3.0
-6,998,043,642,569,272,000
40.55418
153
0.647444
false
mitsuhiko/celery
celery/bin/celerybeat.py
1
4325
#!/usr/bin/env python """celerybeat .. program:: celerybeat .. cmdoption:: -s, --schedule Path to the schedule database. Defaults to ``celerybeat-schedule``. The extension ".db" will be appended to the filename. .. cmdoption:: -f, --logfile Path to log file. If no logfile is specified, ``stderr`` is us...
bsd-3-clause
2,549,191,977,450,604,500
29.892857
77
0.602081
false
yuxiang-zhou/AnimeTracker
AnimeFetcher/anime_updater_78land.py
1
2889
#!/usr/bin/python3 import sys import BaseHTTPServer import cgi import json import threading import urllib2 import time from bs4 import BeautifulSoup from pymongo import MongoClient import datetime reload(sys) sys.setdefaultencoding('utf-8') num_retry = 12 period = int(3600*12) con = MongoClient...
mit
-7,170,149,306,758,141,000
26.60396
133
0.610246
false
yddgit/hello-python
send_email/send_email_html_plain.py
1
2564
#!/usr/bin/env python # -*- coding: utf-8 -*- from email import encoders from email.header import Header from email.utils import parseaddr, formataddr from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText import smtplib # 格式化邮件地址,如果包含中文需要通过Header对象进行编码 def _format_addr(s): name, addr...
apache-2.0
-8,638,957,130,049,513,000
34.098039
141
0.73352
false
Ezhil-Language-Foundation/open-tamil
tamilmorse/tamil_morse_code.py
1
2127
## -*- coding: utf-8 -*- # (C) 2018 Muthiah Annamalai # This file is part of Open-Tamil project # You may use or distribute this file under terms of MIT license ## from __future__ import print_function import codecs import json from solthiruthi import resources from .huffman import huffman, print_huffman_code_cwl de...
mit
7,503,958,441,565,421,000
28.136986
73
0.594264
false
google/llvm-propeller
lldb/test/API/commands/register/register/register_command/TestRegisters.py
2
20344
""" Test the 'register' command. """ from __future__ import print_function import os import sys import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class RegisterCommandsTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) N...
apache-2.0
-5,126,383,728,565,919,000
39.525896
191
0.550826
false
neilLasrado/frappe
frappe/desk/search.py
1
6239
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # Search from __future__ import unicode_literals import frappe, json from frappe.utils import cstr, unique, cint from frappe.permissions import has_permission from frappe import _ from six import string_types import re ...
mit
-7,745,082,749,918,084,000
34.248588
151
0.678314
false
magcius/sweettooth
sweettooth/review/migrations/0005_auto__add_field_changestatuslog_auto_approved.py
1
7915
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'ChangeStatusLog.auto_approved' db.add_column('review_changestatuslog', 'auto_approved', se...
agpl-3.0
-7,173,393,145,064,413,000
70.954545
182
0.560455
false
MDSLab/s4t-iotronic
iotronic/db/sqlalchemy/models.py
1
6812
# -*- encoding: utf-8 -*- # # Copyright 2013 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICE...
apache-2.0
8,382,822,558,443,551,000
29.410714
78
0.642543
false
Kyly/mustaske
test/selenium_src/markdown_formating.py
1
2795
# -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import Select from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException...
mit
2,582,295,834,680,488,000
37.833333
124
0.6322
false
katharosada/bus-shaming
busshaming/data_processing/calculate_stop_hour_stats.py
1
7465
from datetime import datetime, timedelta from statistics import mean, median from collections import defaultdict import pytz from busshaming.enums import ScheduleRelationship from busshaming.models import TripStop, RealtimeEntry, RouteStopDay, RouteStopHour AU_TIMEZONE = pytz.timezone('Australia/Sydney') meta_stats...
mit
-5,729,665,918,427,133,000
45.65625
141
0.62639
false
chromium/chromium
tools/cygprofile/check_orderfile.py
7
2870
#!/usr/bin/env vpython # Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Check that symbols are ordered into a binary as they appear in the orderfile. """ import logging import optparse import sys impor...
bsd-3-clause
936,724,482,510,614,900
32.764706
80
0.650871
false
woutervanwijk/mopidy
mopidy/utils/path.py
1
6823
from __future__ import unicode_literals import Queue as queue import logging import os import stat import string import threading import urllib import urlparse import glib logger = logging.getLogger(__name__) XDG_DIRS = { 'XDG_CACHE_DIR': glib.get_user_cache_dir(), 'XDG_CONFIG_DIR': glib.get_user_config_d...
apache-2.0
1,331,943,284,067,081,500
29.324444
79
0.625531
false
paramsingh/lazycoin
funcs.py
1
1056
import socket def send_data(sock,data): sock.sendall(data) def receive_data(sock,size = 4096): data = bytes() while size: recv = sock.recv(size) if not recv: raise ConnectionError() data += recv size -= len(recv) return data def nDigit(s,size): s = str(s) if(len(s)<size): s = '0'*(size-len(s))+s ...
mit
6,221,665,157,644,711,000
21.956522
68
0.699811
false
rarbg/ZeroNet
src/Worker/WorkerManager.py
1
7098
from Worker import Worker import gevent, time, logging, random MAX_WORKERS = 10 # Worker manager for site class WorkerManager: def __init__(self, site): self.site = site self.workers = {} # Key: ip:port, Value: Worker.Worker self.tasks = [] # {"evt": evt, "workers_num": 0, "site": self.site, "inner_path": inne...
gpl-2.0
5,870,406,172,953,979,000
33.794118
210
0.67681
false
openwisp/nodeshot
nodeshot/interop/sync/tests.py
1
28449
import sys from cStringIO import StringIO from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.core import management from django.core.urlresolvers import reverse from django.core.exceptions import ValidationError from django.contrib.gis.geos import Point, GEOSGeometry from nodeshot.co...
gpl-3.0
39,684,481,963,640,550
37.033422
848
0.619916
false
ewels/MultiQC
multiqc/modules/biobambam2/biobambam2.py
1
1974
#!/usr/bin/env python """ MultiQC module to parse output from biobambam2 """ from __future__ import print_function from collections import OrderedDict import logging from multiqc.modules.base_module import BaseMultiqcModule from multiqc.modules.picard import MarkDuplicates # Initialise the logger log = logging.getL...
gpl-3.0
4,941,387,552,553,416,000
32.457627
87
0.636778
false
kz26/PyExcelerate
pyexcelerate/Writer.py
1
3563
import os import sys import tempfile from zipfile import ZipFile, ZIP_DEFLATED from datetime import datetime import time from jinja2 import Environment, FileSystemLoader from . import Color if getattr(sys, "frozen", False): _basedir = os.path.join(sys._MEIPASS, "pyexcelerate") else: _basedir = os.path.dirname(...
bsd-2-clause
400,589,239,352,780,500
38.153846
86
0.58911
false
stevegt/librabinpoly
test/benchmark.py
1
1127
#!/usr/bin/python from ctypes import * import sys import timeit sys.path.append('..') import rabinpoly as lib fn = sys.argv[1] libc = CDLL("libc.so.6") fopen = libc.fopen fread = libc.fread feof = libc.feof fread.argtypes = [c_void_p, c_size_t, c_size_t, c_void_p] window_size = 32 min_block_size = 2**14 avg_block...
gpl-2.0
2,347,288,876,777,289,000
19.87037
67
0.573203
false
DeStars/omniture_python
omniture_python/omniture_wrapper.py
1
2260
import binascii import urllib2 import json from hashlib import sha1 import base64 import datetime import calendar import time __author__ = 'DeStars' class OmnitureWrapper: def __init__(self, user_name, secret): self._user_name = user_name self._secret = secret def __create_header(self): ...
mit
-2,951,056,399,141,589,500
36.04918
104
0.615929
false
idiotic/idiotic
idiotic/util/blocks/teapot.py
1
1895
from idiotic.util.resources import http from idiotic import block import logging import asyncio import aiohttp import time log = logging.getLogger(__name__) class Teapot(block.Block): def __init__(self, name, **config): super().__init__(name, **config) self.name = name self.config = {"add...
mit
-4,488,406,143,664,696,000
36.156863
120
0.530871
false
mupi/escolamupi
payments/migrations/0001_initial.py
1
7873
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'UserPayments' db.create_table(u'payments_userpayments', (...
agpl-3.0
5,020,216,592,489,578,000
64.616667
195
0.573733
false
wieden-kennedy/spring-jpa-hibernate-templator
generator/Generator.py
1
2025
from os import chdir,mkdir from os.path import join,exists class Generator: def __init__(self,generator_type,root_dir,basepackage,java_source_dir,model=None): if generator_type: self.type=generator_type if root_dir: self.root_dir=root_dir if basepackage: ...
bsd-3-clause
1,190,702,424,003,001,900
33.338983
105
0.601975
false
youdar/work
work/Clashes/Old work/compare_delta.py
1
3072
from __future__ import division import Test_internal_clashscore import os,sys ''' Collect clash information from PROBE in resraints_manager and compare them ''' def get_files_data(): '''() -> list,list reads files RM_clash_results PROBE_clash_results in folder: C:\Phenix\Dev\Work\work\Clashes\junk R...
mit
-8,545,692,545,632,096,000
32.769231
117
0.657552
false
wannabegeek/PyFIX
pyfix/session.py
1
1093
import logging class FIXSession: def __init__(self, key, targetCompId, senderCompId): self.key = key self.senderCompId = senderCompId self.targetCompId = targetCompId self.sndSeqNum = 0 self.nextExpectedMsgSeqNum = 1 def validateCompIds(self, targetCompId, senderCompId...
cc0-1.0
8,573,742,107,478,617,000
35.433333
124
0.660567
false
arobito/arobito
test/tests/arobito/controlinterface/ControllerBackend.py
1
11355
# -*- coding: utf-8 -*- # Copyright 2014 The Arobito Project # # 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 applicab...
apache-2.0
-4,236,723,802,794,633,700
34.586207
120
0.646934
false
bladyjoker/python-oauth2
oauth2/messages.py
1
3611
## Authorization AuthorizationRequestParam = tuple AuthorizationRequestType = str AUTHCODE_AUTHREQTYPE = AuthorizationRequestType('code') IMPLICIT_AUTHREQTYPE = AuthorizationRequestType('token') class AuthorizationRequest(object): def __init__(self, request_type: AuthorizationRequestType, params: [AuthorizationRequ...
gpl-2.0
8,317,927,578,722,036,000
29.344538
97
0.751592
false
sandeepklr/gridmap
gridmap/job.py
1
35680
# -*- coding: utf-8 -*- # Written (W) 2008-2012 Christian Widmer # Written (W) 2008-2010 Cheng Soon Ong # Written (W) 2012-2014 Daniel Blanchard, dblanchard@ets.org # Copyright (C) 2008-2012 Max-Planck-Society, 2012-2014 ETS # This file is part of GridMap. # GridMap is free software: you can redistribute it and/or m...
gpl-3.0
7,930,880,811,626,348,000
35.745623
112
0.544142
false
jmanoel7/my_dot_files
.local/share/gedit/plugins/xmlhelper.py
1
14182
# -*- coding: utf8 -*- # XML Helper for GEdit # # Copyright (c) 2007 Matej Cepl <matej@ceplovi.cz> # Additional Author : Ajith Sen G. S. <ajithsengs@gmail.com> # Additional Author : Oliver Sauder <os@esite.ch> # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associ...
gpl-3.0
-6,545,584,575,914,101,000
35.645995
78
0.570582
false
monetario/core
monetario/views/api/decorators.py
1
4822
import functools from flask import jsonify as flask_jsonify from flask import request from flask import url_for def jsonify(exclude=None): """ This decorator generates a JSON response from a Python dictionary or a SQLAlchemy model. """ def decorator(f): @functools.wraps(f) def wra...
bsd-3-clause
1,515,050,096,615,621,600
29.327044
80
0.518872
false
dbuch/systemd
man/90-rearrange-path.py
1
1400
#!/usr/bin/python3 """ Proof-of-concept systemd environment generator that makes sure that bin dirs are always after matching sbin dirs in the path. (Changes /sbin:/bin:/foo/bar to /bin:/sbin:/foo/bar.) This generator shows how to override the configuration possibly created by earlier generators. It would be easier ...
gpl-2.0
-3,990,370,177,937,099,000
33.9
85
0.609599
false
he7d3r/revscoring
revscoring/features/wikitext/datasources/sentences.py
1
1893
from deltas.segmenters import MatchableSegment from revscoring.datasources import Datasource from revscoring.datasources.meta import indexable class Revision: def __init__(self, name, revision_datasources): super().__init__(name, revision_datasources) self.sentences = Datasource( se...
mit
-941,986,875,014,066,800
29.047619
75
0.593767
false
jimsize/PySolFC
pysollib/games/matriarchy.py
1
8074
#!/usr/bin/env python # -*- mode: python; coding: utf-8; -*- # ---------------------------------------------------------------------------## # # Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer # Copyright (C) 2003 Mt. Hood Playing Card Co. # Copyright (C) 2005-2009 Skomoroh # # This program is free softwa...
gpl-3.0
-6,562,917,565,485,467,000
33.801724
79
0.523037
false
GoogleCloudPlatform/gsutil
gslib/impersonation_credentials.py
1
2566
# -*- coding: utf-8 -*- # Copyright 2019 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
apache-2.0
-9,101,236,373,902,733,000
39.730159
80
0.625877
false
tytso/xfstests-bld
kvm-xfstests/test-appliance/files/usr/lib/python3/dist-packages/junitparser/cli.py
2
1595
from argparse import ArgumentParser from glob import iglob from itertools import chain from . import JUnitXml, version def merge(paths, output): """Merge xml report.""" result = JUnitXml() for path in paths: result += JUnitXml.fromfile(path) result.update_statistics() result.write(output...
gpl-2.0
4,698,021,028,848,066,000
26.982456
82
0.626332
false
pmonta/GNSS-DSP-tools
acquire-galileo-e5aq.py
1
3231
#!/usr/bin/env python import optparse import numpy as np import scipy.signal import scipy.fftpack as fft import gnsstools.galileo.e5aq as e5aq import gnsstools.nco as nco import gnsstools.io as io import gnsstools.util as util # # Acquisition search # def search(x,prn,doppler_search,ms): fs = 3*10230000.0 n = ...
mit
-4,065,531,073,665,987,000
30.067308
153
0.672547
false
macosforge/ccs-calendarserver
contrib/tools/tables.py
1
9609
## # Copyright (c) 2009-2017 Apple Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
apache-2.0
-7,932,836,984,542,855,000
33.941818
118
0.605058
false
yalewoosoft/shadowsocks
speedtest_thread.py
1
7027
#!/usr/bin/python # -*- coding: UTF-8 -*- import logging import time import sys import os import configloader import importloader from speedtest import speedtest from shadowsocks import common, shell class Speedtest(object): def __init__(self): import threading self.event = threading.Event() ...
apache-2.0
-3,055,601,498,901,799,000
35.984211
231
0.468336
false
lamthientruc/vac
benchmarks/Time/ASASPTIME_Hier/ASASPTIME/agtHiertoNonHierAdapt.py
2
10522
#!/usr/bin/env python import sys fn = sys.argv[1] #input file with temporal hierarchies #format input file #[Hierarchies] #1>2>t1 #3>4>t2 #[UA0] #u1 2 4 3 > t1 #u2 2 4 3 > t1 #u9 4 2 > t5 #rs 1 > t1 # for initial enabled roles #rs 2 > t1 #[Rules] #can_assign #can_revoke on = sys.argv[2] #output file with no hier...
bsd-2-clause
6,503,462,406,943,212,000
24.916256
103
0.529177
false
JioCloud/oslo.vmware
oslo/vmware/common/loopingcall.py
2
4594
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
apache-2.0
-2,428,121,379,658,182,700
30.682759
78
0.585329
false
neurodrone/jansson
doc/conf.py
1
7023
# -*- coding: utf-8 -*- # # Jansson documentation build configuration file, created by # sphinx-quickstart on Sun Sep 5 21:47:20 2010. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All...
mit
4,893,255,672,417,115,000
31.364055
80
0.708244
false
gfitzp/sql-connections
sqlconnections_oracle.py
1
5552
# The MIT License (MIT) # # Copyright © 2015 Glenn Fitzpatrick # # 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,...
mit
-3,997,224,486,578,959,000
22.521186
121
0.590885
false
flgiordano/netcash
+/google-cloud-sdk/lib/googlecloudsdk/calliope/cli_tree.py
1
9923
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
bsd-3-clause
1,056,222,635,158,947,700
34.439286
80
0.612617
false
xmendez/wfuzz
src/wfuzz/plugins/payloads/shodanp.py
1
1602
from wfuzz.externals.moduleman.plugin import moduleman_plugin from wfuzz.plugin_api.payloadtools import ShodanIter from wfuzz.plugin_api.base import BasePayload from wfuzz.fuzzobjects import FuzzWordType @moduleman_plugin class shodanp(BasePayload): name = "shodanp" author = ("Xavi Mendez (@xmendez)",) ve...
gpl-2.0
-1,685,633,677,487,755,800
26.152542
76
0.56804
false
pgiri/asyncoro
py3/asyncoro/asyncfile.py
1
36873
"""This file is part of asyncoro; see http://asyncoro.sourceforge.net for details. This module provides API for asynchronous file and pipe processing. They work with Windows, Linux, OS X and likely other UNIX variants. Note that regular (on-disk) files don't support asynchronous I/O, as they are non-blocking and can't...
mit
-483,532,685,367,652,300
39.12296
98
0.496488
false
jeffkaufman/diplomator
disp.py
1
16620
""" Usage: $ ls IMAGE_L.gif icons COORDINATES statusfile $ python disp.py datafilesdir statusfile tmp.png """ import sys import os.path from random import random import Image, ImageDraw from math import sqrt, acos, sin ILLEGAL_PLACEMENT = (5,5) # The special value 5,5 for coordinates indicates illegal...
gpl-2.0
7,914,423,068,613,350,000
25.849758
135
0.581649
false
nicolasfauchereau/paleopy
paleopy/core/WR.py
1
7469
import os import sys import numpy as np import pandas as pd import h5py import json from ..markov import get_probs from ..utils import seasons_params from ..plotting import heatmap from ..plotting import bar from ..utils import make_sig class WR: """ base class for weather regimes calculations and plots ...
mit
420,959,520,509,369,000
35.612745
96
0.543312
false
nickattree/Minijets
mj_morpho.py
1
3063
# -*- coding: utf-8 -*- """ Created on Sat Feb 20 10:51:13 2016 @author: noa """ # Theoretical time evolution of minijet gradient def theory(M): return np.arctan((1.0 - np.cos(M))/(2.0 * np.sin(M) - 1.5 * M)) * 180.0 / np.pi # Currently uses graphical comparison method - inefficient and slow # Also accuracy dep...
mit
3,180,090,542,250,781,700
33.426966
105
0.634019
false
kikocorreoso/brython
www/src/Lib/interpreter.py
1
14285
import sys import tb as traceback from browser import console, document, window, html, DOMNode from browser.widgets.dialog import Dialog _credits = """ Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands for supporting Python development. See www.python.org for more information.""" _cop...
bsd-3-clause
-2,024,490,416,110,576,000
37.608108
91
0.533567
false
raqqun/tweetcommander
packages/requests_oauthlib/core.py
1
2328
# -*- coding: utf-8 -*- from __future__ import unicode_literals from ..oauthlib.common import extract_params from ..oauthlib.oauth1 import (Client, SIGNATURE_HMAC, SIGNATURE_TYPE_AUTH_HEADER) CONTENT_TYPE_FORM_URLENCODED = 'application/x-www-form-urlencoded' CONTENT_TYPE_MULTI_PART = 'multipart/form-data' import sys ...
gpl-3.0
6,963,956,816,960,503,000
37.163934
82
0.629296
false
GBPeters/upair
bot/gatwick.py
1
3495
""" Module for harvesting data from the Gatwick Aviation Society (GAS) aircraft database DO NOT USE """ # Imports import requests from bs4 import BeautifulSoup from db.pghandler import Connection # Constants GAS_URL = "http://www.gatwickaviationsociety.org.uk/modeslookup.asp" GAS_FIELDS = {"Registration": "registrat...
gpl-3.0
6,033,836,778,019,814,000
29.391304
93
0.596567
false
pyfa-org/Pyfa
gui/builtinMarketBrowser/pfSearchBox.py
1
9376
# noinspection PyPackageRequirements import wx import gui.utils.color as colorUtils import gui.utils.draw as drawUtils from gui.utils.helpers_wxPython import HandleCtrlBackspace SearchButton, EVT_SEARCH_BTN = wx.lib.newevent.NewEvent() CancelButton, EVT_CANCEL_BTN = wx.lib.newevent.NewEvent() TextEnter, EVT_TEXT_ENTER...
gpl-3.0
4,457,695,793,184,732,700
30.783051
111
0.575405
false
b4ux1t3/piday2017
runtests.py
1
2166
""" This is just a way to see which method alluded to in the README will produce the best result. Think of it as a test, I guess. """ import randompi import statistics import time print("Starting timer") start_time = time.time() # Basically, I'm going to make a bunch of lists holding a thousand (1000) of values of ...
mit
-6,844,707,654,209,961,000
36.344828
103
0.677747
false
lgarren/spack
var/spack/repos/builtin/packages/r-multtest/package.py
1
1752
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
2,030,379,986,413,075,500
45.105263
126
0.674087
false
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_11_01/aio/operations/_local_network_gateways_operations.py
1
24340
# 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
1,005,753,911,172,090,200
50.350211
209
0.656163
false
ggzzz/python_koans
python2/koans/about_new_style_classes.py
1
2460
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutNewStyleClasses(Koan): class OldStyleClass: "An old style class" # Original class style have been phased out in Python 3. class NewStyleClass(object): "A new style class" # Introduced in Python...
mit
-2,595,478,834,905,206,300
36.846154
88
0.606098
false
ViGLug/django-phpbb-extender
api/views.py
1
2642
#from django.contrib.auth.models import User, Group from rest_framework import filters, generics from .serializers import ( UserSerializer, ForumSerializer, TopicSerializer, PostSerializer, ) class UsersReadView(generics.ListAPIView): serializer_class = UserSerializer model = serializer_class.M...
agpl-3.0
-8,175,664,467,557,067,000
32.443038
65
0.723694
false
dropzonemathmo/SocialMediaLinksRecommend
TwitterScraper/TwitterURLs.py
1
4012
""" TwitterURLs.py is a class that can be used to obtain the URLs of user tweets """ #import all secret keys for twitter access from Secret import * #import TwitterAPI from TwitterAPI import TwitterAPI #Global Printing Variable VERBOSE = False class TwitterURLs(): """ Twitter URLs enables access to the URLs pos...
gpl-2.0
8,145,693,527,491,492,000
25.746667
131
0.667498
false
xapple/plumbing
plumbing/graphs/__init__.py
1
11246
# Built-in modules # import os, time, inspect, getpass from collections import OrderedDict # Internal modules # from plumbing.common import split_thousands, camel_to_snake from plumbing.cache import property_cached # First party modules # from autopaths import Path from autopaths.file_path import FilePath ...
mit
-97,055,972,161,673,570
42.758755
105
0.557265
false
skosukhin/spack
lib/spack/spack/build_systems/autotools.py
1
19191
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
5,285,207,821,815,917,000
40.719565
111
0.566828
false
jpirko/lnst
lnst/Recipes/ENRT/ConfigMixins/DevInterruptHWConfigMixin.py
1
4278
import re from lnst.Common.Parameters import IntParam from lnst.Controller.Recipe import RecipeError from lnst.Controller.RecipeResults import ResultLevel from lnst.Recipes.ENRT.ConfigMixins.BaseHWConfigMixin import BaseHWConfigMixin class DevInterruptHWConfigMixin(BaseHWConfigMixin): """ This class is an ex...
gpl-2.0
7,158,494,199,536,167,000
34.065574
82
0.535297
false
Techbikers/techbikers
server/settings/production.py
1
2047
import os import json import requests from base import * from server.settings.settings_model import Settings # Use the App Engine Requests adapter. This makes sure that Requests uses URLFetch. from requests_toolbelt.adapters import appengine appengine.monkeypatch() DEBUG = False SECURE_PROXY_SSL_HEADER = ('HTTP_X_F...
mit
-1,547,359,825,303,363,800
28.666667
83
0.723498
false
bitxbay/BitXBay
pywa.py
1
8297
#!/usr/bin/env python #-*- coding: utf-8 -*- pywversion="2.1.7" never_update=False # # jackjack's pywallet.py # https://github.com/jackjack-jj/pywallet # forked from Joric's pywallet.py # beta_version = ('a' in pywversion.split('-')[0]) or ('b' in pywversion.split('-')[0]) missing_dep = [] from bsddb.db import *...
gpl-3.0
9,194,209,195,237,866,000
29.284672
103
0.579246
false
extsui/7SegFinger
test_8digit_and_latch.py
1
4734
# -*- coding: utf-8 -*- import spidev import math def reverse_bit_order(x): x_reversed = 0x00 if (x & 0x80): x_reversed |= 0x01 if (x & 0x40): x_reversed |= 0x02 if (x & 0x20): x_reversed |= 0x04 if (x & 0x10): x_reversed |= 0x08 if (x & 0x08): x_reversed |= 0x10 if (x & 0x04): x_...
mit
-5,917,152,520,773,421,000
21.32973
60
0.575996
false
examachine/bitdrill
scripts/merge-itemsets.py
1
2635
#! /usr/bin/python import sys import string import os import copy import transaction import pattern from transaction import decode_items, encode_items if len(sys.argv)!=5: print 'usage: prog <db> <freq itemset1> <freq itemset2> <support>' sys.exit(-1) else: dbname = sys.argv[1] freq1name = sys.argv[2]...
agpl-3.0
-6,056,729,359,778,043,000
23.174312
88
0.604554
false
cheery/textended-edit
compositor/__init__.py
1
3711
# Used to display minitex boxes on screen. from minitex import boxmodel import renderers class Compositor(object): def __init__(self, images, debug=False): self.debug = debug self.images = images self.imglayer = renderers.ImageLayer(images) self.fontlayers = {} def get_fontlaye...
mit
-7,913,254,701,952,263,000
44.256098
123
0.575856
false