max_stars_repo_path
stringlengths
3
269
max_stars_repo_name
stringlengths
4
119
max_stars_count
int64
0
191k
id
stringlengths
1
7
content
stringlengths
6
1.05M
score
float64
0.23
5.13
int_score
int64
0
5
tia/analysis/model/ret.py
lsternlicht/tia
0
12773351
<filename>tia/analysis/model/ret.py from collections import OrderedDict import pandas as pd import numpy as np from tia.util.decorator import lazy_property from tia.analysis.model.interface import TxnPlColumns as TPL from tia.analysis.perf import drawdown_info, drawdowns, guess_freq, downside_deviation, periodicity f...
2.046875
2
babybuddy/settings/development.py
MCAdkins0/babybuddy
0
12773352
<gh_stars>0 from .base import * # Quick-start development settings - unsuitable for production # https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/ SECRET_KEY = '<PASSWORD>' DEBUG = True # Database # https://docs.djangoproject.com/en/3.0/ref/settings/#databases DATABASES = { 'default': { ...
1.664063
2
examples/example_reading_LAMDA_files.py
gica3618/pythonradex
5
12773353
<reponame>gica3618/pythonradex<gh_stars>1-10 # -*- coding: utf-8 -*- """ Created on Thu Dec 21 16:37:59 2017 @author: gianni """ from pythonradex import LAMDA_file import numpy as np data_filepath = './co.dat' #relative or absolute path to the LAMDA datafile data = LAMDA_file.read(data_filepath) levels = data['lev...
2.5625
3
apps/tests.py
roycek7/django_application
0
12773354
import unittest from django.test import Client from django.urls import reverse from rest_framework import status client = Client() class VerifyTestCases(unittest.TestCase): def setUp(self): self.valid_payload = { 'third_party_company_name': 'UD Saragih Tbk' } self.valid_payl...
2.84375
3
ocnn/octree/python/ocnn/utils/off_utils.py
FrozenSilent/O-CNN
6
12773355
""" Functions to fix off file headers """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from multiprocessing import Pool from ocnn.utils.file_utils import find_files def clean_off_file(file_name): """ Fixes header of OFF file Args: file_na...
3.125
3
py/gui/kivy/setUpGui.py
EdgardoCS/Arduino_tesis
1
12773356
from kivy.app import App from kivy.lang import Builder from kivy.properties import StringProperty, ObjectProperty from kivy.uix.floatlayout import FloatLayout from kivy.uix.anchorlayout import AnchorLayout Builder.load_string(""" <Boxes>: AnchorLayout: anchor_x: 'center' anchor_y: 'top' siz...
2.8125
3
scripts/import_adminlevels.py
mercycorps/TolaWorkflow
0
12773357
from collections import OrderedDict import csv from workflow.models import Country, Province, District, AdminLevelThree, Village """ Import admin levels from a csv file. First column should be country, second should be province, etc... Country should be created before you try to upload the file, this script will not...
2.8125
3
Languages/Python/python_study_4/page6/script.py
myarist/Progate
5
12773358
<reponame>myarist/Progate class MenuItem: # Definiskan method info def info(self): print('Tampilkan nama dan harga dari menu item') menu_item1 = MenuItem() menu_item1.name = '<NAME>' menu_item1.price = 5 # Panggil method info dari menu_item1 menu_item1.info() menu_item2 = MenuItem() menu_item2.name...
2.984375
3
scripts/scrap_author/scrap_author/pipelines.py
Tarpelite/2019Spring_SoftwareAnalysis
6
12773359
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html from scrapy.exceptions import DropItem from .spiders.scrap_authors import author,article import json """ class ScrapAuthorPipe...
2.671875
3
speedysvc/logger/time_series_data/TimeSeriesData.py
mcyph/shmrpc
4
12773360
<gh_stars>1-10 from struct import Struct from time import time, sleep from collections import deque, Counter from abc import ABC, abstractmethod from os.path import getsize, exists from _thread import allocate_lock, start_new_thread from psutil import AccessDenied # OPEN ISSUE: It might be easier to keep this to stat...
2.359375
2
secondary_market/mailsender.py
chinmaysb/fomoboard
0
12773361
from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText import smtplib # set up the SMTP server my_login = '<EMAIL>' my_server = 'smtp.office365.com' my_port = '587' my_password = <PASSWORD>#' def send_mail(to, subject, body): m...
2.84375
3
tests/test_headerfile.py
MoseleyBioinformaticsLab/chi2plookup
0
12773362
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from __future__ import print_function, division import subprocess from scipy.stats import chi2 TESTFILE_TEMPLATE = """#include <iostream> #include "Chi2PLookup.h" int main() {{ Chi2PLookup Chi2PLookupTable; double x = {0}; int df = {1}; double outvalu...
2.4375
2
SOLID/Lab/03_LSP/ducks.py
vasetousa/OOP
0
12773363
from abc import abstractmethod, ABC """ BEFORE """ # class Duck(ABC): # pass # # # class RubberDuck(Duck): # @staticmethod # def quack(): # return "Squeek" # # @staticmethod # def walk(): # """Rubber duck can walk only if you move it""" # raise Exception('I cannot walk by m...
4.375
4
src/zoslogs/utils.py
Tam-Lin/zoslogs
0
12773364
import datetime def julian_to_datetime(input_string: str): """ :param: input_string String to be converted :rtype: datetime object """ if len(input_string) == 5: date = datetime.datetime.strptime(input_string, '%y%j') elif len(input_string) == 7: date = datetime.datetime.st...
3.640625
4
growingspheres/growingspheres.py
juliendelaunay35000/APE-Adapted_Post-Hoc_Explanations
0
12773365
<reponame>juliendelaunay35000/APE-Adapted_Post-Hoc_Explanations<filename>growingspheres/growingspheres.py<gh_stars>0 #!/usr/bin/env python # -*- coding: utf-8 -*- from .utils.gs_utils import generate_inside_ball, get_distances from itertools import combinations import numpy as np from sklearn.metrics.pairwise import p...
2.90625
3
scripts/gui.py
RT-EGG/leword_vocab
0
12773366
import string import tkinter from search_option import SearchOption class GUI: def __init__(self) -> None: self.window = None self.entries_known_character = [] self.entry_contain_characters = None self.entry_remove_characters = None self.check_remove_duplicate = None ...
3.3125
3
setup.py
mmgalushka/squids
0
12773367
<gh_stars>0 """ SquiDS setup script. """ import setuptools from deeptrace import __version__ def get_long_description(): """Reads the long project description from the 'README.md' file.""" with open("README.md", "r", encoding="utf-8") as f: return f.read() setuptools.setup( name="squids", ...
1.484375
1
fermat_v2.py
Filipe-Barbos/Teste
0
12773368
# Rodar script online # https://trinket.io/features/python3 a = int(input('Digite um número qualquer: ')) result = 0 # Verificando se p é primo while True: p = int(input('Digite um número primo: ')) cont = 0 for i in range(1, p + 1): if p % i == 0: cont += 1 if cont == 2: break else: print('{} não é ...
3.984375
4
python/game/gui/tk-realtime_timer.py
rrbb014/rrbb-playground
0
12773369
import tkinter TIMER = 0 FONT = "Times New Roman" def count_up(): global TIMER TIMER += 1 label["text"] = TIMER root.after(1000, count_up) # 1초 후, count_up함수를 재실행 if __name__ == "__main__": root = tkinter.Tk() label = tkinter.Label(font=(FONT, 80)) label.pack() root.after(1000, c...
3.859375
4
examples/count_data.py
thomasaarholt/xgboost-distribution
17
12773370
"""Example of count data sampled from negative-binomial distribution """ import numpy as np from matplotlib import pyplot as plt from scipy import stats from sklearn.model_selection import train_test_split from xgboost_distribution import XGBDistribution def generate_count_data(n_samples=10_000): X = np.random.u...
3.53125
4
scripts/extract_runtime_from_logs.py
MIDA-group/itkAlphaAMD
1
12773371
<reponame>MIDA-group/itkAlphaAMD # Small script for extracting and parsing the runtimes from the logfiles of the registration tools import numpy as np def parse_log_runtime(path): keyword = "Registration time elapsed:" with open(path, 'r') as myfile: data = myfile.read() pos = data.find(keywo...
2.296875
2
topoflow/components/channels_kinematic_wave.py
mintproject/topoflow36
1
12773372
""" This file defines a "kinematic wave" channel flow component and related functions. It inherits from the channels "base class" in "channels_base.py". """ #----------------------------------------------------------------------- # Copyright (c) 2001-2019, <NAME> # # Sep 2014. New standard names and BMI updates and...
2.21875
2
code_examples/compiling_references/compiling_ref1.py
thautwarm/ebnf-parser-generator-
0
12773373
# This file is automatically generated by EBNFParser. from Ruikowa.ObjectRegex.Tokenizer import unique_literal_cache_pool, regex_matcher, char_matcher, str_matcher, Tokenizer from Ruikowa.ObjectRegex.Node import AstParser, Ref, SeqParser, LiteralValueParser, LiteralNameParser, Undef namespace = globals() recur_searcher...
2.140625
2
UserCode/cdahl/sbc_run5_make_onelines.py
RunzZhang/SBCcode
4
12773374
<filename>UserCode/cdahl/sbc_run5_make_onelines.py import numpy as np import SBCcode as sbc import os import re from SBCcode.DataHandling.WriteBinary import WriteBinaryNtupleFile as wb import pdb recondir = '/bluearc/storage/recon/devel/SBC-15/output' dd = sbc.read_bin(os.path.join(recondir, 'PMTpulseAnalysis_all.bin...
1.851563
2
B2G/gecko/browser/locales/filter.py
wilebeast/FireFox-OS
3
12773375
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. def test(mod, path, entity = None): import re # ignore anyhting but Firefox if mod not in ("netwerk", "dom", "tool...
1.992188
2
spark_fhir_schemas/stu3/complex_types/address.py
icanbwell/SparkFhirSchemas
2
12773376
<reponame>icanbwell/SparkFhirSchemas<gh_stars>1-10 from typing import Union, List, Optional from pyspark.sql.types import StructType, StructField, StringType, ArrayType, DataType # This file is auto-generated by generate_schema so do not edit manually # noinspection PyPep8Naming class AddressSchema: """ An a...
2.484375
2
biothings-hub/files/nde-hub/hub/dataload/sources/dde/uploader.py
NIAID-Data-Ecosystem/nde-crawlers
0
12773377
<gh_stars>0 from hub.dataload.nde import NDESourceUploader class DDEUploader(NDESourceUploader): name = "dde"
1.34375
1
results/results/urls.py
gnufede/results
0
12773378
from django.conf.urls import patterns, include, url from django.views.generic import TemplateView from django.contrib.auth.views import * # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^$', TemplateView.as_view(template_na...
1.796875
2
cpsc217/as2/linguistics.py
edwardchen123/UofC
1
12773379
<reponame>edwardchen123/UofC<filename>cpsc217/as2/linguistics.py<gh_stars>1-10 #CPSC 217 Assignment 2 - Computational Linguistics #<NAME> #10023875 import sys file = sys.stdin.readlines() #input sorting and handling d = {} linecount = 0 wordcount = 0 for line in file: linecount += 1 for word in line.split(' '): ...
3.390625
3
language/python/Lib_urllib/urlencode.py
LIU2016/Demo
1
12773380
<filename>language/python/Lib_urllib/urlencode.py<gh_stars>1-10 ''' url encode decode ''' from urllib.parse import urljoin,unquote,quote,parse_qs,parse_qsl query="key=1000&value=00000" result=parse_qs(query) result1=parse_qsl(query) print(result) print(result1)
2.515625
3
analysis/legacy/plot_massComparison_ML.py
Fizzics/desCluster
2
12773381
import pylab as pyl from astLib import astStats from sklearn.metrics import median_absolute_error, mean_squared_error import h5py as hdf from matplotlib.ticker import AutoMinorLocator def calc_err(pred, true): return (pred - true)/true golden_mean = (pyl.sqrt(5.)-1.0)/2.0 f = pyl.figure(figsize=(10,10*golden_mean...
2.21875
2
src/pyrin/task_queues/celery/cli/interface.py
wilsonGmn/pyrin
0
12773382
<reponame>wilsonGmn/pyrin # -*- coding: utf-8 -*- """ celery cli interface module. """ from pyrin.cli.base import CLIHandlerBase from pyrin.cli.params import CLIParamBase from pyrin.core.globals import LIST_TYPES class CeleryCLIParamBase(CLIParamBase): """ celery cli param base class. all celery cli par...
2.171875
2
Algorithms/tf2algos/base.py
familywei/RLs
0
12773383
import os import numpy as np import tensorflow as tf from utils.recorder import RecorderTf2 as Recorder class Base(tf.keras.Model): def __init__(self, a_dim_or_list, action_type, base_dir): super().__init__() physical_devices = tf.config.experimental.list_physical_devices('GPU') if len(p...
2.484375
2
src/common_utils_data/config_table.py
Mi524/common_utils_data
0
12773384
<filename>src/common_utils_data/config_table.py<gh_stars>0 import gc import re import sys import warnings import os import time from datetime import datetime import warnings import numpy as np import pandas as pd import hashlib from xlsxwriter import Workbook from collections import defaultdict...
2.296875
2
stac_api/config.py
waseem-aidash/arturo-stac-api
0
12773385
"""Application settings.""" import enum from typing import Optional, Set from pydantic import BaseSettings # TODO: Move to stac-pydantic class ApiExtensions(enum.Enum): """Enumeration of available stac api extensions. Ref: https://github.com/radiantearth/stac-api-spec/tree/master/extensions """ con...
2.171875
2
examples/exampleApp16.py
dirk-attraktor/pyHtmlGui
0
12773386
<reponame>dirk-attraktor/pyHtmlGui import os import sys import time import subprocess from pyhtmlgui import PyHtmlGui, PyHtmlView, Observable class App(Observable): pass class AppView(PyHtmlView): TEMPLATE_STR = ''' <p>i am a button calling a method of the python frontend object</p> <button o...
2.4375
2
python/utilityFuncs.py
tianran/glimvec
9
12773387
from __future__ import absolute_import from __future__ import division from __future__ import print_function import six import sys import heapq def readerLine(fn): with open(fn, 'rb') as file: while True: yield next(file).decode('utf-8').rstrip('\r\n') def show_top(k, scores, lst): h = [] for i, s ...
2.875
3
upman/schemas/reporter_schema.py
marcsello/upman
0
12773388
#!/usr/bin/env python3 from marshmallow import fields from marshmallow_sqlalchemy import SQLAlchemyAutoSchema from model import Reporter class ReporterSchema(SQLAlchemyAutoSchema): name = fields.String(required=True) key = fields.String(required=True) class Meta: dump_only = ['id', 'created', 'i...
2.21875
2
estacao/tests/modules/test_modules.py
fpcardoso/projeto-estacao-meteorologica
0
12773389
from unittest import main, TestCase from modules.bmp280 import BMP280 bmp = BMP280() bmp.start() class TestModuleBMP280(TestCase): def test_read_temperatura(self): medida_temperatura = bmp.read('Temperatura') assert (medida_temperatura >= 0) or (medida_temperatura <= 100) def test_read_press...
3.078125
3
plugins/trendmicro_apex/icon_trendmicro_apex/util/util.py
lukaszlaszuk/insightconnect-plugins
46
12773390
import base64 import jwt import hashlib import time from datetime import timedelta from datetime import datetime DEFAULT_TASK_TYPE = "CMEF" class TaskType: @staticmethod def value_of(task_type: str) -> int: return { "UNKNOWN": 1, "INTERNAL": 2, "CM": 3, ...
2.46875
2
pizzaapp/migrations/0016_usercart.py
vivekx01/pizzaapp-v2
1
12773391
<gh_stars>1-10 # Generated by Django 3.2.3 on 2021-05-28 09:39 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pizzaapp', '0015_auto_20210528_1157'), ] operations = [ migrations.CreateModel( name='usercart', ...
1.828125
2
plots/plot_lead.py
kmkolasinski/Bubel
0
12773392
#!/usr/bin/python import numpy as np import matplotlib.pyplot as plt import csv from xml.dom import minidom from matplotlib.collections import LineCollection from numpy import linalg as LA xmldoc = minidom.parse('lead.dat') file = "lattice.dat" xml_shape_type = xmldoc.getElementsByTagName('shape_type') xml_shape_dat...
2.6875
3
discogspy/core/rq_database.py
cpow-89/discogspy
0
12773393
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/02_core.rq_database.ipynb (unless otherwise specified). __all__ = ['get_release', 'get_user_release_rating', 'update_user_release_rating', 'delete_user_release_rating', 'get_community_release_rating', 'get_master_release', 'get_releases_related_to_master_relea...
2.53125
3
01-algorithmic-design-and-techniques/week-4/inversions.py
andrewnachtigal/UCSD-Algorithms
0
12773394
<reponame>andrewnachtigal/UCSD-Algorithms #!/user/bin/python '''Number of Inversions '''
1.320313
1
config.py
Go2SleepSoshi/ct_test
0
12773395
<reponame>Go2SleepSoshi/ct_test<gh_stars>0 token = '' db_name = 'testDB.db'
0.9375
1
src/automotive/application/testcase/reader/standard_excel_reader_sample.py
philosophy912/automotive
0
12773396
# -*- coding:utf-8 -*- # -------------------------------------------------------- # Copyright (C), 2016-2021, lizhe, All rights reserved # -------------------------------------------------------- # @Name: standard_excel_reader.py # @Author: lizhe # @Created: 2021/7/3 - 22:14 # --------------------------...
2.078125
2
lib/cogs/help.py
yosiz/msf-alliance-bot
0
12773397
<filename>lib/cogs/help.py from typing import Optional from discord import Embed from discord.utils import get from discord.ext.commands import Cog, command, Context from discord.ext.menus import MenuPages, ListPageSource name = "help" def syntax(cmd: command): cmd_and_aliases = "|".join([str(cmd), *cmd.aliase...
2.53125
3
examples/draw_3D_test.py
c12qe/HFSSdrawpy
8
12773398
import os import HFSSdrawpy.libraries.example_elements as elt from HFSSdrawpy import Body, Modeler from HFSSdrawpy.parameters import GAP, TRACK # import HFSSdrawpy.libraries.base_elements as base pm = Modeler("hfss") relative = pm.set_variable("1mm") main = Body(pm, "main") chip = Body(pm, "chip", rel_coor=[["1mm...
2.296875
2
series_tiempo_ar_api/apps/metadata/migrations/0004_auto_20181219_1227.py
datosgobar/series-tiempo-ar-api
28
12773399
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2018-12-19 15:27 from __future__ import unicode_literals import django.contrib.postgres.fields.jsonb from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('metadata', '0003_metadataconfig'), ] op...
1.703125
2
DSSPparser/pdbToxssp.py
neolei/DSSPparser
10
12773400
# This example client takes a PDB file, sends it to the REST service, which # creates HSSP data. The HSSP data is then output to the console. # api by https://github.com/cmbi/xssp-api/blob/master/xssp_api/frontend/api/endpoints.py import json import requests import time REST_URL = "https://www3.cmbi.umcn.nl/xssp/" ...
2.875
3
terrascript/data/davidji99/herokux.py
mjuenema/python-terrascript
507
12773401
# terrascript/data/davidji99/herokux.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:18:42 UTC) import terrascript class herokux_addons(terrascript.Data): pass class herokux_kafka_mtls_iprules(terrascript.Data): pass class herokux_postgres_mtls_certificate(terrascript.Data): pass c...
1.390625
1
13/tidyprop.py
Gridelen/core-python-ex
1
12773402
<reponame>Gridelen/core-python-ex<gh_stars>1-10 class HideX(object): # def x(): # def fget(self): # return ~self.__x # def fset(self, x): # assert isinstance(x, int), 'x must be int' # self.__x = ~x # return locals() # x = property(**x()) @property def x(self): return ~self.__x @x.setter def x(s...
3.21875
3
scripts/run.py
mhw32/contrastive-learning-scaffold
1
12773403
import os import torch from copy import deepcopy from src.agents.agents import * from src.utils.setup import process_config from src.utils.utils import load_json def run(config_path, gpu_device=-1): config = process_config(config_path) if gpu_device >= 0: config.gpu_device = [gpu_device] AgentClas...
2.171875
2
get_awap.py
tammasloughran/get_awap
1
12773404
<reponame>tammasloughran/get_awap #!/usr/bin/env python """get_awap.py downloads AWAP data from the BoM and converts it to netcdf. Usage: python get_awap.py ddmmyyyy-DDMMYYYY VAR ddmmyyyy-DDMMYYYY - is the period to download VAR - is the variable to download. Use either tmax, tmin, rain, 9amvapr, or 3pmvapr. eg. pyt...
2.8125
3
game/path_game/actor.py
CospanDesign/python
5
12773405
import os import pygame from game_defines import DIRECTIONS ASSET_BASE = os.path.join(os.path.dirname(__file__), "assets") class Actor(object): @staticmethod def asset(name): return os.path.join(ASSET_BASE, name) def __init__(self, name, image_path, actor_type, startx, starty): self...
2.921875
3
exam2/image/test.py
kkkarnav/ashoka
1
12773406
import math from images_fcp import * array = readImage("lenna.png") width, height = len(array[0]), len(array) # 2560, 1707 kernel = [ [0, -1, 0], [-1, 5, -1], [0, -1, 0] ] # turn the array left by 90 degrees def transpose(A): B = [[(255, 255, 0) for row in A] for column in A[0]] assert(len(B[0]) == len(A)) ...
3.28125
3
coupled-harmonic-oscillator/test_cho.py
guiltygyoza/rk4-starknet
18
12773407
<reponame>guiltygyoza/rk4-starknet import pytest from starkware.starknet.testing.starknet import Starknet from timeit import default_timer as timer @pytest.mark.asyncio async def test_dict(): starknet = await Starknet.empty() print() contract = await starknet.deploy("cho.cairo") ## note: if passing ...
2.25
2
artemis/utils/basic.py
StanfordGeometryLab/artemis
254
12773408
""" Various simple (basic) functions in the "utilities". The MIT License (MIT) Originally created at 8/31/20, for Python 3.x Copyright (c) 2021 <NAME> (<EMAIL>) & Stanford Geometric Computing Lab """ import torch import multiprocessing as mp import dask.dataframe as dd from torch import nn from sklearn.model_selectio...
2.859375
3
T07-00/program.py
maa76/SSof-Project1920
2
12773409
<filename>T07-00/program.py a = source() sink(a)
0.921875
1
bot-stopots/funcoes.py
leosantosx/bot-stopots
2
12773410
from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from functools import partial from time import sleep from variaveis import * from controler_palavras import buscar_palavra from aprende import adicionar_resposta import os def iniciar(browser, botao_entrada, nome=''): ...
2.921875
3
pizza_modules/pizza_combination.py
Freeways/hashcode2017-practice
1
12773411
<filename>pizza_modules/pizza_combination.py """ Generate all possible slice shapes from max to min """ from math import sqrt def generate(min, max): if min < 1 or max < 1: raise ValueError('min : {min} & max :{max} must be > 0'.format(min, max)) slices = [] for count in range(min, max+1)[::-1]: slice = {} ...
3.78125
4
1-99/50-59/52.py
dcragusa/LeetCode
0
12773412
""" The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n, return the number of distinct solutions to the n-queens puzzle. Example: Input: 4, Output: 2 Explanation: There are two distinct solutions to the 4-queens puzzle as shown belo...
4.03125
4
djangox2/apps.py
DrPayne25/djangoX
0
12773413
from django.apps import AppConfig class Djangox2Config(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'djangox2'
1.367188
1
pyfos/pyfos_brocade_time.py
madhavinaiduprathap/pyfosbrocade
44
12773414
<reponame>madhavinaiduprathap/pyfosbrocade # Copyright 2018 Brocade Communications Systems LLC. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may also obtain a copy of the License at # http://www.apache....
1.9375
2
mosaic.py
karttur/geoimagine02-ancillary
0
12773415
<reponame>karttur/geoimagine02-ancillary ''' Created on 11 Mar 2021 @author: thomasgumbricht ''' from os import path, makedirs, walk from sys import exit from geoimagine.ktgdal import MakeMosaic class MosaicAncillary(): ''' class for downloading ancillary data''' def __init__(self, pp): '''...
2.140625
2
trackeroo-real-time/chalicelib/models.py
Wahuh/wurkout-api
3
12773416
<gh_stars>1-10 import boto3 from .db import connection import uuid import json from decimal import Decimal _users_table = connection.Table("users") _runs_table = connection.Table("runs") _followers_table = connection.Table("followers") _subscriptions_table = connection.Table("subscriptions") _connections_table = conne...
2.21875
2
src/states/gameoverstate.py
Rishikesh-kumar-7258/Block_breaker
20
12773417
<reponame>Rishikesh-kumar-7258/Block_breaker import pygame from pygame.color import THECOLORS from src.states.basestate import Base from src.utilfuntions import Write class GameOver(Base): """ This state is active when game is over. """ def __init__(self) -> None: super().__init__() ...
3.125
3
python/server.py
talp101/upload-files-comparison
6
12773418
<reponame>talp101/upload-files-comparison import os import json from uuid import uuid4 from flask import Flask, request, redirect, url_for, jsonify from werkzeug import secure_filename UPLOAD_FOLDER = './uploads' app = Flask(__name__) app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER @app.route('/upload', methods=['POST'...
2.796875
3
lib/doekbase/data_api/tests/test_genome_annotation_api.py
scanon/data_api2
0
12773419
<reponame>scanon/data_api2 """ Unit tests for genome_annotation """ import logging from unittest import skipUnless from . import shared from doekbase.data_api.annotation.genome_annotation.api import GenomeAnnotationAPI from doekbase.data_api.annotation.genome_annotation.api import _KBaseGenomes_Genome from doekbase.d...
1.6875
2
deeplearning/ml4pl/models/batch.py
Zacharias030/ProGraML
0
12773420
# Copyright 2019 the ProGraML authors. # # Contact <NAME> <<EMAIL>>. # # 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...
2.546875
3
colour/models/tests/tests_cie_ucs.py
canavandl/colour
1
12773421
<reponame>canavandl/colour #!/usr/bin/env python # -*- coding: utf-8 -*- """ Defines unit tests for :mod:`colour.models.cie_ucs` module. """ from __future__ import division, unicode_literals import numpy as np import sys if sys.version_info[:2] <= (2, 6): import unittest2 as unittest else: import unittest ...
2.359375
2
src/sage/groups/libgap_group.py
fchapoton/sage
1,742
12773422
<gh_stars>1000+ """ Generic LibGAP-based Group This is useful if you need to use a GAP group implementation in Sage that does not have a dedicated Sage interface. If you want to implement your own group class, you should not derive from this but directly from :class:`~sage.groups.libgap_wrapper.ParentLibGAP`. EXAMPL...
1.84375
2
instauto/helpers/models.py
javad94/instauto
0
12773423
<reponame>javad94/instauto import dataclasses from typing import ByteString, List, Optional, Tuple @dataclasses.dataclass class FriendshipStatus: following: bool is_private: Optional[bool] incoming_request: Optional[bool] outgoing_request: Optional[bool] is_bestie: bool is_restricted: bool @classmetho...
2.546875
3
template/language/vc.py
clayne/syringe-1
25
12773424
<reponame>clayne/syringe-1 ''' This module is based on the ndk.exception library module. Please consider using that module instead of this one. ''' import ptypes, ndk, ndk.exception from ndk.exception import * class vtable_ptr(PVOID): pass class type_info(TypeDescriptor): pass class exception(pstruct.type): _fie...
1.609375
2
sc2ai/actorcritic/agent.py
telecombcn-dl/2017-dlai-team5
9
12773425
import collections import os import numpy as np import tensorflow as tf from pysc2.lib import actions from tensorflow.contrib import layers from tensorflow.contrib.layers.python.layers.optimizers import OPTIMIZER_SUMMARIES from actorcritic.policy import FullyConvPolicy from common.preprocess import ObsProcesser, FEATUR...
1.867188
2
djangoerp/core/signals.py
xarala221/django-erp
345
12773426
#!/usr/bin/env python """This file is part of the django ERP project. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLD...
1.960938
2
funky_horse/__init__.py
AlexandreBidon/Funky-Horse
0
12773427
<filename>funky_horse/__init__.py from .random_color_palette import RandomColorPalette import os, random from cairosvg import svg2png class FunkyHorse(): def __init__(self): self.__svg_list = [] self.__create() def __create(self): self.__svg_list.clear() self.color_palette = ...
2.8125
3
forumdemo/comment/models.py
lamdba0602/forumdemo
0
12773428
from django.db import models from django.contrib.auth.models import User from article.models import Article class Comment(models.Model): owner = models.ForeignKey(User, verbose_name="作者") article = models.ForeignKey(Article, verbose_name="文章ID") content = models.CharField("评论内容", max_length=1000) to_...
2.140625
2
decrypt.py
nciefeiniu/wenshu
57
12773429
import re import base64 from urllib.parse import urljoin _pattern = re.compile(r"dynamicurl\|(?P<path>.+?)\|wzwsquestion\|(?P<question>.+?)\|wzwsfactor\|(?P<factor>\d+)") def decrypt_wzws(text: str) -> str: # noinspection PyBroadException try: return _decrypt_by_python(text) except Exception: ...
3.09375
3
mayan/apps/appearance/handlers.py
CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons
2
12773430
<gh_stars>1-10 from django.apps import apps def handler_user_theme_setting_create(sender, instance, created, **kwargs): UserThemeSetting = apps.get_model( app_label='appearance', model_name='UserThemeSetting' ) if created: UserThemeSetting.objects.create(user=instance)
2.015625
2
scripts_figs/hovmoller_1year_sims.py
deepsphere/deepsphere-weather
38
12773431
<gh_stars>10-100 #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Aug 19 13:12:02 2021 @author: ghiggi """ import os os.chdir("/home/ghiggi/Projects/deepsphere-weather") import dask import matplotlib import numpy as np import cartopy.crs as ccrs import xarray as xr import matplotlib.pyplot as plt ## ...
1.695313
2
apps/barb_example/main.py
cemac/forest
20
12773432
"""Matplotlib-esque usage of barbs in Typescript/Bokeh Additional comment """ import bokeh.plotting from forest import wind # Magic to extend bokeh.Figure def main(): """Example using forest.wind.Barb""" x=[0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3] y=[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3] u = [i*10 for i in x] ...
3.03125
3
data_files/gen_csv.py
RichieBrady/SimAPI-Python
1
12773433
import csv import random import sys def populate_test_csv(): f = open('test.csv', 'w') with f: input_fields = ['time_step', 'PlantOnSched', 'HeatingSetpointSchedule'] temp_change = [1, -1] plant_on_sched_last = 52 heating_setpoint_schedule_last = 20 writer = csv.DictW...
3.09375
3
pybamm/models/submodels/interface/inverse_kinetics/inverse_butler_volmer.py
zlgenuine/pybamm
0
12773434
<gh_stars>0 # # Inverse Bulter-Volmer class # import pybamm from .base_inverse_kinetics import BaseInverseKinetics from ..kinetics.butler_volmer import ButlerVolmer class InverseButlerVolmer(BaseInverseKinetics, ButlerVolmer): """ A base submodel that implements the inverted form of the Butler-Volmer relation...
2.953125
3
teamcat_service/docker_build/target/one_step_build/teamcat/doraemon/home/pagefactory/home_template_path.py
zhangyin2088/Teamcat
6
12773435
#coding=utf-8 ''' Created on 2015-10-10 @author: Devuser ''' class HomeTaskPath(object): left_nav_template_path="home/home_left_nav.html" sub_nav_template_path="task/home_task_leftsub_nav.html" task_index_path="task/home_task_index.html" class HomeProjectPath(object): left_nav_template_path="home/ho...
1.78125
2
kumo/kumo.py
lightnet328/kurokumo
48
12773436
<reponame>lightnet328/kurokumo<gh_stars>10-100 # coding: utf8 from twitter import * from xml.sax.saxutils import * from . import normalize_neologd as Normalizer import MeCab import matplotlib.pyplot as plt from collections import Counter from wordcloud import WordCloud import io import base64 class Kumo: def __ini...
2.609375
3
4th_100/problem346.py
takekoputa/project-euler
0
12773437
<filename>4th_100/problem346.py # Problem: https://projecteuler.net/problem=346 """ Repunits of n digits of base b has the form of (in base 10) r(b, n) = 1 + b + b^2 + ... + b^(n-2) + b^(n-1) = (b^n-1)/(b-1) For any positive integer b, n = 1: r(b...
3.609375
4
core/agents/default_agent.py
Yoshi-0921/MAEXP
0
12773438
<reponame>Yoshi-0921/MAEXP # -*- coding: utf-8 -*- """Source code for dqn agent class. Author: <NAME> <<EMAIL>> """ from random import random from .abstract_agent import AbstractAgent class DefaultAgent(AbstractAgent): def get_action(self, state, epsilon): if random() < epsilon: action = s...
2.609375
3
static_2d_FM_TFIsing__field_large_to_0/fig_gather/make_fig_gather.py
ryuikaneko/exact_diagonalization_dynamics
1
12773439
#!/usr/bin/env python # coding:utf-8 from __future__ import print_function #import sys import re import glob import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt all_files = glob.glob('../*/dat_L*_tau_inf') list_L = [] list_N = [] list_mx = [] list_mz0mz1 = [] list_ene = [] for ...
2.421875
2
tests/test_vmtkScripts/test_vmtkimagecompose.py
ramtingh/vmtk
0
12773440
<filename>tests/test_vmtkScripts/test_vmtkimagecompose.py<gh_stars>0 ## Program: VMTK ## Language: Python ## Date: January 10, 2018 ## Version: 1.4 ## Copyright (c) <NAME>, <NAME>, All rights reserved. ## See LICENSE file for details. ## This software is distributed WITHOUT ANY WARRANTY; without even...
2.296875
2
Winter 2017/lec7/codingpractice.py
hyunjaemoon/pythonteaching
0
12773441
#Link Class is given! class Link: """A linked list. >>> s = Link(1, Link(2, Link(3))) >>> s.first 1 >>> s.rest Link(2, Link(3)) """ empty = () def __init__(self, first, rest=empty): assert rest is Link.empty or isinstance(rest, Link) self.first = first self...
4.21875
4
vendor/home/python/home_daemon.py
hvos234/raspberrypi.home.website
0
12773442
<reponame>hvos234/raspberrypi.home.website<filename>vendor/home/python/home_daemon.py #!/usr/bin/env python # -*- coding: utf-8 -*- import subprocess, time # the subprocess.call by start and stop will return failt when you try to # start the daemon if it is already started this is also with stop, if the status ...
2.875
3
Semestre_2018_2/Taller/Python/punto4_3.py
SherylA/Archivo_Fundamentos
0
12773443
<gh_stars>0 import math N=int(input("Ingrese el grado del polinomio 1: ")) M=int(input("Ingrese el grado del polinomio 2: ")) GradRes=max(N+1,M+1) coef1=[0.0]*GradRes coef2=[0.0]*GradRes for i in range(0,N+1): coef1[i]=float(input("Ingrese el coef de x^%d "%i)) for i in range(0,M+1): coef2[i]=float(input("Ingrese ...
3.515625
4
quant/markets/market.py
doubleDragon/QuantBot
7
12773444
<filename>quant/markets/market.py<gh_stars>1-10 #!/usr/bin/env python # -*- coding: UTF-8 -*- import logging import time from quant import config class Market(object): """ eth_btc base_currency :btc quote_currency:eth """ def __init__(self, base_currency, market_currency, pair_code, ...
2.578125
3
TheSeller/run_game.py
KolegaLiterat/imadethis
0
12773445
#libs import pygame import datetime #modules from modules.gui import UserInterface from modules.sprites import Sprites from modules.supplies import Supplies from modules.workers import Workers from modules.demand import Demand from modules.gamelogic import Actions pygame.init() window = pygame.display.se...
2.46875
2
src/canvas.py
vt-sailbot/sailbot-18
1
12773446
<gh_stars>1-10 """ Reads the Airmar three times, probably was used for testing """ import airmar_reader as ar import time ar.print_airmar_sentence_contents = True ar.setup() ar.read_airmar() time.sleep(1) ar.read_airmar() time.sleep(1) ar.read_airmar()
1.851563
2
security/enums/hash_type.py
LiquidFun/stegowav
0
12773447
<reponame>LiquidFun/stegowav from enum import Enum class HashType(Enum): NONE = 0 PBKDF2 = 1 SCRYPT = 2
2.0625
2
python/testData/inspections/PyRedundantParenthesesInspection/ParenthesizedTupleWithUnpackingInYield.py
tgodzik/intellij-community
2
12773448
<filename>python/testData/inspections/PyRedundantParenthesesInspection/ParenthesizedTupleWithUnpackingInYield.py def func(xs): yield <weak_warning descr="Remove redundant parentheses">(42, *xs)</weak_warning>
1.757813
2
netavg/jobs/minimization.py
grollins/netavg-django
1
12773449
#!/usr/bin/env python # encoding: utf-8 import argparse import prody import os import shutil import subprocess import numpy from os.path import join GMX_PATH = '/usr/local/gromacs/bin/' mdp_string = ''' define = -DPOSRES integrator = {integrator} nsteps = 1000 emtol = 1 nstlist = 1 coulombtype = Cut-off vdwtype =...
2.34375
2
main.py
rice-lords-telles/googles-hash-code-2020
0
12773450
<reponame>rice-lords-telles/googles-hash-code-2020 from utils import get_input, TEST_INPUTS, write_output_to_files from collections import OrderedDict from brute_force import as_they_come_algorithm # can you see this? # can you edit this # This is Roy # hello hello # Possible Data Structure # { # total_books: 0, #...
3.359375
3