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
apple/swift-lldb
packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/TestMixedDwarfBinary.py
1
1626
""" Testing debugging of a binary with "mixed" dwarf (with/without fission). """ import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TestMixedDwarfBinary(TestBase): mydir = TestBase.compute_mydir(__file__) def setUp(self): ...
apache-2.0
8,217,625,530,235,348,000
35.133333
83
0.661132
false
3.621381
true
false
false
sharad/calibre
setup/git_post_checkout_hook.py
1
1032
#!/usr/bin/env python # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>' import os, subprocess, sys prev_rev, current_rev, flags = [x.decode('utf-8')...
gpl-3.0
-5,469,249,687,992,142,000
35.857143
103
0.630814
false
3.307692
false
false
false
Edraak/edx-platform
lms/djangoapps/courseware/courses.py
1
15960
""" Functions for accessing and displaying courses within the courseware. """ from datetime import datetime from collections import defaultdict from fs.errors import ResourceNotFoundError import logging from path import Path as path import pytz from django.http import Http404 from django.conf import settings from edx...
agpl-3.0
-754,830,506,233,932,700
31.177419
114
0.656203
false
4.190076
false
false
false
derickc/Fountainhead
autoscroll.py
1
14453
import sublime import sublime_plugin try: from . import scopes except (ImportError, ValueError): import scopes fountain_scope = scopes.fountain_scope action_scope = scopes.action_scope boneyard_scope = scopes.boneyard_scope dialogue_scope = scopes.dialogue_scope lyrics_scope = scopes.lyrics_scope character_sco...
mit
9,084,637,440,702,332,000
66.537383
187
0.478447
false
4.522215
false
false
false
maciejkula/binge
binge/models.py
1
15339
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.autograd import Variable, Function from binge.layers import ScaledEmbedding, ZeroEmbedding from binge.native import align, get_lib def _gpu(tensor, gpu=False): if gpu: return ...
apache-2.0
-5,505,224,720,463,385,000
29.374257
97
0.519525
false
4.015445
false
false
false
samcheck/Scripts
tal/dlTALv2.py
1
1298
#! python3 # dlTAL.py - Downloads a specific range of "This American Life" eps import requests, os from bs4 import BeautifulSoup # Starting URL url = 'http://www.podtrac.com/pts/redirect.mp3/podcast.thisamericanlife.org/extended/' # 'http://audio.thisamericanlife.org/jomamashouse/ismymamashouse/' # 'http://w...
mit
2,411,798,419,417,730,000
26.844444
86
0.669492
false
2.827887
false
false
false
mhcrnl/PmwTkEx
src/Pmw/Pmw_1_3/demos/ButtonBox.py
1
1495
title = 'Pmw.ButtonBox demonstration' # Import Pmw from this directory tree. import sys sys.path[:0] = ['../../..'] import Tkinter import Pmw class Demo: def __init__(self, parent): # Create and pack the ButtonBox. self.buttonBox = Pmw.ButtonBox(parent, labelpos = 'nw', label_text = 'ButtonBo...
apache-2.0
-2,719,902,525,558,238,700
25.696429
76
0.62408
false
3.421053
false
false
false
sileht/python-gnocchiclient
gnocchiclient/v1/metric_cli.py
1
15046
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
apache-2.0
5,990,330,502,008,039,000
39.229947
79
0.581749
false
4.324806
false
false
false
paulomagalhaes/spark-ec2
spark_ec2.py
1
61643
#!/usr/bin/env python # -*- coding: utf-8 -*- # # 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 Lice...
apache-2.0
-5,231,567,560,959,082,000
39.289542
100
0.578217
false
3.707181
false
false
false
jwparker1797/USAR_Add_In
Install/Data/GP_tools/HQIIS_report.py
1
9879
############################################################## ##HQIIS Updater Version 2.0 ## ##*Changes for v2.0 ## -Upgraded tool to work with SDSFIE 3.1 Army Adaptation ## ##This script takes data from an HQIIS excel file and can run a report from a USAR SDSFIE 3.1 geodatabase. ## ##This script only works on GIS re...
gpl-3.0
8,414,839,463,250,512,000
53.28022
400
0.469582
false
4.330995
false
false
false
metacollin/kicad-3d-models-in-freecad
cadquery/FCAD_script_generator/cq_make_capacitors_export_fc.py
1
8497
# -*- coding: utf8 -*- #!/usr/bin/python # # This is derived from a cadquery script for generating PDIP models in X3D format # # from https://bitbucket.org/hyOzd/freecad-macros # author hyOzd # This is a # Dimensions are from Microchips Packaging Specification document: # DS00000049BY. Body drawing is the same as QFP ...
gpl-2.0
4,737,682,461,076,555,000
36.431718
123
0.60033
false
3.58372
false
false
false
ujdhesa/unisubs
utils/forms/__init__.py
1
4941
import re from django import forms from django.core import validators from django.utils.encoding import force_unicode from django.utils.translation import ugettext_lazy as _ from utils.forms.recapcha import ReCaptchaField from utils.validators import UniSubURLValidator assert ReCaptchaField # Shut up, Pyflakes. cl...
agpl-3.0
-4,802,996,464,406,440,000
37.007692
216
0.619713
false
3.531808
false
false
false
DXCanas/kolibri
kolibri/core/logger/serializers.py
1
6061
from django.db.models import Sum from django.utils.timezone import now from le_utils.constants import exercises from rest_framework import serializers from kolibri.core.auth.models import FacilityUser from kolibri.core.logger.constants.exercise_attempts import MAPPING from kolibri.core.logger.models import AttemptLog ...
mit
3,028,567,171,412,789,000
39.139073
140
0.670516
false
4.128747
false
false
false
AdamWill/anaconda
pyanaconda/storage_utils.py
1
25447
# # Copyright (C) 2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the hope that it will be...
gpl-2.0
-1,749,860,290,309,111,600
40.377236
148
0.614807
false
4.16413
false
false
false
balihoo-gens/blambda
blambda/utils/findfunc.py
1
2897
import os import glob import json import re from subprocess import check_output, CalledProcessError from blambda.utils.base import pGreen, pRed, pBlue, pYellow, spawn import time from pprint import pprint try: import boto3 except ImportError: print("Unable to import boto") def all_json_files(root): retur...
mit
7,985,033,497,449,660,000
34.329268
96
0.626855
false
3.71887
false
false
false
CelineBoudier/rapid-router
game/views/level.py
1
12457
# -*- coding: utf-8 -*- # Code for Life # # Copyright (C) 2016, Ocado Innovation Limited # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your o...
agpl-3.0
8,623,084,045,860,947,000
35.801775
152
0.685184
false
3.928932
false
false
false
zamaudio/calf-LR4
knobs/knob1.py
1
4510
#!/usr/bin/env python import cairo from math import pi, cos, sin WIDTH, HEIGHT = 20, 20 background = "knob1_bg.png" output = "knob1.png" x, y = WIDTH / 2, HEIGHT / 2 lwidth = WIDTH / 10 radius = WIDTH / 2 - lwidth radiusplus = radius + lwidth / 2 radiusminus = radius - lwidth / 2 radiusminus2 = radius - lwidth radius...
lgpl-2.1
1,829,769,222,033,994,200
35.666667
129
0.484479
false
3.301611
false
false
false
google/grr
grr/core/grr_response_core/lib/util/context.py
1
1983
#!/usr/bin/env python """A module with utilities for dealing with context managers.""" from typing import ContextManager from typing import Generic from typing import Sequence from typing import TypeVar _T = TypeVar("_T") class NullContext(ContextManager[_T], Generic[_T]): """A context manager that always yields ...
apache-2.0
707,296,354,064,719,400
32.05
80
0.709027
false
4.157233
false
false
false
srujant/MLNews
searchFunction.py
1
2473
import requests from ml import svm import json import NLProcessor as nlp import lxml.html from requests import get from goose import Goose def getSuggestions(query): url = 'https://api.cognitive.microsoft.com/bing/v5.0/suggestions/?q=' + query headers = {'Ocp-Apim-Subscription-Key':'854e8088bb8347418e6f934b996...
mit
6,087,950,690,244,941,000
25.591398
90
0.601294
false
3.65288
false
false
false
caronc/nzbget-subliminal
Subliminal/apprise/plugins/NotifyTwitter/tweepy/auth.py
1
6706
from __future__ import print_function import six import logging from .error import TweepError from .api import API import requests from requests_oauthlib import OAuth1Session, OAuth1 from requests.auth import AuthBase from six.moves.urllib.parse import parse_qs WARNING_MESSAGE = """Warning! Due to a Twitter API bug,...
gpl-3.0
-4,268,023,677,189,067,000
36.674157
102
0.570385
false
4.354545
false
false
false
damomeen/pox-datapath
pox/openflow/nicira.py
1
70497
# Copyright 2012,2013 James McCauley # # 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,946,252,909,831,182,000
26.441417
79
0.592011
false
3.13543
false
false
false
DOV-Vlaanderen/pydov
tests/test_types_itp_geotechnischecodering.py
1
2223
"""Module grouping tests for the pydov.types.interpretaties.GeotechnischeCodering class.""" from pydov.types.interpretaties import GeotechnischeCodering from pydov.util.dovutil import build_dov_url from tests.abstract import AbstractTestTypes location_wfs_getfeature = \ 'tests/data/types/interpretaties/geotechnisc...
mit
-2,921,369,570,890,383,400
39.418182
72
0.701305
false
2.74106
true
false
false
dls-controls/pymalcolm
malcolm/modules/builtin/parameters.py
1
1706
from typing import Union from annotypes import Anno, add_call_types default_desc = "Default value for parameter. If not specified, parameter is required" with Anno("Specify that this class will take a parameter name"): AName = str with Anno("Description of this parameter"): ADescription = str with Anno(defau...
apache-2.0
-1,394,620,227,895,945,700
30.018182
88
0.698124
false
3.539419
false
false
false
mmlacak/crochess
book/py/scene_mayan_ascendancy.py
1
25347
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2018 - 2020 Mario Mlačak, mmlacak@gmail.com # Licensed under 3-clause (modified) BSD license. See LICENSE for details. from util import in_range import gen_steps as GS from piece import PieceType from board import BoardType, Board from mark import MarkT...
bsd-3-clause
3,875,221,039,199,557,600
39.61859
111
0.605855
false
3.020257
false
false
false
commial/miasm
miasm/ir/translators/z3_ir.py
1
10224
from builtins import map from builtins import range import imp import logging # Raise an ImportError if z3 is not available WITHOUT actually importing it imp.find_module("z3") from miasm.ir.translators.translator import Translator log = logging.getLogger("translator_z3") console_handler = logging.StreamHandler() con...
gpl-2.0
-3,190,478,345,284,547,600
35.384342
81
0.51252
false
3.781065
false
false
false
NRGI/nrgi-visualizations
blog-volitility-dm/data/transform.py
1
3179
#!/usr/bin/python """ Converts eiti csv to json """ import json import csv # import sys # import pycountry def main(): """ main function """ with open('./source_data.csv', 'rU') as infile: csv_reader = csv.reader(infile, delimiter=',', quotechar='"') header = next(csv_reader) # lkey = ...
mit
1,499,990,195,249,953,300
41.959459
108
0.439761
false
4.171916
false
false
false
douglask3/allocationModules
runGday/EucFace/scripts/translate_GDAY_output_to_EUCFACE_format.py
1
15762
#!/usr/bin/env python # coding: utf-8 """ Translate GDAY output file Match the NCEAS format and while we are at it carry out unit conversion so that we matched required standard. Data should be comma-delimited """ import shutil import os import numpy as np import csv import sys import matplotlib.pyplot as plt import...
gpl-2.0
-7,590,501,808,791,468,000
42.186301
93
0.532483
false
2.646851
false
false
false
eHealthAfrica/LMIS
LMIS/cce/models.py
1
3454
""" This module handles all cold chain equipment management issues such as temperature log, problem log, current facility the CCE is at and the warehouse. """ #import django modules from django.db import models #import external modules import reversion from mptt.models import MPTTModel, TreeForeignKey from mo...
gpl-2.0
-2,208,780,214,593,822,000
39.647059
120
0.720324
false
4.016279
false
false
false
savi-dev/nova
nova/virt/libvirt/driver.py
1
124648
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # Copyright (c) 2011 Piston Cloud Computing, Inc # Copyright (c) 2012 Univer...
apache-2.0
681,890,633,713,154,700
39.935304
79
0.542921
false
4.442512
true
false
false
zjj/trac_hack
sample-plugins/workflow/StatusFixer.py
1
2533
from genshi.builder import tag from trac.core import Component, implements from trac.ticket.api import ITicketActionController, TicketSystem from trac.perm import IPermissionRequestor revision = "$Rev: 6326 $" url = "$URL: https://svn.edgewall.org/repos/trac/tags/trac-0.12.2/sample-plugins/workflow/StatusFixer.py $" ...
bsd-3-clause
-8,738,372,976,217,055,000
37.969231
107
0.669562
false
4.046326
false
false
false
triump0870/Interactive_Programming_Python
Stopwatch/user23_3ZEr6XFSuHrqRSj.py
1
1935
# Stopwatch: The Game # Rohan Roy - 29th Oct 2013 # http://www.codeskulptor.org/#user23_3ZEr6XFSuHrqRSj.py import simplegui # define global variables interval = 100 tens_sec = 0 message = "0:00.0" score = 0 Is_timer = False attempt = 0 # define helper function format that converts integer in A:BC.D f...
apache-2.0
6,260,141,441,062,355,000
21.035714
72
0.622222
false
3.219634
false
false
false
rohitwaghchaure/New_Theme_Erp
erpnext/accounts/page/report_template/report_template.py
1
1480
from __future__ import unicode_literals import frappe from frappe.utils.file_manager import save_file import os, base64, re import random import json @frappe.whitelist() def add_node(): ctype = frappe.form_dict.get('ctype') parent_field = 'parent_' + ctype.lower().replace(' ', '_') name_field = ctype.lower().replac...
agpl-3.0
3,505,221,346,935,491,000
29.204082
103
0.717568
false
3.096234
false
false
false
zstackio/zstack-woodpecker
zstackwoodpecker/zstackwoodpecker/zstack_test/zstack_test_image.py
1
5502
''' zstack image test class @author: Youyk ''' import apibinding.inventory as inventory import zstackwoodpecker.header.header as zstack_header import zstackwoodpecker.header.image as image_header import zstackwoodpecker.operations.image_operations as img_ops import zstackwoodpecker.operations.volume_operations as vol...
apache-2.0
-3,450,384,789,116,033,000
39.455882
105
0.660851
false
3.682731
true
false
false
jrabbit/ubotu-fr
src/drivers/__init__.py
1
8608
### # Copyright (c) 2002-2004, Jeremiah Fincher # Copyright (c) 2008-2009, James Vega # 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 c...
bsd-3-clause
7,512,690,381,171,431,000
35.320675
79
0.614893
false
4.08543
false
false
false
gytdau/advent
Day14/part1.py
1
1383
# I wanted to try making some classes as practice. RUNNING = True RESTING = False class Reindeer: def __init__(self, line): """ :param line: Parses line into the class. """ line = line.split() self.speed = int(line[3]) self.running_time = int(line[6]) self...
mit
-5,069,955,758,993,496,000
26.117647
75
0.529284
false
4.091716
false
false
false
rwl/PyCIM
CIM14/CPSM/Equipment/Generation/Production/NuclearGeneratingUnit.py
1
1571
# Copyright (C) 2010-2011 Richard Lincoln # # 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, merge, publish...
mit
8,462,518,251,095,309,000
39.282051
84
0.728199
false
4.189333
false
false
false
remontees/EliteHebergPanel
users/views.py
1
1594
#-*- coding: utf-8 -*- from django.utils.translation import ugettext as _ from users.forms import ConnexionForm from django.shortcuts import render from django.contrib import messages from django.contrib.auth import authenticate, login, logout from django.core.urlresolvers import reverse from auth_remember import remem...
lgpl-3.0
-3,155,211,552,788,402,700
33.543478
80
0.618628
false
4.294595
false
false
false
adewinter/rmac
rmac/test.py
1
3069
#!/Users/adewinter/venv/rmac/bin/python from kivy.app import App from kivy.uix.button import Button from kivy.uix.label import Label from kivy.uix.textinput import TextInput from kivy.uix.gridlayout import GridLayout from kivy.uix.scrollview import ScrollView from send import send_message as send from pony.orm import *...
gpl-2.0
4,017,797,271,676,093,400
37.375
127
0.730857
false
2.988315
false
false
false
SalesforceFoundation/mrbelvedereci
metaci/api/serializers/build.py
1
3283
from rest_framework import serializers from metaci.api.serializers.cumulusci import OrgSerializer from metaci.api.serializers.cumulusci import ScratchOrgInstanceSerializer from metaci.api.serializers.repository import BranchSerializer from metaci.api.serializers.repository import RepositorySerializer from metaci.api.se...
bsd-3-clause
6,905,202,254,614,154,000
28.576577
73
0.600366
false
4.280313
false
false
false
mankyd/htmlmin
htmlmin/python3html/__init__.py
1
4954
""" General functions for HTML manipulation. """ import re as _re try: from html.entities import html5 as _html5 unichr = chr except ImportError: import htmlentitydefs _html5 = {'apos;':u"'"} for k, v in htmlentitydefs.name2codepoint.iteritems(): _html5[k + ';'] = unichr(v) __all__ = ['es...
bsd-3-clause
-4,213,459,045,329,287,700
34.640288
78
0.589019
false
2.6563
false
false
false
libor-m/scrimer
doc/conf.py
1
8496
# -*- coding: utf-8 -*- # # Scrimer documentation build configuration file, created by # sphinx-quickstart on Tue Jan 22 11:27:51 2013. # # 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...
agpl-3.0
-3,816,321,023,878,440,400
30.820225
80
0.689854
false
3.731225
true
false
false
cloudify-cosmo/cloudify-gcp-plugin
cloudify_gcp/constants.py
1
3961
######## # Copyright (c) 2014-2020 Cloudify Platform Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
apache-2.0
3,198,461,670,841,396,000
33.146552
78
0.690987
false
3.058687
false
false
false
jaytaylor/django-pg-current-timestamp
django_pg_current_timestamp/__init__.py
1
3439
# -*- coding: utf-8 -*- """Adds django compatibility with / capability to use `CURRENT_TIMESTAMP` on DateTimeField objects.""" import logging from psycopg2.extensions import ISQLQuote __version__ = '0.2.4' __author__ = 'Jay Taylor [@jtaylor]' logger = logging.getLogger(__name__) _current_timestamp_sql = 'CURRE...
bsd-3-clause
-4,983,507,088,101,478,000
38.988372
162
0.63565
false
4.041128
false
false
false
ekarulf/pyactiveresource
src/tests/connection_test.py
1
7742
#!/usr/bin/env python # Copyright 2008 Google Inc. All Rights Reserved. '''Tests for connection objects.''' __author__ = 'Mark Roach (mrroach@google.com)' import unittest import urllib2 from StringIO import StringIO from pyactiveresource import connection from pyactiveresource import util from pyactiveresource.test...
mit
-5,389,994,014,899,453,000
37.71
91
0.629424
false
3.810039
true
false
false
LinuxChristian/pyTopoTools
pyTopoTools.py
1
23401
# Python package to perform quick analysis on topographic data # Copyright (C) 2015 Christian Braedstrup # This file is part of pyTopoTools. # # pyTopoTools is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License v2 as published by # the Free Software Foundation. #...
gpl-2.0
-5,911,803,817,516,443,000
27.748157
108
0.575787
false
2.76281
false
false
false
frederick623/pb
report_per_client/pb_report_distro.py
1
6670
import os import sys import re import xlrd import csv import glob import shutil import comtypes.client PATH_DICT = { "pb_dir": "\\\\p7fs0003\\nd\\3033-Horizon-FA-Share\\PB_DeltaOne", "cln_filename": "\\\\p7fs0003\\nd\\3033-Horizon-FA-Share\\PB_DeltaOne\\Daily_Data\\ClientDetails_????????.xlsx", "distro_dir": "...
apache-2.0
-3,772,540,698,761,566,000
33.035714
126
0.651274
false
2.573302
false
false
false
sdelaughter/SmartHome
v0.3/resources/door.py
1
4268
# Samuel DeLaughter # 5/8/15 from SimpleXMLRPCServer import SimpleXMLRPCServer from threading import Thread import xmlrpclib import logging import socket import random import time import iot class door(iot.device): #The class defining the door sensor object #Can be set to open (1) or closed (0), or queried for its ...
gpl-2.0
8,859,138,296,888,232,000
30.622222
124
0.692596
false
3.12674
false
false
false
ictground/Chainforger
core/checker.py
1
2415
import re, requests, sys from .gui import * class Checker: def __init__(self, timeout = 10, exportFileName = None): self.timeout = timeout self.exportFileName = exportFileName self.filter = [] def showStatus(self): if self.timeout != None: showInfo("Proxy timeout: " + str(self.timeout) + "s") if self.e...
gpl-3.0
-3,740,616,617,319,418,400
25.833333
82
0.61118
false
3.045397
false
false
false
jalandra/cool_scripts
harness.py
1
5015
import subprocess import sys import os import win32com.client import time outlook = None nameAliasDict = {} contacts = None numEntries = None file = None mail_schema = "http://schemas.microsoft.com/mapi/proptag/0x800F101F" alias_schema = "http://schemas.microsoft.com/mapi/proptag/0x3A00001F" criticalCommit = False svn...
gpl-3.0
-7,528,241,245,435,543,000
33.115646
143
0.642273
false
3.620939
false
false
false
pupil-labs/hmd-eyes
python_reference_client/hmd_calibration_client.py
1
3455
""" HMD calibration client example. This script shows how to talk to Pupil Capture or Pupil Service and run a gaze mapper calibration. """ import zmq, msgpack, time ctx = zmq.Context() # create a zmq REQ socket to talk to Pupil Service/Capture req = ctx.socket(zmq.REQ) req.connect("tcp://127.0.0.1:50020") # conven...
lgpl-3.0
921,651,937,440,219,000
29.575221
95
0.655861
false
2.963122
false
false
false
default-to-open/rpmdeplint
acceptance_tests/test_check.py
1
10891
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. import os import glob import time import shutil import rpmfluff from d...
gpl-2.0
-6,491,165,283,014,915,000
39.040441
101
0.663208
false
3.178926
true
false
false
SublimeText/PackageDev
plugins/command_completions/__init__.py
1
9912
from collections import OrderedDict import logging import json import re import itertools import sublime import sublime_plugin from ..lib import inhibit_word_completions from .commandinfo import ( get_command_name, get_builtin_command_meta_data, get_builtin_commands, iter_python_command_classes, g...
mit
-3,680,533,947,201,142,300
33.657343
94
0.595036
false
3.774562
false
false
false
xymus/pycaptain
src/common/comms.py
1
19189
from orders import * from gfxs import * import ids local_version = "v0.6.0" # major version revision = "$Revision: 107 $" # updated by subversion revisionSplitted = revision.split() if len(revisionSplitted) > 2: local_version = "%sr%s" % ( local_version, revisionSplitted[1] ) else: local_version ...
gpl-2.0
-5,088,383,613,936,897,000
38.397895
360
0.530043
false
2.965384
false
false
false
ebasso/rest-client-examples
ibm-connections/ListBlogPosts.py
1
4246
# -*- coding: utf-8 -*- # # Antes de executar: # # > pip install requests # # import sys import requests from requests.packages.urllib3.exceptions import InsecureRequestWarning from requests.auth import HTTPBasicAuth import xml.etree.ElementTree as ET CONNECTIONS_HOST = 'https://connections.<company>.com' CONNECTIONS_...
mit
-1,592,454,718,963,992,800
31.661538
163
0.595384
false
3.435275
false
false
false
andrewnsk/simple-weather
sweather/collect_weather.py
1
1945
import json import pyowm from . import azimuth # openweathermap API key # please use you own api key! API_KEY = '3ede2418f1124401efcd68e5ae3bddcb' town = 'Norilsk' area = 'ru' owm = pyowm.OWM(API_KEY) observation = owm.weather_at_place('{0},{1}'.format(town, area)) w = observation.get_weather() # print(w) class G...
gpl-3.0
6,671,246,398,581,805,000
25.273973
96
0.65537
false
2.950769
false
false
false
Mesitis/community
sample-code/Python/13 Portfolio/get_portfolio_allocations.py
1
3181
''' - login and get token - process 2FA if 2FA is setup for this account - if the user is a regular customer then get a list of transactions for this user - if the user is a partner_admin then get a list of transactions for the first user from the list of users this partner admin has access to ''' import requests impo...
mit
-6,791,151,513,681,004,000
34.344444
140
0.711412
false
3.313542
false
false
false
makielab/django-oscar
oscar/apps/dashboard/promotions/views.py
1
11239
import itertools from django.views import generic from django.contrib.contenttypes.models import ContentType from django.utils.translation import ugettext_lazy as _ from django.core.urlresolvers import reverse from django.conf import settings from django.contrib import messages from django.http import HttpResponseRedi...
bsd-3-clause
-8,248,384,469,763,867,000
33.47546
136
0.631551
false
4.139595
false
false
false
zeth/scripts
files.py
1
2192
#!/usr/bin/env python """Really lazy webpage - list of files in a directory.""" ##################################################################### # Configuration variables # # Path to where files are stored. FILEPATH = './' # # Path to where files are publically available. URLHIERARCHY = './' # # Page Title TITLE...
apache-2.0
-955,491,426,895,079,700
25.409639
75
0.553832
false
3.541195
false
false
false
jteehan/cfme_tests
cfme/tests/infrastructure/test_providers.py
1
15573
# -*- coding: utf-8 -*- import uuid import fauxfactory import pytest from utils import error from cfme.base.credential import Credential from cfme.common.provider_views import (InfraProviderAddView, InfraProvidersView, InfraProvidersDisc...
gpl-2.0
-2,294,399,882,987,095,300
36.707022
99
0.66474
false
4.035501
true
false
false
pyandi/Toolbox
send_mail.py
1
2398
#!/usr/bin/env python2 # encoding: utf-8 """Send Mail. Usage: ./send_mail.py -t <M_TO> [--cc <M_CC>] [--bcc <M_BCC>] [-s <SUBJECT>] [-m <MESSAGE>] [-a <ATTACHMENTS>] ./send_mail.py -c | --config ./send_mail.py -h | --help ./send_mail.py --version Options: -c --config Config ...
mit
8,419,235,846,333,373,000
31.849315
107
0.524187
false
3.531664
false
false
false
google/OctoPrint-HeaterTimeout
setup.py
1
1988
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
-9,215,495,089,896,338,000
31.590164
90
0.775151
false
3.556351
false
false
false
ARISE-Initiative/robosuite
tests/test_environments/test_action_playback.py
1
1896
""" Test script for recording a sequence of random actions and playing them back """ import os import h5py import argparse import random import numpy as np import json import robosuite from robosuite.controllers import load_controller_config def test_playback(): # set seeds random.seed(0) np.random.seed(...
mit
6,415,794,409,736,424,000
24.621622
102
0.643987
false
3.422383
false
false
false
nismod/energy_demand
energy_demand/wrapper_model.py
1
15386
"""All necessary calculations in pre_simulate() """ import os import logging from energy_demand.read_write import data_loader from energy_demand.basic import basic_functions from energy_demand.scripts import init_scripts from energy_demand.read_write import write_data from energy_demand.assumptions import general_assu...
mit
147,847,713,708,952,770
38.860104
241
0.559145
false
4.067142
true
false
false
mamontov-cpp/dukpp-03
duktape/tools/extract_caseconv.py
6
25764
#!/usr/bin/env python2 # # Extract rules for Unicode case conversion, specifically the behavior # required by ECMAScript E5 in Sections 15.5.4.16 to 15.5.4.19. The # bitstream encoded rules are used for the slow path at run time, so # compactness is favored over speed. # # There is no support for context or local...
mit
6,939,381,313,722,262,000
34.148704
167
0.572582
false
3.528832
false
false
false
bloem-project/bloem-server
files/serializers.py
1
1692
"""Bloem's Files application model serializers. This file contains the various serializers used by the Files application's API. It defines how the data is presented for each model viewed through the API. """ from django_celery_results.models import TaskResult from rest_framework import serializers from files.models i...
gpl-3.0
-5,787,603,825,081,167,000
25.030769
104
0.683215
false
4.560647
false
false
false
strk/QGIS
python/plugins/processing/gui/AlgorithmExecutor.py
1
15842
# -*- coding: utf-8 -*- """ *************************************************************************** AlgorithmExecutor.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *********************...
gpl-2.0
6,528,731,308,621,374,000
42.878116
150
0.61654
false
4.833689
false
false
false
doraemonext/wechat-platform
wechat_platform/system/rule_match/models.py
1
2385
# -*- coding: utf-8 -*- import logging from django.db import models from system.official_account.models import OfficialAccount from system.rule.models import Rule logger_rule_match = logging.getLogger(__name__) class RuleMatchManager(models.Manager): """ 微信规则回复表 Manager """ def add(self, rule, plu...
bsd-2-clause
1,502,957,737,470,831,000
25.481481
90
0.592075
false
2.950481
false
false
false
unrealcv/unrealcv
docs/build_doc.py
1
2389
import argparse, subprocess, platform, os, shutil, webbrowser def clean(): files = [] folders = ['_build', 'doxygen/html', 'doxygen/latex', 'doxygen/xml'] for f in files: if os.path.isfile(f): os.remove(f) for f in folders: if os.path.isdir(f): shutil.rmtree(f) ...
mit
1,137,941,226,037,286,000
26.45977
107
0.590205
false
3.597892
false
false
false
roidelapluie/Lexpage
app/blog/migrations/0001_initial.py
1
2391
from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='BlogPost', fields=[ ...
gpl-3.0
4,747,349,197,327,999,000
61.921053
189
0.596821
false
3.777251
false
false
false
refugeehackathon/interpreteer-backend
bill_board/models.py
1
3273
# -*- coding: utf-8 -*- from django.conf import settings from django.db import models # Create your models here. from user_management.models import Language, Location DIRECTION_CHOICES = ( (0, "required to known"), (1, "known to required"), (2, "both"), ) TYPE_CHOICES = ( (0, "visit authorities"),...
gpl-2.0
837,201,081,823,674,600
38.914634
108
0.643141
false
3.877962
false
false
false
Phoenyx/TruemaxScriptPackage
Truemax/moduleRig.py
1
2707
from Truemax.moduleScene import get_author_initials __author__ = 'sofiaelm' import manager import maya.cmds as cmds from pymel.all import mel if get_author_initials() == 'mj': bg_colour = [0.9, 0.4, 1] else: bg_colour = [0.4, 0.4, 0.4] class ModuleRig(manager.Module): def create_ui(self): tab = ...
gpl-2.0
5,974,088,988,912,934,000
52.098039
120
0.671592
false
3.529335
false
false
false
qnu/paramark
modules/verbose.py
1
1471
############################################################################# # ParaMark: A Parallel/Distributed File Systems Benchmark # Copyright (C) 2009,2010 Nan Dun <dunnan@yl.is.s.u-tokyo.ac.jp> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publi...
gpl-3.0
-6,130,123,023,139,589,000
29.020408
77
0.614548
false
3.605392
false
false
false
visionegg/visionegg
demo/demo_arrow.py
1
1662
#!/usr/bin/env python """Demo for the arrow stimulus.""" # Author(s): Hubertus Becker <hubertus.becker@uni-tuebingen.de> # Copyright: (C) 2004-2005 by Hertie Institute for Clinical Brain Research, # Department of Cognitive Neurology, University of Tuebingen # URL: http://www.hubertus-becker.de/resourc...
lgpl-2.1
4,718,557,124,976,209,000
29.777778
75
0.501805
false
3.613043
false
false
false
ulif/megrok.paypal
src/megrok/paypal/testing.py
1
5738
# Support for testing. import os import ssl import threading from contextlib import contextmanager try: # Python 3.x from socketserver import TCPServer except ImportError: # Python 2.x from SocketServer import TCPServer try: # Python 3.x from http.server...
gpl-3.0
-1,955,111,201,147,588,900
30.527473
73
0.63733
false
3.976438
true
false
false
kata198/indexedredis
IndexedRedis/fields/null.py
1
2355
# Copyright (c) 2014, 2015, 2016, 2017 Timothy Savannah under LGPL version 2.1. See LICENSE for more information. # # null - The irNull singleton and IRNullType # # vim:set ts=8 shiftwidth=8 softtabstop=8 noexpandtab : import sys __all__ = ('IR_NULL_STR', 'IR_NULL_BYTES', 'IR_NULL_UNICODE', 'IR_NULL_STRINGS', 'IRNul...
lgpl-2.1
4,987,169,843,479,663,000
26.383721
123
0.692144
false
3.086501
false
false
false
LTD-Beget/sprutio-rpc
lib/FileManager/workers/sftp/copyFromSftp.py
1
3921
import threading import time import traceback from lib.FileManager.FM import REQUEST_DELAY from lib.FileManager.workers.baseWorkerCustomer import BaseWorkerCustomer from lib.FileManager.workers.progress_helper import update_progress class CopyFromSftp(BaseWorkerCustomer): def __init__(self, source, target, paths...
gpl-3.0
-6,693,512,246,093,258,000
35.847619
111
0.53528
false
4.155747
false
false
false
20tab/twentytab-immortalmodel
immortalmodel/models.py
1
1067
from django.db import models from django.utils.translation import ugettext_lazy as _ class ImmortalQuerySet(models.query.QuerySet): """ Represents a lazy database lookup for a set of objects. It updates "deleted" attribute instead deleting items. """ def delete(self): self.update(deleted=T...
mit
399,172,241,948,796,740
25.7
81
0.668229
false
4.217391
false
false
false
rodrigolucianocosta/projeto101
projetoMaster/projetoMaster/settings.py
1
3343
""" Django settings for projetoMaster project. Generated by 'django-admin startproject' using Django 1.9.6. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import...
mit
-3,210,654,334,872,359,400
25.117188
91
0.683817
false
3.432238
false
false
false
CarnegieHall/metadata-matching
idMatching_photos.py
1
3758
# !/usr/local/bin/python3.4.2 # ----Copyright (c) 2016 Carnegie Hall | The MIT License (MIT)---- # ----For the full license terms, please visit https://github.com/CarnegieHall/quality-control/blob/master/LICENSE---- # run script with 3 or more arguments: # argument 0 is the script name # argument 1 is the path to the m...
mit
6,764,584,635,704,153,000
39.847826
304
0.674561
false
3.206485
false
false
false
Swappsco/koalixerp
config/settings/common.py
1
13941
from __future__ import absolute_import, unicode_literals import environ import os # Commented to be implemented later. ROOT_DIR = environ.Path(__file__) - 3 # (/a/b/myfile.py - 3 = /) APPS_DIR = ROOT_DIR.path('crm_core') # Loading environment variables, and including the file for local environment # definition env =...
bsd-3-clause
3,655,339,837,727,062,000
34.204545
79
0.708916
false
3.603257
false
false
false
Jacobious52/PythonLab
RAT4/rat.py
1
6244
#!/usr/bin/python import sys import json from client import client from colors import colors from mpos_osx import get_mouse_pos, Point from time import sleep from clone import clone_from PORT = 8888 variables = {'@win': 'C:\\Windows', '@sys': 'C:\\Windows\\system32', '@yas': '10.71.36', ...
gpl-2.0
-3,160,719,837,366,470,000
23.880478
95
0.522582
false
3.387954
false
false
false
plum-umd/java-sketch
jskparser/ast/body/constructordeclaration.py
1
3085
#!/usr/bin/env python from .bodydeclaration import BodyDeclaration from ..type.classorinterfacetype import ClassOrInterfaceType from ..typeparameter import TypeParameter from . import _import class ConstructorDeclaration(BodyDeclaration): def __init__(self, kwargs={}): super(ConstructorDeclaration, self...
mit
-6,625,562,853,645,451,000
31.819149
100
0.600972
false
3.794588
false
false
false
modcracker/Tork
sample_site/application/libraries/gmail.py
1
1333
#!/usr/bin/python import smtplib from email.MIMEMultipart import MIMEMultipart from email.MIMEBase import MIMEBase from email.MIMEText import MIMEText from email import Encoders class GMail(object): """Compose and Send via GMail""" def __init__(self, email_address, password): super(GMail, self).__init__() ...
mit
8,116,276,244,964,903,000
28
88
0.658665
false
3.480418
false
false
false
mikel-egana-aranguren/SADI-Galaxy-Docker
galaxy-dist/scripts/data_libraries/build_whoosh_index.py
1
3417
#!/usr/bin/env python """ Build index for full-text whoosh search of files in data libraries. Requires configuration settings in galaxy.ini. See the whoosh settings in the data library search section for more details. Run from the ~/scripts/data_libraries directory: %sh build_whoosh_index.sh """ import sys, os, csv, ...
gpl-3.0
4,206,017,612,504,232,400
36.966667
114
0.637694
false
3.574268
true
false
false
zmedico/gentoolkit
pym/gentoolkit/eclean/clean.py
1
4600
#!/usr/bin/python # Copyright 2003-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from __future__ import print_function import os import sys import gentoolkit.pprinter as pp from gentoolkit.eclean.pkgindex import PkgIndex class CleanUp(object): """Performs all cleanin...
gpl-2.0
-4,879,040,662,179,326,000
28.487179
74
0.675217
false
3.338171
false
false
false
msdogan/pyvin
calvin/postprocessor.py
1
7421
import os import datetime import json import csv import pandas as pd BASE_DIR = os.path.dirname(os.path.abspath(__file__)) def save_dict_as_csv(data, filename, mode='w'): """ Given nested dict `data`, write to CSV file where rows are timesteps and columns are links/nodes as appropriate. :param data: (dict...
mit
8,271,564,258,621,782,000
32.885845
98
0.607735
false
3.122003
false
false
false
maaruiz/Nominas2015ES
Funciones/Datos/trabajador_dat.py
1
3277
#!/usr/bin/python # -*- coding: utf-8 -*- #### Modulo empresa # modulos python #import MySQLdb #import time import datetime #import os #import sys #import locale #from reportlab.lib.pagesizes import A4 #from reportlab.lib.units import mm #from reportlab.pdfgen import canvas from Funciones.funs import select_sql, sql_...
gpl-3.0
-8,253,413,698,129,364,000
37.541176
127
0.577839
false
3.04461
false
false
false
hfp/libxsmm
samples/deeplearning/sparse_training/fairseq/fairseq/criterions/label_smoothed_cross_entropy_with_alignment.py
1
4393
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import math from fairseq import metrics, utils from fairseq.criterions import register_criterion from .label_smoothed_cross_entropy import L...
bsd-3-clause
8,688,046,478,195,480,000
44.28866
114
0.65058
false
3.843395
false
false
false
css-lucas/GAT
gat/service/SVO_SENT_MODULE_spacy.py
1
7156
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Aug 21 22:28:48 2017 @author: ruobingwang """ import spacy import pandas as pd from nltk import data from nltk.sentiment.vader import SentimentIntensityAnalyzer from dateparser import parse import time from gat.service import file_io from gat.dao impor...
mit
3,218,371,491,115,178,000
32.12963
168
0.561906
false
3.971143
false
false
false
MKaptein/streamingbandit
app/handlers/basehandler.py
1
3104
# -* coding: utf-8 -*- import tornado.web import json import traceback import numpy as np import random import contextlib from db.database import Database from numpy.random.mtrand import _rand as global_randstate global numpy class ExceptionHandler(tornado.web.HTTPError): pass class BaseHandler(tornado.web.Req...
mit
6,597,519,030,479,982,000
30.04
132
0.580541
false
4.078844
false
false
false
radical-cybertools/radical.repex
old/examples/exchangeMethods/TempEx.py
1
2572
#!/usr/bin/env python import os import sys import math import numpy as np import random ####------------ Replicas = int(sys.argv[1]) Cycle = int(sys.argv[2]) def TemperatureExchange(Replicas): exchangeList = range(Replicas) #random.shuffle(exchangeList) #####Read the mdinfo files###### Temp = 0.0 ...
mit
1,199,691,320,433,286,400
28.906977
116
0.533826
false
3.782353
false
false
false
egabancho/invenio
invenio/modules/groups/forms.py
1
2502
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2014 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) a...
gpl-2.0
-1,702,434,448,746,489,900
27.431818
75
0.648281
false
4.255102
false
false
false
dnuffer/Lasagne
lasagne/init.py
1
10166
""" Functions to create initializers for parameter variables. Usage ------- >>> from lasagne.layers import DenseLayer >>> from lasagne.init import Constant, Glorot >>> l1 = DenseLayer((100,20), num_units=50, W=GlorotUniform(), b=Constant(0.0)) """ import numpy as np from .utils import floatX class Initializer(obje...
mit
1,529,220,239,760,755,500
28.552326
79
0.593154
false
3.947961
false
false
false
epage/nqaap
src/Player.py
1
5296
import os import threading import time import logging import constants import hildonize import Audiobook import FileStorage _moduleLogger = logging.getLogger(__name__) class Player(object): def __init__(self, ui): self.storage = FileStorage.FileStorage(path = constants._data_path_) if hildonize.IS_HILDON_SUP...
lgpl-2.1
-381,973,581,384,988,300
26.158974
84
0.70506
false
3.024557
false
false
false
ritz078/ultron
2Dto3D/index.py
1
3053
import numpy as np import cv import cv2 import argparse import os # from matplotlib import pyplot as plt from PIL import Image from operator import itemgetter from scipy.spatial import KDTree """ """ def cliArguments(): ap = argparse.ArgumentParser() ap.add_argument("--images") return vars(ap.parse_args()) def...
mit
-3,662,942,389,919,528,400
21.783582
92
0.68228
false
2.476075
false
false
false
cdeil/gammalib
inst/cta/test/test_response_table.py
1
2202
#! /usr/bin/env python from gammalib import * from math import * import os import sys # ======================= # # Test CTA response table # # ======================= # def cta_response_table(index=1): """ """ # Import modules for plotting import numpy as np import matplotlib.pyplot as plt i...
gpl-3.0
-7,650,758,513,148,054,000
23.197802
74
0.519528
false
3.321267
false
false
false
lmr/avocado-vt
virttest/xml_utils.py
1
16683
""" Utility module standardized on ElementTree 2.6 to minimize dependencies in python 2.4 systems. Often operations on XML files suggest making a backup copy first is a prudent measure. However, it's easy to loose track of these temporary files and they can quickly leave a mess behind. The TempXM...
gpl-2.0
-8,081,000,683,558,519,000
31.331395
80
0.597734
false
4.506483
false
false
false
ValvePython/steam
steam/client/cdn.py
1
33525
""" The :class:`.CDNClient` class provides a simple API for downloading Steam content from SteamPipe Initializing :class:`.CDNClient` requires a logged in :class:`.SteamClient` instance .. code:: python mysteam = SteamClient() ... mycdn = CDNClient(mysteam) Getting depot manifests for an app .. code::...
mit
4,275,188,747,187,343,000
38.441176
167
0.590306
false
3.640065
false
false
false
chandrikas/sm
drivers/vhdutil.py
1
13012
#!/usr/bin/python # # Copyright (C) Citrix Systems Inc. # # This program 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; version 2.1 only. # # This program is distributed in the hope that it will be u...
lgpl-2.1
-5,137,555,964,497,418,000
31.287841
86
0.596757
false
3.244888
false
false
false
endlessm/chromium-browser
third_party/catapult/dashboard/dashboard/pinpoint/models/compare/thresholds.py
1
16674
# Copyright 2018 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. """Thresholds used for hypothesis testing. The "low threshold" is the traditional significance threshold. If the p-value is below the "low threshold", we sa...
bsd-3-clause
3,045,767,427,298,969,000
53.490196
80
0.558414
false
2.1
false
false
false