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
cupy/cupy
tests/cupy_tests/cuda_tests/test_curand.py
1
1463
import pickle import unittest import numpy import cupy from cupy.cuda import curand class TestGenerateNormal(unittest.TestCase): def setUp(self): self.generator = curand.createGenerator( curand.CURAND_RNG_PSEUDO_DEFAULT) def test_invalid_argument_normal_float(self): out = cupy....
mit
4,410,783,978,169,657,300
30.12766
58
0.632946
false
3.516827
true
false
false
rueckstiess/dopamine
scripts/cart_vq_q.py
1
1393
from dopamine.environments import TestEnvironment from dopamine.environments import DiscreteCartPoleEnvironment, CartPoleRenderer from dopamine.agents import QAgent, SARSAAgent from dopamine.experiments import Experiment from dopamine.adapters import EpsilonGreedyExplorer, VQStateDiscretizationAdapter from matplotlib...
gpl-3.0
1,626,324,267,915,831,600
26.86
123
0.78392
false
3.324582
false
false
false
monokal/GAZE
gaze/gazelib/core/helpers.py
1
2513
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ GAZE Turnkey Open Media Center __ .-. .-"` .`'. /\\| _(\-/)_" , . ,\ /\\\/ =o O= {(=o^O=)} . ./, |/\\\/ `-.(Y).-` , | , |\.-` /~/,_/~~~\,__.-` =O o= ////~ // ~...
gpl-3.0
1,599,313,557,488,343,800
25.13253
79
0.347165
false
2.915323
false
false
false
explorentis/Survillage
modules/events.py
1
1415
__author__ = 'explorentis' from random import choice, randint from village import Village from dice import incremental_count from global_vars import maxValueOfParameters from translate import t def attack_weak(village): army_count = 0 print t['weak_enemy.attack.village'] for habitant in village.Habitants: ...
gpl-2.0
752,708,133,291,136,500
28.479167
106
0.662898
false
3.144444
false
false
false
DeflatedPickle/pkinter
pkinter/filenavigator.py
1
4334
#!/usr/bin/env python # -*- coding: utf-8 -*- """""" import tkinter as tk from tkinter import ttk import os # link __title__ = "FileNavigator" __version__ = "1.4.0" __author__ = "DeflatedPickle" class FileNavigator(ttk.Frame): """ -----DESCRIPTION----- A Treeview that shows all contents of a di...
mit
-5,664,249,367,014,560,000
33.672
122
0.51269
false
4.115859
false
false
false
ArtProcessors/django-tenant-schemas
tenant_schemas/template_loaders.py
1
6064
""" Adaptations of the cached and filesystem template loader working in a multi-tenant setting """ import hashlib from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db import connection from django.template import TemplateDoesNotExist from django.template.base import ...
mit
6,909,379,257,175,753,000
39.697987
117
0.612137
false
4.74863
false
false
false
andrewyoung1991/supriya
supriya/tools/ugentools/ToggleFF.py
1
2759
# -*- encoding: utf-8 -*- from supriya.tools.ugentools.UGen import UGen class ToggleFF(UGen): r'''A toggle flip-flop. :: >>> trigger = ugentools.Dust.kr(1) >>> toggle_ff = ugentools.ToggleFF.ar( ... trigger=trigger, ... ) >>> toggle_ff ToggleFF.ar() ...
mit
-1,273,342,829,206,727,000
21.622951
64
0.475535
false
4.199391
false
false
false
seecr/meresco-components
meresco/components/cql/searchtermfilterandmodifier.py
1
1958
## begin license ## # # "Meresco Components" are components to build searchengines, repositories # and archives, based on "Meresco Core". # # Copyright (C) 2011-2012, 2015 Seecr (Seek You Too B.V.) http://seecr.nl # Copyright (C) 2011, 2015 Stichting Kennisnet http://www.kennisnet.nl # Copyright (C) 2012 Stichting Bibl...
gpl-2.0
5,699,538,018,628,188,000
42.511111
132
0.740041
false
3.963563
false
false
false
skuda/client-python
kubernetes/client/models/v1_limit_range.py
1
6140
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.6.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
apache-2.0
4,731,517,861,607,350,000
30.979167
272
0.589414
false
4.171196
false
false
false
BrunoCaimar/ArcREST
src/arcrest/web/_base.py
1
30993
""" Contains POST and GET web operations for ArcREST Python Package. """ from __future__ import absolute_import from __future__ import print_function import io import os import re import ssl import sys import json import uuid import zlib from inspect import getargspec import shutil import tempfile import mimetype...
apache-2.0
6,644,773,679,386,917,000
40.882432
97
0.46404
false
4.8908
false
false
false
me-shaon/coding-interview-prep
Data Structure/Parentheses-balance/python-solution/p_balance.py
1
1102
from stack import Stack def matches(top, symbol): """ checks if the last found symbol matches with the stack top element """ openingSymbols = "({[" closingSymbols = ")}]" return openingSymbols.index(top) == closingSymbols.index(symbol) def checkBalance(expression): """ checks each symbols to mat...
mit
-8,803,655,056,235,813,000
33.4375
125
0.625227
false
4.516393
false
false
false
cbertinato/pandas
asv_bench/benchmarks/frame_methods.py
1
16547
import string import numpy as np from pandas import ( DataFrame, MultiIndex, NaT, Series, date_range, isnull, period_range) import pandas.util.testing as tm class GetNumericData: def setup(self): self.df = DataFrame(np.random.randn(10000, 25)) self.df['foo'] = 'bar' self.df['bar'] =...
bsd-3-clause
6,597,646,539,772,058,000
27.189097
79
0.581435
false
3.191937
false
false
false
Raul3212/TopicosAvancadosBD
dev/graphs/Graph.py
1
1298
#!/usr/bin/env python # -*- coding: utf-8 -*- class Graph: #inicia grafo com uma mapa de vértices def __init__(self, vertices): self.numVertices = len(vertices) self.adjList = {} #para cada vértice é criada uma lista de adjacência for vertice in vertices: self.adjList...
gpl-3.0
1,173,820,907,192,215,800
26.934783
59
0.604669
false
3.180693
false
false
false
project-chip/connectedhomeip
scripts/flashing/qpg_firmware_utils.py
1
3979
#!/usr/bin/env python3 # Copyright (c) 2020-2021 Project CHIP Authors # # 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 app...
apache-2.0
5,982,677,172,083,600,000
30.085938
117
0.604423
false
4.097837
false
false
false
iwschris/ezodf2
ezodf2/tablecolumncontroller.py
1
5383
#!/usr/bin/env python #coding:utf-8 # Purpose: table-row container # Created: 02.02.2011 # Copyright (C) 2011, Manfred Moitzi # License: MIT from __future__ import unicode_literals, print_function, division __author__ = "mozman <mozman@gmx.at>" import copy from .xmlns import CN, etree from .nodestructuret...
mit
596,859,511,712,674,600
32.06962
94
0.590006
false
3.978566
false
false
false
andreino7/FloorPlacer
floorplanner/floorplanner/decodeFpgaJson.py
1
4568
# -*- coding: utf-8 -*- """ Created on Thu Apr 16 17:33:36 2015 @author: Filippo """ import os, sys, pygame from pygame.locals import * import fpgaApi as f types= ['DSP','LAB','MK20','NonRec'] WHITE = 255,255,255 GREEN = 0,255,0 BLACK = 0,0,0 BLUE = 0,0,255 RED = 255,0,0 YELLOW = 0,255,255 colors = ...
gpl-2.0
-2,108,685,678,420,123,000
24.52514
143
0.536121
false
3.130912
false
false
false
pegasus-isi/pegasus
packages/pegasus-common/test/test_yaml.py
1
1053
from collections import OrderedDict from pathlib import Path import pytest from Pegasus.yaml import dumps, loads @pytest.mark.parametrize( "s, expected", [ ("key: 1", 1), ("key: 2018-10-10", "2018-10-10"), ("key: yes", "yes"), ("key: true", True), ], ) def test_loads(s, e...
apache-2.0
-2,734,217,589,700,228,000
25.325
82
0.493827
false
2.941341
true
false
false
sunj1/my_pyforms
tutorials/4.MdiApplication/Core/Controllers/ProjectTree.py
1
1144
import pyforms from pyforms import BaseWidget from PyQt4 import QtGui, QtCore from pyforms.Controls import ControlText from pyforms.Controls import ControlButton from pyforms.Controls import ControlTree class ProjectTree(BaseWidget): def __init__(self): super(ProjectTree, self).__init__('Project') self._add...
mit
-7,566,903,154,404,419,000
30.805556
114
0.487762
false
4.612903
false
false
false
NervanaSystems/coach
rl_coach/dashboard_components/landing_page.py
1
1578
# # Copyright (c) 2017 Intel Corporation # # 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...
apache-2.0
-3,159,581,690,448,715,000
39.461538
111
0.683777
false
3.839416
false
false
false
marcoantoniooliveira/labweb
oscar/models/fields/autoslugfield.py
1
7473
""" AutoSlugField taken from django-extensions at 15d3eb305957cee4768dd86e44df1bdad341a10e Uses Oscar's slugify function instead of Django's Copyright (c) 2007 Michael Trier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"...
bsd-3-clause
8,616,271,498,486,566,000
37.720207
100
0.642179
false
4.250853
false
false
false
jnosal/tormon
tormon/core/utils.py
1
1543
import logging import importlib import signal import time from tormon import applications from tormon.monitor import client from tornado.ioloop import IOLoop def load_app(name, default=None): default = default or applications.MonitorWebApplication return load_component(name, default) def load_monitor(name...
mit
-8,131,067,639,250,553,000
25.152542
75
0.667531
false
3.997409
false
false
false
riolet/poline
poline/utilfuncs.py
1
3347
from __future__ import print_function import re import sys import collections import subprocess from poline.fields import Fields if sys.version_info >= (3,0): from urllib.parse import urlparse else: from urlparse import urlparse if sys.version_info >= (3,5): _collections_Generator = collections.Generator...
mit
-3,600,847,755,036,444,700
26.219512
96
0.50732
false
3.450515
false
false
false
Wingless-Archangel/bokken
ui/graph_bar.py
1
4086
# graph_bar.py # # Copyright 2009 Hugo Teso <hugo.teso@gmail.com> # Based on code from w3af by Andres Riancho (w3af.sourceforge.net) # # 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...
gpl-2.0
2,549,516,216,064,484,000
39.86
83
0.623103
false
3.556136
false
false
false
ristorantino/fiscalberry
testepson2gen.py
1
2090
from Comandos.Epson2GenComandos import Epson2GenComandos import ctypes from ctypes import byref, c_int, c_char, c_char_p, c_long, c_short, create_string_buffer from Traductores.TraductoresHandler import TraductoresHandler, TraductorException fullpath = "/lib64/libEpsonFiscalInterface.so" EpsonLibInterface = ctypes.cd...
mit
-837,607,711,814,663,800
20.556701
140
0.65933
false
2.648923
false
false
false
vlahm/TrafficCruising-DSSG2017
pipeline/label_modes.py
1
4413
def label_modes(trip_list, silent=True): """Labels trip segments by likely mode of travel. Labels are "chilling" if traveler is stationary, "walking" if slow, "driving" if fast, and "bogus" if too fast to be real. trip_list [list]: a list of dicts in JSON format. silent [bool]: if True, does n...
mit
-4,820,751,773,849,474,000
52.829268
179
0.554725
false
3.62613
false
false
false
BU-NU-CLOUD-SP16/Container-Safety-Determination
demo5/endpoint/processor.py
1
5555
##################################################################### # File: processor.py # Author: Jeremy Mwenda <jmwenda@bu.edu> # Desc: This file processes messages (sdhashes) from rabbitMQ. # ####### import os import sys import time import Queue import threading sys.path.append(os.getcwd() + "/../") from scripts....
mit
-7,156,505,796,649,811,000
31.296512
81
0.60144
false
3.700866
false
false
false
valmynd/MediaFetcher
src/plugins/youtube_dl/youtube_dl/extractor/expressen.py
1
3081
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( determine_ext, int_or_none, unescapeHTML, unified_timestamp, ) class ExpressenIE(InfoExtractor): _VALID_URL = r'''(?x) https?:// (?:www\.)?expres...
gpl-3.0
-3,072,278,269,034,569,700
30.418367
187
0.631374
false
2.746655
false
false
false
Cue/fast-python-pb
setup.py
1
1339
#!/usr/bin/env python # Copyright 2011 The fast-python-pb Authors. # # 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 a...
apache-2.0
5,150,175,574,964,475,000
30.139535
79
0.665422
false
3.825714
false
false
false
UdK-VPT/Open_eQuarter
mole3/view/ui_estimated_energy_demand_dialog.py
1
8888
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'view/ui_estimated_energy_demand_dialog.ui' # # Created: Mon Aug 3 17:56:39 2015 # by: qgis.PyQt UI code generator 4.11.3 # # WARNING! All changes made in this file will be lost! from qgis.PyQt import QtCore, QtGui try: _fromUtf8 ...
gpl-2.0
-262,959,376,832,556,220
60.722222
133
0.727048
false
3.591111
false
false
false
fernandog/Medusa
ext/sqlalchemy/sql/naming.py
1
4662
# sqlalchemy/naming.py # Copyright (C) 2005-2018 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Establish constraint and index naming conventions. """ from .schema impor...
gpl-3.0
-869,048,456,167,704,800
30.931507
77
0.592235
false
3.984615
false
false
false
FrancoisRheaultUS/dipy
dipy/denoise/adaptive_soft_matching.py
5
3286
import math import numpy as np from dipy.core import wavelet def adaptive_soft_matching(ima, fimau, fimao, sigma): r"""Adaptive Soft Coefficient Matching Combines two filtered 3D-images at different resolutions and the original image. Returns the resulting combined image. Parameters ---------- ...
bsd-3-clause
-6,657,820,547,478,780,000
37.209302
79
0.546561
false
2.96303
false
false
false
DozyDolphin/Worksets
worksets/gui/designs/settings_design.py
1
7375
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'NEW_settings_dialog.ui' # # Created by: PyQt5 UI code generator 5.5.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_settings_dialog(object): def setupUi(self, settings_dial...
gpl-3.0
4,852,322,055,283,759,000
56.170543
106
0.704542
false
3.663686
false
false
false
jm2garrido/NamesOfGod
python/nombresDios_2_1.0.py
1
2754
#!/usr/bin/env python """ NamesOfGod Version para Python 2 """ __author__ = "Jose Miguel Garrido" __copyright__ = "(C) 2016 Jose Miguel Garrido" """ 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, e...
gpl-3.0
2,890,538,907,292,505,600
24.036364
79
0.575163
false
3.472888
false
false
false
willingc/cookiecutter
cookiecutter/hooks.py
1
3155
# -*- coding: utf-8 -*- """ cookiecutter.hooks ------------------ Functions for discovering and executing various cookiecutter hooks. """ import io import logging import os import subprocess import sys import tempfile from jinja2 import Template from cookiecutter import utils from .exceptions import FailedHookExce...
bsd-3-clause
1,720,808,038,146,970,000
25.965812
78
0.655151
false
3.833536
false
false
false
WyoARCC/arcc_metrics
userutil/plt_logins.py
1
5009
#!/usr/bin/python # Plots the user logins for the past 30 days import numpy as np import matplotlib.pyplot as plt import subprocess import datetime from collections import Counter wtmp_loc = './' # number of days since today history = 31 ignorenames = '[root,(unknown,system,reboot,wtmp]' MonthMapping = {'Jan':1, 'F...
mit
-1,307,856,706,255,155,500
27.299435
126
0.61649
false
3.152297
false
false
false
savoirfairelinux/santropol-feast
src/datamigration/management/commands/importaddresses.py
2
2395
from django.core.management.base import BaseCommand from django.core.management import call_command from django.shortcuts import get_object_or_404 from member.factories import ClientFactory, MemberFactory from member.models import Client, Member, Route, Address, Contact, EMAIL, HOME import os import csv from sys import...
agpl-3.0
1,223,815,122,851,017,500
33.214286
78
0.493111
false
4.659533
false
false
false
schubertr/wacomBot
src/wacomBot.py
1
4750
''' Created on Oct 14, 2015 @author: Ryan ''' import praw import re import os import obot def countComments(flat_comments): #function to count number of comments on a post count = 0 for comment in flat_comments: count += 1 return count r = obot.login() #logins to /u/wacomBot using OAuth2 safe_w...
mit
1,393,523,912,039,187,000
41.419643
123
0.536421
false
4.576108
false
false
false
phildini/cards-against-django
cards/views/game_views.py
1
20247
# -*- coding: us-ascii -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # import json import urllib import redis from django.core.exceptions import PermissionDenied from django.http import Http404, HttpResponse from django.utils.safestring import mark_safe from django.utils.html import strip_tags from django.vie...
mit
-8,578,380,420,747,296,000
36.703911
231
0.58868
false
3.966112
false
false
false
alexalemi/cancersim
povray_file_making.py
1
4543
import numpy as np #import numarray as numar from numpy.random import * from scipy import * from scipy.io import * from scipy.spatial.distance import euclidean from numpy import * import matplotlib import pylab import os # For issuing commands to the OS. import sys # F...
mit
-7,003,754,969,569,818,000
37.176471
321
0.569227
false
3.238061
false
false
false
drtuxwang/system-config
bin/go.py
1
1509
#!/usr/bin/env python3 """ GO compiler wrapper (sets GOROOT automatically) """ import glob import os import signal import sys import command_mod import subtask_mod class Main: """ Main class """ def __init__(self) -> None: try: self.config() sys.exit(self.run()) ...
gpl-2.0
-7,643,844,919,390,083,000
21.522388
78
0.512922
false
3.839695
false
false
false
raidoz/cursedprocesses
cursedprocesses/stinner.py
1
3081
"""stinner.py: Read from stdin with curses and figure out what keys were pressed.""" import Queue import curses import string from threading import Thread import sys __author__ = "Raido Pahtma" __license__ = "MIT" def read_stdin(stdin_input, queue): """ Reading from stdin in a thread and then communicating ...
mit
7,499,617,951,341,951,000
28.634615
112
0.411555
false
4.345557
false
false
false
vecna/onionshare
onionshare/onionshare.py
1
9548
# -*- coding: utf-8 -*- """ OnionShare | https://onionshare.org/ Copyright (C) 2014 Micah Lee <micah@micahflee.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, o...
gpl-3.0
4,444,800,167,306,084,000
34.7603
126
0.560327
false
3.958541
false
false
false
AdriaGS/MTP-Group-C
Single Mode/Final Code_backup/finalScript_2_0.py
1
15078
try: import RPi.GPIO as GPIO from lib_nrf24 import NRF24 from math import * import numpy as np import time import spidev import sys import os.path from threading import Thread, Event import nm_main as NetMode def compress(uncompressed): """Compress a string to a list of output symbols.""" # Build the...
gpl-2.0
-3,781,048,661,881,228,300
28.108108
131
0.570367
false
3.285683
false
false
false
compas-dev/compas
src/compas/geometry/transformations/matrices.py
1
39447
from __future__ import print_function from __future__ import absolute_import from __future__ import division import math from copy import deepcopy from compas.geometry import scale_vector from compas.geometry import normalize_vector from compas.geometry import subtract_vectors from compas.geometry import cross_vecto...
mit
-8,861,635,646,289,412,000
26.355756
149
0.540852
false
3.128232
false
false
false
mgupta011235/TweetSafe
web_app/app.py
1
9543
from flask import Flask from flask import (request, redirect, url_for, session, render_template, jsonify) import gensim import numpy as np from scipy.spatial.distance import cosine from nltk.tokenize import PunktSentenceTok...
gpl-3.0
-4,954,006,268,874,138,000
30.916388
106
0.614167
false
3.96304
false
false
false
DLance96/nativx-survey
survey/views.py
1
3156
import json import re from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.shortcuts import render from django.shortcuts import render_to_response from django.template import RequestContext import forms import utils import personality_analyzer import commit_to_sql de...
mit
-8,484,394,417,920,940,000
33.681319
115
0.579848
false
4.191235
false
false
false
powellquiring/bigimage
cfm/cformation/lambda_keyword.py
1
2652
import json import os import urllib2 import time print('Loading elasticsearch keyword function') #ELASTICSEARCH_URL = "https://search-bigimage-2gtgp2nq3ztfednwgnd6ma626i.us-west-2.es.amazonaws.com" ELASTICSEARCH_URL = os.environ['ELASTICSEARCH_URL'] def extractImages(tweet): 'return a list of some of the images ...
apache-2.0
-2,847,459,745,697,679,400
31.341463
128
0.5954
false
3.598372
false
false
false
feroda/lessons-python4beginners
students/2016-09-04/simone-cosma/database.py
1
1116
import sqlite3 import os class DBManager(object): def __init__(self, filename): self.filename = filename def _init_db(self): self._connect() cu = self.conn.cursor() cu.execute("CREATE TABLE people (name VARCHAR(64), city VARCHAR(32), salary INTEGER);") self.conn.commi...
agpl-3.0
923,264,685,424,207,600
25.595238
95
0.567204
false
3.957447
false
false
false
kravp00L/netflow
log_cleanup.py
1
3037
''' ################################################################ # # Python script to manage netflow log and export files # ################################################################ ''' import datetime import os import sys BASE_DIR = '/opt/netflow' CONFIG_FILE = 'listener.conf' def get_config_file(): ...
gpl-2.0
-6,999,117,114,890,413,000
33.908046
83
0.508396
false
3.93904
true
false
false
RENCI/xDCIShare
hs_geo_raster_resource/forms.py
1
14480
import copy from django.forms import ModelForm, BaseFormSet from django import forms from crispy_forms.layout import Layout, HTML, Fieldset from crispy_forms.helper import FormHelper from models import BandInformation, CellInformation from hs_core.forms import BaseFormHelper, get_crispy_form_fields from djan...
bsd-3-clause
-6,881,577,108,657,909,000
44.11465
99
0.545097
false
4.361446
false
false
false
dborstelmann/Penguins-GH6
api/migrations/0002_client_continuummembers_continuumservices_disabilities_employmenteducation_enrollment_exit_healthand.py
1
20276
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.contrib.postgres.fields class Migration(migrations.Migration): dependencies = [ ('api', '0001_initial'), ] operations = [ migrations.CreateModel( name='Clie...
mit
1,722,662,491,708,280,300
59.888889
132
0.566039
false
4.512798
false
false
false
botswana-harvard/edc-sync
edc_sync/transaction/transaction_deserializer.py
1
4704
import socket from django.apps import apps as django_apps from django_crypto_fields.constants import LOCAL_MODE from django_crypto_fields.cryptor import Cryptor from edc_device.constants import NODE_SERVER, CENTRAL_SERVER from edc_sync.models import IncomingTransaction from edc_sync_files.transaction.file_archiver imp...
gpl-2.0
1,376,667,591,182,612,200
36.935484
89
0.609694
false
4.291971
true
false
false
panruochen/dragoneye
pyscripts/kux2mp4.py
1
7466
#!/usr/bin/env python # vim: set syn=python et : #============================================================ # # Pan Ruochen <ijkxyz@msn.com> # #============================================================ import os, sys, re, struct, subprocess, optparse import platform, locale class FileDesc() : def __init__(self...
gpl-2.0
-6,511,842,847,894,402,000
25.759857
122
0.616662
false
2.649397
false
false
false
NifTK/NiftyNet
niftynet/layer/loss_classification.py
1
2847
# -*- coding: utf-8 -*- """ Loss functions for multi-class classification """ from __future__ import absolute_import, print_function, division import numpy as np import tensorflow as tf from niftynet.engine.application_factory import LossClassificationFactory from niftynet.layer.base_layer import Layer class LossFu...
apache-2.0
-6,651,355,342,946,650,000
33.301205
97
0.572884
false
4.255605
false
false
false
WestpointLtd/pytls
fallback.py
1
2729
#!/usr/bin/python import sys import socket import logging from optparse import OptionParser from tls import * def make_hello(): hello = ClientHelloMessage.create(TLSRecord.TLS1_0, '01234567890123456789012345678901', [TLS_RSA_WITH_RC4_128...
mit
-5,782,777,739,552,321,000
32.280488
74
0.522902
false
4.345541
false
false
false
QiJune/Paddle
python/paddle/fluid/tests/book/high-level-api/understand_sentiment/test_understand_sentiment_stacked_lstm.py
1
6027
# Copyright (c) 2018 PaddlePaddle 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 appli...
apache-2.0
-8,604,034,353,520,157,000
35.307229
83
0.637465
false
3.572614
false
false
false
elegion/djangodash2013
wtl/wtgithub/worker.py
1
8363
from __future__ import absolute_import import base64 import logging from django.conf import settings from github import UnknownObjectException from wtl.wtgithub.github import WtGithub from wtl.wtgithub.models import Repository from wtl.wtlib.models import Project, Library, LibraryVersion, Language from wtl.wtparser.p...
mit
-5,599,094,164,936,403,000
39.014354
102
0.609949
false
4.434252
false
false
false
casparluc/VikingDoom
game/urls.py
1
1261
#!/usr/bin/python from django.conf import settings from django.conf.urls import url, include from django.conf.urls.static import static from game import views from rest_framework.routers import DefaultRouter from rest_framework.schemas import get_schema_view app_name = 'game' router = DefaultRouter() router.register(...
gpl-3.0
2,148,696,320,948,337,200
38.40625
97
0.739096
false
3.184343
false
true
false
jeremyfromearth/meter
server/meter/__init__.py
1
1480
import json from bson.json_util import loads, dumps from flask import Flask, request, jsonify from flask_pymongo import PyMongo from meter.ml.tfidf import TermFreqInverseDocFreq app = Flask(__name__) app.config.from_object('config') mongo = PyMongo(app) midi_tfidf = TermFreqInverseDocFreq() midi_tfidf.load('./meter/r...
gpl-3.0
-279,651,691,214,872,670
34.238095
99
0.662838
false
3.600973
false
false
false
chaquo/chaquopy
app/src/main/python/chaquopy/test/test_reflect.py
1
23968
from java import cast, jarray, jclass from unittest import skipIf from .test_utils import API_LEVEL, FilterWarningsCase from com.chaquo.python import TestReflect as TR class TestReflect(FilterWarningsCase): from .test_utils import assertDir def setUp(self): super().setUp() self.Test = jclass...
mit
-7,204,818,589,358,771,000
42.332731
99
0.617619
false
3.946476
true
false
false
jjdmol/LOFAR
LTA/LTAIngest/multiprocessing/connection.py
1
12996
# # A higher level module for using sockets (or Windows named pipes) # # multiprocessing/connection.py # # Copyright (c) 2006-2008, R Oudkerk --- see COPYING.txt # __all__ = [ 'Client', 'Listener', 'Pipe' ] import os import sys import socket import errno import time import tempfile import itertools import _multiproc...
gpl-3.0
-6,822,300,087,038,623,000
28.603645
81
0.593259
false
3.959781
false
false
false
ernw/knxmap
knxmap/utils.py
1
4490
import json import socket import collections def parse_knx_address(address): """Parse physical/individual KNX address. Address structure (A=Area, L=Line, B=Bus device): -------------------- |AAAA|LLLL|BBBBBBBB| -------------------- 4 Bit|4 Bit| 8 Bit parse_knx_address(99999) '8.6.159'...
gpl-3.0
2,649,951,108,011,896,300
32.014706
100
0.6
false
3.255983
false
false
false
Alkxzv/pebble-engine
input.py
1
1961
from .base import Component, System from .utils.misc import Vector from .utils.window import CloseEvent, Keyboard, KeyEvent class Action: attack = 0 defend = 1 class Input(System): update_loop = 'variable' def __init__(self, **kwargs): super().__init__(**kwargs) self.input = self.e...
mit
3,602,522,657,294,170,600
29.169231
76
0.54105
false
4.043299
false
false
false
SomewhatDamaged/Damaged-Cogs
batfacts.py
1
7007
import discord import feedparser from discord.ext import commands from .utils.dataIO import fileIO from .utils import checks from __main__ import send_cmd_help from urllib import parse import os import asyncio import logging try: # check if feedparser exists import feedparser except ImportError: feedparser ...
mit
-5,363,744,865,132,918,000
39.50289
117
0.550735
false
3.974475
false
false
false
Denney/SimScript
scripts/diagnose.py
1
1583
''' Diagnoses available simulator input and outputs ''' import joysticks,state,log,phidgets # debug joysticks for j in range(0, joysticks.numJoysticks()) : joy = joysticks.get(j) for b in range(0, joy.numButtons()) : key = "joysticks.get('%s').button(%d)" % (joy.name, b) ...
bsd-3-clause
-8,090,145,446,292,231,000
27.314815
75
0.513582
false
3.140873
false
false
false
tylesmit/Quantum-Packages
common/setup.py
1
1272
try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages Name='quantum-common' ProjecUrl="" Version='0.1' License='Apache License 2.0' Author='Tyler Smith' AuthorEmail='tylesmit@cisco.com' Maint...
apache-2.0
-4,851,853,058,751,903,000
18.569231
52
0.654874
false
3.456522
false
false
false
jasonbunk/NBodyGalaxySimulation
run_two_plummer_collision.py
1
2238
import os import math import numpy as np from PlummerGalaxy import PlummerGalaxy from InitialConditions import InitialConditions import imp try: imp.find_module('matplotlib') matplotlibAvailable = True import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D except ImportError: matplo...
gpl-3.0
-493,020,808,501,137,400
29.657534
152
0.743521
false
3.095436
false
true
false
Kore-Core/kore
qa/rpc-tests/test_framework/mininode.py
1
39163
#!/usr/bin/env python3 # Copyright (c) 2010 ArtForz -- public domain half-a-node # Copyright (c) 2012 Jeff Garzik # Copyright (c) 2010-2016 The Kore Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # mininode.py -...
mit
-6,647,981,156,273,295,000
28.269806
184
0.554197
false
3.445021
false
false
false
os-cloud-storage/openstack-workload-disaster-recovery
dragon/api/openstack/v1/__init__.py
1
6635
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # 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
-2,088,261,585,333,303,600
40.21118
78
0.426827
false
5.599156
false
false
false
f3at/feat
src/feat/test/integration/test_simulation_graph.py
1
19012
# 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,361,427,498,602,809,300
38.119342
77
0.615296
false
3.714732
true
false
false
AudioCommons/ac-mediator
accounts/forms.py
1
3439
from django import forms from accounts.models import Account from django.utils.translation import ugettext as _ class RegistrationForm(forms.Form): username = forms.RegexField( label=_("Username"), min_length=3, max_length=30, regex=r'^\w+$', help_text=_("Required. 30 chara...
apache-2.0
-95,961,405,153,844,880
40.939024
121
0.624309
false
4.591455
false
false
false
alexgarzao/email_reminders
email_reminders/main.py
1
4254
# -*- encoding: utf-8 -*- # Email reminder # Author: Alex S. Garzão <alexgarzao@gmail.com> # main.py import argparse import MySQLdb import MySQLdb.cursors import ConfigParser import logging from reminder_config import ReminderConfig from mandrill_config import MandrillConfig from send_reminders import SendReminders f...
mit
4,086,905,129,704,902,000
28.741259
148
0.588291
false
3.793934
true
false
false
Griatch/wordtrack
wordtrack.py
1
13831
#! /usr/bin/python """ Wordtrack (Griatch 2014) Usage: wordtrack.py start [days [wordgoal]] | plot | <wordcount> A wordcount tracker that mimics the word-counting mechanism of NaNoWriMo (www.nanowrimo.org). No code of theirs were used and this is not in any way related or endorsed by nanowrimo. I just thought the...
bsd-3-clause
-8,802,957,963,080,349,000
31.240093
139
0.608271
false
3.641654
false
false
false
maxicus/sublime-out-of-brackets
out-of-brackets.py
1
1688
import sublime, sublime_plugin class OutOfBracketsCommand(sublime_plugin.TextCommand): def run(self, edit): # remove current line if its empty # dont remove it if next line contains code other than brackets # (i.e. this line is delimiter between code blocks) for sel in self.view.sel(): if sel.empty(): ...
gpl-2.0
1,413,270,988,034,959,600
29.690909
65
0.603081
false
2.851351
false
false
false
osvx/vyatta-op
scripts/vyatta-show-interfaces-traffic.py
1
3167
#!/usr/bin/python from sys import argv, exit from time import sleep def get_stats(interface): stats = {} with open('/proc/net/dev') as file: for line in file: line = line.split() if line[0][:-1] == interface: stats['bytes_in'] = float(line[1]) ...
gpl-2.0
-7,811,449,596,861,824,000
28.598131
123
0.524471
false
3.261586
false
false
false
vetaylor/scavenger
config/settings/local.py
1
1359
# -*- coding: utf-8 -*- """ Local settings - Run in Debug mode - Use console backend for emails - Add Django Debug Toolbar - Add django-extensions as app """ import socket import os from .base import * # noqa # DEBUG # ------------------------------------------------------------------------------ DEBUG = env.bool...
mit
5,236,764,281,337,264,000
27.914894
99
0.481236
false
4.181538
false
false
false
lucius-feng/tg2
tests/test_jsonify.py
2
3689
from tg import jsonify, lurl from datetime import datetime from decimal import Decimal from nose.tools import raises from nose import SkipTest from webob.multidict import MultiDict import json from tg.util import LazyString from tg.util.webtest import test_context class Foo(object): def __init__(self, bar): ...
mit
6,574,608,830,453,881,000
26.333333
83
0.626457
false
3.353636
true
false
false
luminescence/PolyLibScan
Tools/lmp_combine.py
1
13072
from lmp_types import * from lmp_particlesAndInteractions import * from lmp_creator import LmpCreator from lmpObj import LmpObj import lmp_helpers as helpers import numpy as np import itertools as it import sets import pandas as pd import PolyLibScan.Database.db as db from scipy.spatial.distance import cdist class Env...
mit
-8,332,740,617,413,962,000
42.573333
123
0.59134
false
3.778035
false
false
false
snowflakedb/snowflake-connector-python
src/snowflake/connector/auth.py
1
26004
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2012-2021 Snowflake Computing Inc. All right reserved. # import codecs import copy import json import logging import tempfile import time import uuid from datetime import datetime from os import getenv, makedirs, mkdir, path, remove, removedirs, rmdir fro...
apache-2.0
-6,243,212,620,404,948,000
35.471248
106
0.554761
false
4.262951
false
false
false
PaleNeutron/EpubBuilder
ui_mainwindow.py
1
10343
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'D:\EpubBuilder\ui_mainwindow.ui' # # Created: Mon Feb 22 23:49:35 2016 # by: PyQt5 UI code generator 5.4 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): ...
apache-2.0
2,310,257,149,889,403,000
56.571429
144
0.709975
false
3.62671
false
false
false
demharters/git_scripts
dist_1mi5_stsamc.py
1
1643
#! usr/bin/env python from MDAnalysis import * #from MDAnalysis.analysis.align import * import numpy import math u = Universe("init.pdb","temp.pos.pdb") v = Universe("init.pdb") # residues a1 = u.selectAtoms("segid A and resid 50") # beginning of helixA1 b1 = u.selectAtoms("segid A and resid 176") a2 = u.selectAtoms...
apache-2.0
3,281,473,885,819,557,400
30.596154
83
0.662812
false
2.51608
false
false
false
Hicks48/amber-state-machine-python
amber_automate/automate_builder.py
1
7450
#!/usr/bin/env python # -*- coding: utf-8 -*- from amber_automate.automate import Automate from amber_automate.state import State from amber_automate.transition_table import TransitionTable from amber_automate.transition import Transition class AutomateBuilder(object): @staticmethod def create_automate_build...
mit
7,946,847,825,068,412,000
34.312796
188
0.633423
false
4.001074
false
false
false
Freso/listenbrainz-server
listenbrainz/db/timescale.py
1
2249
import sqlalchemy from sqlalchemy import create_engine from sqlalchemy.pool import NullPool import time import psycopg2 # This value must be incremented after schema changes on replicated tables! SCHEMA_VERSION = 5 engine = None DUMP_DEFAULT_THREAD_COUNT = 4 def init_db_connection(connect_str): """Initializes...
gpl-2.0
-5,686,796,716,107,665,000
32.567164
98
0.602935
false
4.627572
false
false
false
automl/nas_benchmarks
experiment_scripts/run_random_search.py
1
2288
import os import json import argparse from tabular_benchmarks import FCNetProteinStructureBenchmark, FCNetSliceLocalizationBenchmark,\ FCNetNavalPropulsionBenchmark, FCNetParkinsonsTelemonitoringBenchmark from tabular_benchmarks import NASCifar10A, NASCifar10B, NASCifar10C parser = argparse.ArgumentParser() parse...
bsd-3-clause
2,521,110,598,387,135,500
34.75
119
0.725962
false
3.096076
false
false
false
ZeitOnline/zeit.content.article
src/zeit/content/article/edit/browser/edit.py
1
11725
from zeit.cms.browser.widget import ConvertingRestructuredTextWidget from zeit.cms.i18n import MessageFactory as _ import json import zeit.cms.browser.widget import zeit.cms.interfaces import zeit.content.article.edit.header import zeit.content.article.edit.interfaces import zeit.content.modules.rawtext import zeit.edi...
bsd-3-clause
-3,701,616,606,253,803,000
28.166667
79
0.626269
false
3.778601
false
false
false
sserrot/champion_relationships
venv/Lib/site-packages/PIL/ImageTk.py
1
9328
# # The Python Imaging Library. # $Id$ # # a Tk display interface # # History: # 96-04-08 fl Created # 96-09-06 fl Added getimage method # 96-11-01 fl Rewritten, removed image attribute and crop method # 97-05-09 fl Use PyImagingPaste method instead of image type # 97-05-12 fl Minor tweaks to match the IFUNC9...
mit
2,898,874,449,671,464,400
30.093333
83
0.553816
false
4.156863
false
false
false
mbarbon/wapiti
src/attack/mod_crlf.py
1
5673
from attack import Attack from vulnerability import Vulnerability, Anomaly import requests from net import HTTP # Wapiti SVN - A web application vulnerability scanner # Wapiti Project (http://wapiti.sourceforge.net) # Copyright (C) 2008 Nicolas Surribas # # David del Pozo # Alberto Pastor # Informatica Gesfor # ICT Ro...
gpl-2.0
7,763,413,846,346,709,000
45.121951
91
0.518244
false
4.360492
false
false
false
rick446/barin
barin/manager/instance_manager.py
1
4288
import pymongo from barin import schema as S from barin import event # TODO: test backref logic class InstanceManager(object): def __init__(self, manager, instance): self._manager = manager self.instance = instance def __getattr__(self, name): return getattr(self._manager, name) ...
apache-2.0
2,294,020,514,347,695,400
34.733333
82
0.536381
false
3.463651
false
false
false
lichong012245/django-lfs-0.7.8
lfs/utils/middleware.py
1
3467
# python imports import hotshot import hotshot.stats import sys import tempfile from urlparse import urlparse from cStringIO import StringIO # django imports from django import http from django.conf import settings from django.contrib.redirects.models import Redirect from django.http import HttpResponseServerError c...
bsd-3-clause
5,544,538,975,891,190,000
34.020202
90
0.601961
false
4.361006
false
false
false
Clinical-Genomics/scout
scout/adapter/mongo/panel.py
1
18087
"""Code to handle panels in the mongo database""" import datetime as dt import logging import math from copy import deepcopy import pymongo from bson import ObjectId from scout.build import build_panel from scout.exceptions import IntegrityError from scout.parse.panel import get_omim_panel_genes from scout.utils.date...
bsd-3-clause
5,755,674,329,866,806,000
32.126374
105
0.545475
false
4.089306
false
false
false
jenfly/python-cheatsheets
science_numpy.py
1
12501
""" Jennifer's scientific computing cheatsheet - arrays and numerical analysis. Contents: - numpy & ndarray basics - Basic operations and functions with ndarrays - Type conversions - Basic indexing and slicing - Boolean indexing - Fancy indexing - Conditional logic and array operations - Transposing arrays and swappin...
mit
302,014,512,266,124,100
30.971867
79
0.556196
false
3.242802
false
false
false
uw-biorobotics/raven2
code_style/cpplint_raven.py
1
237668
#!/usr/bin/env python # # Copyright (c) 2009 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
lgpl-3.0
121,065,637,951,031,870
37.557592
97
0.639787
false
3.824226
false
false
false
drericstrong/pypbe
pypbe-bk/pypbe-bk.py
1
25613
### PyPBE Bokeh Simulator ### Written By: Eric Strong ### Last Updated: 2017/08/31 from pypbe.core import PBE from bokeh.io import curdoc from bokeh.plotting import figure from bokeh.models.tools import SaveTool from bokeh.models.ranges import Range1d from bokeh.models.annotations import Label from bokeh.layouts impor...
agpl-3.0
-2,061,727,428,893,592,800
49.3222
101
0.535314
false
3.165225
false
false
false
anamativi/profilingCallsCacheHM
UI/UI.py
1
1492
import sys from PyQt4 import QtCore from PyQt4.QtCore import pyqtSlot from PyQt4.QtGui import * import os class MyStream(object): def write(self, text): # Add text to a QTextEdit... sys.stdout = MyStream() class EmittingStream(QtCore.QObject): textWritten = QtCore.pyqtSignal(str) def write(self, ...
gpl-2.0
-7,422,079,442,843,931,000
18.631579
68
0.714477
false
3.082645
false
false
false
LiJingkang/PyQt5
Learn/高级特性/PyQt5_组件_滑块条.py
1
1481
# 滑块条(QSlider)组件有一个简单的可调节手柄。 import sys from PyQt5.QtWidgets import (QWidget, QSlider, QLabel, QApplication) from PyQt5.QtCore import Qt from PyQt5.QtGui import QPixmap class Example(QWidget): def __init__(self): super().__init__() self.initUI() def initUI(self):...
apache-2.0
-2,849,480,553,423,885,300
27.638298
55
0.588104
false
2.949561
false
false
false
wcainboundary/boundary-api-cli
boundary/event_get.py
1
1571
# # Copyright 2014-2015 Boundary, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
apache-2.0
-3,701,845,647,589,833,000
33.152174
103
0.663272
false
3.888614
false
false
false
lucaboni92/PasswordDictionaryGen
pwd_dictionary_gen.py
1
8384
from random import randint import sys import os MAX_PWD_LEN = 30 def main(): defaultMaxIterations = 10000 defaultGeneratedResults = 50 inputEnable = False outputEnable = True customIterationNumber = False try: if len(sys.argv) > 1: i = 1 ...
gpl-3.0
-7,470,466,672,625,726,000
27.942857
140
0.445134
false
4.257999
false
false
false
Virtual-Instruments/tools
vw/ExpandApplicationToInitiatorTarget.py
1
7489
#!/usr/bin/env python3 __author__ = 'nick.york' __license__ = 'https://www.apache.org/licenses/LICENSE-2.0' __copyright__ = 'Copyright (c) 2015 Virtual Instruments Corporation. All rights reserved.' __date__ = '2015-02-22' __version__ = '1.0' # requires python requests module by Kenneth Reitz # http://docs.python-req...
apache-2.0
7,643,054,082,041,140,000
49.601351
338
0.646281
false
3.623125
false
false
false
Mischa-Alff/cee
plugins/InterpreterPlugin.py
1
5568
import os import sys import re from kitchen.text.converters import to_bytes import irc import plugins.BasePlugin import random import plugins.MiniSandbox class InterpreterPlugin(plugins.BasePlugin.BasePlugin, object): name = None author = None description = None connection = None interpreter_comm...
mit
-8,660,210,157,868,963,000
29.42623
78
0.518319
false
4.173913
false
false
false
chillpop/RELAX-HARDER
effects/drifters.py
1
5902
import colorsys import matplotlib.colors import numpy import random import scipy.interpolate import time from base import EffectLayer, HeadsetResponsiveEffectLayer class ColorDrifterLayer(EffectLayer): """ Interpolates between colors in a color list. Adds those values to the values already in the frame....
mit
6,132,120,900,898,517,000
44.061069
111
0.644358
false
3.482006
false
false
false