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
ros/niryo_one_ros/niryo_one_tcp_server/clients/python/examples/vision_demonstrators/2_multiple_reference_conditioning.py
paubrunet97/astrocytes
5
12796451
<filename>ros/niryo_one_ros/niryo_one_tcp_server/clients/python/examples/vision_demonstrators/2_multiple_reference_conditioning.py """ This script shows an example of how to use Niryo One's vision to make a conditioning according to the objects' color. The objects will be conditioned in a grid of dimension grid_dimens...
2.921875
3
Visualization.py
Hoeiriis/ConvForTimeSeries-Mirror
0
12796452
import matplotlib.pyplot as plt from CuteFlower2.data_loading import cd import os def save_hist_plot(history, name="test", path=None): train_errors = history.history['loss'] val_errors = history.history['val_loss'] plt.style.use('bmh') plt.plot(range(len(train_errors)), train_errors, 'g-', label="Tr...
2.640625
3
web/test/test_client.py
davisyoshida/qb-api
11
12796453
<filename>web/test/test_client.py from client import QbApi import unittest USER_ID = 0 BASE_URL = 'http://127.0.0.1:5000/qb-api/v1' API_KEY = 0 class QuizBowlClientTests(unittest.TestCase): def test_get_num_questions(self): client = QbApi(BASE_URL, USER_ID, API_KEY) num_qs = client.get_num_quest...
2.828125
3
train.py
DeepanshKhurana/udacityproject-ml-imageclassifier
0
12796454
# Imports import pandas as pd import numpy as np import torch from torch import nn from torch import optim import torch.nn.functional as F import torch.utils.data from torchvision import datasets, models, transforms from collections import OrderedDict import os import argparse # Functions def arg_parser(): ''...
2.578125
3
contrib/python/cuuid/base_x.py
Kronuz/Xapiand
370
12796455
<gh_stars>100-1000 # # Copyright (C) 2015-2018 Dubalu LLC. All rights reserved. # # 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 ...
2.125
2
tuba/run_disc.py
korhanpolat/phoenix_term_discovery
0
12796456
import argparse import sys from os.path import join from os import chdir import subprocess if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('-s', '--sge', type=str, default='nosge') parser.add_argument('-l', '--filelist', type=str, default='') parser.add_argument('-zr_root', '--...
2.375
2
models/__init__.py
lmycross/segmentation
6
12796457
from .deconvnetmodel import * from .deeplab_v2 import * from .deeplab_v2_multiscale import * from .deeplab_vggmodel import * from .dilatedmodel import * from .ducmodel import * from .fcnmodel import * from .gcnmodel import * from .linknetmodel import * from .segnetmodel import * from .tiramisu import * from .tiramisu_n...
1.054688
1
danmu/predictRecentWords.py
ShakexIngwu/crackwords
0
12796458
#!/usr/bin/env python3 import re from gensim.models import word2vec from gensim.models import KeyedVectors from operator import itemgetter filePath = '/home/ubuntu/danmu/corpusSegRecentWords.txt' fileTrainRead = [] #read the file by line with open(filePath) as fileTrainRaw: for line in fileTrainRaw: fileT...
3
3
OneEncoder_MultiDecoders/models.py
Ali-Sahili/Background-Subtraction-Unsupervised-Learning
5
12796459
import torch import torch.nn as nn from torch.autograd import Variable from Param import nc, nz, device class Model512(nn.Module): def __init__(self,nz=nz,nef=8,ngf=8,nc=nc): super(Model512, self).__init__() self.nz=nz self.nc=nc ## Encoder Part ## self.encode = nn.Se...
2.53125
3
retail store management system.py
smartinternz02/SPS-9311-Internet-of-Things
0
12796460
import time import sys import ibmiotf.application import ibmiotf.device import random import json #Provide your IBM Watson Device Credentials organization = "1tzgh7" deviceType = "iotdevice" deviceId = "0000" authMethod = "token" authToken = "<PASSWORD>" # Initialize the device client\ def myComman...
2.890625
3
__init__.py
yogi-poet/dance_furby
1
12796461
<filename>__init__.py from mycroft import MycroftSkill, intent_file_handler import subprocess class ControlFurby(MycroftSkill): def __init__(self): MycroftSkill.__init__(self) @intent_file_handler('furby.tell.intent') def handle_furby_tell(self, message): self.speak_dialog('furby.tell') ...
2.46875
2
src/denzel_cli/scripts/cli.py
eliorc/denzel
17
12796462
<reponame>eliorc/denzel from .. import commands from .. import config import click @click.group() def cli(): pass # -------- startproject -------- @cli.command() @click.argument('name', type=str) @click.option('--gpu/--no-gpu', default=False, help="Support for NVIDIA GPU", show_default=True) def startproject(n...
2.25
2
netbox_paloalto/migrations/0001_initial.py
rodvand/netbox-paloalto
26
12796463
<reponame>rodvand/netbox-paloalto<gh_stars>10-100 # Generated by Django 3.0.5 on 2020-04-18 20:25 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='FirewallConfig', ...
1.765625
2
nsd1806/python/day08/tcpserv2.py
MrWangwf/nsd1806
0
12796464
<gh_stars>0 import socket host = '' port = 12345 addr = (host, port) s = socket.socket() s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind(addr) s.listen(1) while True: try: cli_sock, cli_addr = s.accept() except KeyboardInterrupt: break print('Hello,', cli_addr) while Tr...
2.75
3
kaminskySilent.py
filipdavidovic/kaminsky_vulnerability
5
12796465
<reponame>filipdavidovic/kaminsky_vulnerability import argparse from scapy.all import ARP, Ether, sniff, sendp, send, IP, UDP, DNS, DNSQR, DNSRR from vars import ccolors import utils from arppoison import arppoison import sys import socket def silent(args): # ARP poison the vicitims (two way ARP poisoning) for...
2.609375
3
satella/instrumentation/metrics/structures/cache_dict.py
piotrmaslanka/satella
12
12796466
<reponame>piotrmaslanka/satella import logging import time import typing as tp from satella.coding.structures import CacheDict, LRUCacheDict, ExclusiveWritebackCache from satella.coding.typing import K, V from .. import Metric from ..metric_types.callable import CallableMetric from ..metric_types.counter import Counte...
2.25
2
factorial.py
CrownCrafter/School
0
12796467
import math print(math.factorial(int(input("Enter number "))))
3.4375
3
comlocal/interface/ComIFace.py
jtsiva/ComLocAL
0
12796468
from twisted.spread import pb from twisted.internet import reactor from comlocal.core.Com import Com class ComIFace (object): def __init__(self, name, port): self.readCB = None self._comiface = None self.name = name self.port = port def start(self): self._comiface = _ComIFace(self) self.tcpPort = reac...
2.296875
2
test/unit/__init__.py
Pezmc/bank2ynab
39
12796469
<reponame>Pezmc/bank2ynab<gh_stars>10-100 import sys from os.path import dirname, join, realpath project_dirname = dirname(dirname(realpath(__file__))) path = join(project_dirname, "bank2ynab") if path not in sys.path: sys.path.append(path)
2.21875
2
flaskapp/blueprints/views.py
luyisimiger/proyecto_sl_pruebas_de_carga
0
12796470
<gh_stars>0 from flask import current_app, Blueprint, render_template, redirect, url_for, request from flaskapp.logic.ab import runab views = Blueprint('views', __name__) @views.route('/') def home(): return render_template("base.html") @views.route('/ab', methods=["GET", "POST"]) def ab_get(): ...
2.578125
3
gfzs/views/header.py
yukihirop/gfzs
0
12796471
<gh_stars>0 import curses import os, sys GOOGLE = "Google" FUZZY = "Fuzzy" SEARCH = "Search" try: # need when 「python3 gfzs/views/header.py」 if __name__ == "__main__": # https://codechacha.com/ja/how-to-import-python-files/ sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file...
2.203125
2
app_modules/widgets/numpad.py
l337quez/Aplicaci-n-ANDROID-para-control-del-suministro-de-energia-
14
12796472
<reponame>l337quez/Aplicaci-n-ANDROID-para-control-del-suministro-de-energia- from kivy.uix.gridlayout import GridLayout from kivy.lang import Builder Builder.load_string(''' <NumpadBlueButton@BlueButton>: on_release: self.parent.select_btn(self.text) <Numpad>: cols: 3 rows: 4 spacing: 3, 3 Nump...
2.375
2
trained_traffic_model/image_regression.py
christnp/e6889-project
0
12796473
import numpy as np import pandas as pd from sklearn import model_selection import tensorflow as tf from pathlib import Path """ <NAME>, WAK2116, ELEN-E6889, Spring 2019 Final Project This python file trains a neural network that predicts an activity level based on a jpg image from a traffic camera ...
3.171875
3
src/utils.py
sheepy0125/some-platformer-game
0
12796474
""" Tools for Some Platformer Game Created by sheepy0125 02/10/2021 """ from pathlib import Path ############### ### Globals ### ############### ROOT_PATH: Path = Path(__file__).parent.parent #################### ### Logger class ### #################### class Logger: """Log messages with ease""" colors: di...
2.671875
3
Interface.py
BhasherBEL/LittleFather
5
12796475
<gh_stars>1-10 #!/usr/local/bin/python # coding: utf-8 import Coms import sys path = ['~'] def run() -> None: while True: input_value = input('LittleFather(' + '/'.join(path) + ') $ ').split(' ') if len(input_value) == 0: continue if not interpret(input_value): break def custom_input(): return in...
2.9375
3
dialogentail/util/math.py
nouhadziri/DialogEntailment
56
12796476
def safe_div(a, b): return (a / b) if b else 0
1.859375
2
server.py
magj3k/swiftpage
0
12796477
import os import time import webbrowser import threading from addons.addons_server import * from page import * import http.server import socketserver last_modified_time = 0 dev_page_prefix = ''' <html> <title>SwiftPage Development Server</title> <script src='https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquer...
2.21875
2
lm1b/model/model_nodes.py
samiraabnar/lm_1b_fullgraph
0
12796478
# todo: add dropout to trainer # todo: add GPU support to trainer # todo: reset lstm hidden state for inference # todo: cleanup batch_sizing inconsistencies import tensorflow as tf import re import os import lm1b.model.char_embedding_nodes as char_embedding_nodes from lm1b.utils.util import merge from lm1b.utils.model...
2.296875
2
test/test.py
simulency/Robot_Executor_Demo
0
12796479
<reponame>simulency/Robot_Executor_Demo # -*- coding: utf-8 -*- from requests import post r = post(url='http://127.0.0.1:5000/testsuit',data={'userId':'Robert'}) print(r.status_code) print(r.json())
2.109375
2
frame/snake.py
Rosikobu/snake-reloaded
0
12796480
import pygame, sys import time from pygame.math import Vector2 from .config import FPS, xSize, ySize, cell_size, cell_number, CUTTING from .eatable.saw import Saw from .eatable.cake import Cake class Snake(object): is_moving = False def __init__(self, screen: pygame.Surface) -> None: self.load_snak...
2.96875
3
menu/management/commands/send_notification.py
ben174/lunch-bot
0
12796481
<filename>menu/management/commands/send_notification.py from django.core.management.base import BaseCommand from util.mailer import send_menu_email class Command(BaseCommand): help = 'Sends today\'s menu to lunch-bot mailing list. If this menu has already been notified, it will' \ 'skip sending.' ...
2.109375
2
Vitis-AI-Profiler/xatAnalyzer/parser/cuEdge.py
dendisuhubdy/Vitis-AI
1
12796482
# Copyright 2019 Xilinx 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, so...
2.046875
2
send_alerts.py
zestedesavoir/zds-antispam
2
12796483
from bs4 import BeautifulSoup import requests def send_alerts(website, bot_username, bot_password, suspected_usernames): login_page_url = "/membres/connexion/" login_form_url = "/membres/connexion/?next=/" login_form_data = { "username": bot_username, "password": <PASSWORD>, } pro...
2.6875
3
SqrMelon/audioLibs/qtwav.py
trevorvanhoof/sqrmelon
93
12796484
from qtutil import * from audioLibs.base import Song from PyQt4.QtMultimedia import * import struct class QtWavSong(Song): def __init__(self, path): super(QtWavSong, self).__init__(path) # parse the file header # http://soundfile.sapp.org/doc/WaveFormat/ with open(path, ...
2.828125
3
prev_ob_models/McTavish2012/analysis.py
fameshpatel/olfactorybulb
5
12796485
# -*- coding: utf-8 -*- """ Created on Sun Mar 6 18:22:04 2011 @author: - """ import os import numpy from matplotlib import pyplot from neuronpy.graphics import spikeplot from bulbspikes import * from neuronpy.util import spiketrain from params import sim_var homedir = os.path.join(os.path.relpath('..')) analysis_pa...
2.28125
2
d3status/tasks/email_tasks.py
nicozhang/startUp
124
12796486
<gh_stars>100-1000 # -*- coding: utf-8 -*- # # Copyright (c) 2012 feilong.me. All rights reserved. # # @author: <NAME> <<EMAIL>> # Created on Jun 30, 2012 # from celery.task import task from d3status.mail import send_email @task def send_email_task(fr, to, subject, body, html=None, attachments=[]): send_email(f...
1.84375
2
api/tacticalrmm/agents/tasks.py
meyerje/tacticalrmm
0
12796487
import os import subprocess from loguru import logger from time import sleep import random import requests from packaging import version as pyver from django.conf import settings from tacticalrmm.celery import app from agents.models import Agent, AgentOutage from core.models import CoreSettings logger.configure(**...
2.078125
2
nitro/resource/stat/snmp/snmp_stats.py
HanseMerkur/nitro-python
2
12796488
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
1.71875
2
doctable/parallel2/workerresource.py
devincornell/sqlitedocuments
1
12796489
import collections import dataclasses import gc import multiprocessing import os from multiprocessing import Lock, Pipe, Pool, Process, Value from typing import Any, Callable, Dict, Iterable, List, NewType, Tuple, Union from .exceptions import (UserFuncRaisedException, WorkerDiedError, WorkerI...
2.453125
2
stl_rules/tr_left_turn.py
luigiberducci/mon-road
0
12796490
<filename>stl_rules/tr_left_turn.py from typing import Dict, List import numpy as np from stl_rules.stl_rule import STLRule class TrafficRuleLeftTurn(STLRule): """ This rule implement the Traffic Rule for two cars approaching a junction in opposite directions: <<[...] They may only proceed if they can s...
3.515625
4
guniflask_cli/commands/version.py
jadbin/guniflask-cli
2
12796491
import click from guniflask_cli import __version__ @click.group() def cli_version(): pass @cli_version.command('version') def main(): """ Print the version. """ Version().run() class Version: def run(self): print(f" guniflask-cli: v{__version__}") import guniflask ...
2.34375
2
environment_model/mini_pacman/model/env_copy_model.py
FlorianKlemt/pytorch-latent-i2a
3
12796492
import torch # the copy model returns the identity, # this is its own class so we dont have to change the code to use the copymodel class CopyEnvModel(torch.nn.Module): def __init__(self): super(CopyEnvModel, self).__init__() def forward(self, input_frame, input_action): return input_frame, tor...
2.671875
3
netpbmfile/__init__.py
cgohlke/netpbmfile
4
12796493
# netpbmfile/__init__.py from .netpbmfile import __doc__, __all__, __version__ from .netpbmfile import *
1.039063
1
src/players/management/commands/fetch_report.py
codacy-badger/hbscorez
0
12796494
<filename>src/players/management/commands/fetch_report.py import logging import time from datetime import timedelta from typing import List import requests from games.models import Game MAX_RETRY_DURATION: timedelta = timedelta(hours=3) RETRY_DURATIONS: List[timedelta] = [ timedelta(seconds=10), timedelta(se...
2.640625
3
wikiquote/__init__.py
guilhembn/python-wikiquotes
0
12796495
from .quotes import quotes, random_titles, search, quotes_and_authors from .qotd import quote_of_the_day from . import langs def supported_languages(): l = langs.SUPPORTED_LANGUAGES[:] l.sort() return l
1.632813
2
test/qe/compression-filter/test_compression.py
sharwell/repose
0
12796496
#!/usr/bin/env python from narwhal import repose import unittest from narwhal import conf from narwhal import pathutil import xmlrunner as _xmlrunner import logging import time import argparse import os import deproxy logger = logging.getLogger(__name__) config_dir = pathutil.join(os.getcwd(), 'etc/repose') deployme...
1.992188
2
django_stripe/templatetags/stripe.py
itsnamgyu/api-demo
1
12796497
<reponame>itsnamgyu/api-demo from django import template from django.utils.safestring import mark_safe from django_stripe import settings from django_stripe.models import * OPEN_TAG = "<script>" CLOSE_TAG = "</script>" INIT_TEMPLATE = """ var stripe = Stripe('{STRIPE_PUBLIC_KEY}'); """ BUTTON_TEMPLATE = """ $('{bu...
2.265625
2
subtract.py
Rj-Aman/tails
0
12796498
a = 3 b = 2 sub = a-b print(sub)
2.734375
3
clist/migrations/0012_auto_20191123_0953.py
horacexd/clist
166
12796499
<gh_stars>100-1000 # Generated by Django 2.1.7 on 2019-11-23 09:53 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('clist', '0011_auto_20190818_1125'), ] operations = [ migrations.AddIndex( model_name='contest', i...
1.523438
2
Packages/Dead/demo/Script/tutorials/orientation_and_output.py
xylar/cdat
62
12796500
<filename>Packages/Dead/demo/Script/tutorials/orientation_and_output.py # Adapted for numpy/ma/cdms2 by convertcdms.py # Import the modules needed for the tuturial # cdms - Climate Data Management system accesses gridded data. # vcs - Visualization and control System 1D and 2D plotting routines. # cdutil - Climate util...
2.96875
3
tests/sympc/protocol/beaver/beaver_test.py
hershd23/SyMPC
64
12796501
<gh_stars>10-100 # third party # third party import pytest from sympc.protocol import Falcon from sympc.session import Session from sympc.session import SessionManager from sympc.store import CryptoPrimitiveProvider def test_rst_invalid_triple(get_clients) -> None: parties = get_clients(3) falcon = Falcon("m...
1.976563
2
ezotv/cache_tools/__init__.py
marcsello/ezotv-frontend
0
12796502
#!/usr/bin/env python3 from .redis_client import redis_client from .cached_base_http_session import CachedBaseHttpSession
1.046875
1
reddit2telegram/channels/ani_bm/app.py
AkhzarFarhan/reddit2telegram
0
12796503
<filename>reddit2telegram/channels/ani_bm/app.py #encoding:utf-8 subreddit = 'ani_bm' t_channel = '@ani_bm' def send_post(submission, r2t): return r2t.send_simple(submission)
1.59375
2
porters/QQbot/nonebot_plugins/nonebot_porter.py
lizard1998myx/MultiBot
3
12796504
from nonebot import CommandSession, on_command from nonebot import on_natural_language, NLPSession, IntentCommand from ....requests import Request from ....responses import * from ....distributor import Distributor from ....utils import image_url_to_path from ....paths import PATHS import os, logging, traceback ...
2.203125
2
20180530_struct_hyperreal.py
randompirate/algostructures-and-datarithms
0
12796505
<filename>20180530_struct_hyperreal.py """ Hyperreal numbers as an extension of float https://en.wikipedia.org/wiki/Hyperreal_number """ class HFloat(float): """docstring for HFloat""" mul_map = { 'one' : {'one' : 'one' , 'omega' : 'omega', 'epsilon' : 'epsilon'}, 'omega' : {'one' : 'omega' , '...
3.21875
3
tests/util.py
ProstoMaxim/hupper
0
12796506
import os import subprocess import sys import tempfile import threading import time here = os.path.abspath(os.path.dirname(__file__)) class TestApp(threading.Thread): name = None args = None stdin = None daemon = True def __init__(self): super(TestApp, self).__init__() self.exitc...
2.40625
2
cli_fun/classes.py
e4r7hbug/cli-fun
0
12796507
<reponame>e4r7hbug/cli-fun<filename>cli_fun/classes.py<gh_stars>0 """FunCLI classes.""" import importlib import logging import os import sys import click class Context(object): """Shared context object for passing information between commands.""" def __init__(self): self.verbose = False def log...
2.53125
3
UnityEngine/Rendering/SphericalHarmonicsL2Array/__init__.py
Grim-es/udon-pie-auto-completion
0
12796508
<reponame>Grim-es/udon-pie-auto-completion from UdonPie import System from UdonPie import UnityEngine from UdonPie.Undefined import * class SphericalHarmonicsL2Array: def __new__(cls, arg1=None): ''' :returns: SphericalHarmonicsL2Array :rtype: UnityEngine.SphericalHarmonicsL2Array ...
2.390625
2
lnt/__init__.py
flotwig/lnt
7
12796509
name = "lnt"
1.046875
1
keymaster/common/service/randomizer.py
shiroyuki/spymaster
0
12796510
<filename>keymaster/common/service/randomizer.py<gh_stars>0 import subprocess from functools import lru_cache from typing import Callable, Dict, List from imagination.decorator.service import registered @registered() class Randomizer: def __init__(self): self.__known_generator_map: Dict[str, Callable] = ...
2.578125
3
main_scripts/main_parameter_search.py
JiaHe-yogurt/GNN
0
12796511
import os from data_loader.data_generator import DataGenerator from models.invariant_basic import invariant_basic from trainers.trainer import Trainer from Utils.config import process_config from Utils.dirs import create_dirs from Utils import doc_utils from Utils.utils import get_args from data_loader import data_help...
1.96875
2
chb/models/DllFunctionAPI.py
psifertex/CodeHawk-Binary
0
12796512
<reponame>psifertex/CodeHawk-Binary # ------------------------------------------------------------------------------ # Access to the CodeHawk Binary Analyzer Analysis Results # Author: <NAME> # ------------------------------------------------------------------------------ # The MIT License (MIT) # # Copyright (c) 2016-...
1.195313
1
app/admin.py
naritotakizawa/django-genericforeignkey-sample
0
12796513
<reponame>naritotakizawa/django-genericforeignkey-sample from django.contrib import admin from django.contrib.contenttypes.admin import GenericTabularInline from .models import Post, File, Comment class FileInline(GenericTabularInline): model = File class PostAdmin(admin.ModelAdmin): inlines = [FileInline] ...
2.015625
2
tests/seleniumwire/proxy/test_utils.py
SilverFruity/selenium-wire
0
12796514
import contextlib import os from unittest import TestCase from seleniumwire.proxy.utils import get_upstream_proxy class GetUpstreamProxyTest(TestCase): def test_get_config(self): options = { 'proxy': { 'http': 'http://username1:password1@server1:8888', 'https'...
2.640625
3
pys/classes/exceptions.py
Xithrius/Examples
0
12796515
<reponame>Xithrius/Examples class BaseErrorInheretence(Exception): pass class SpecialError(BaseErrorInheretence): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # More code here if needed raise SpecialError('stuff and things', error='something happened')
2.671875
3
dltk/core/residual_unit.py
themantalope/DLTK
1,397
12796516
<reponame>themantalope/DLTK<filename>dltk/core/residual_unit.py from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import import tensorflow as tf import numpy as np def vanilla_residual_unit_3d(inputs, ...
2.453125
2
fitness.py
IPA-HD/ldaf_classification
0
12796517
import torch import torch.nn as nn class DenseOmega(nn.Module): """ Dense (+symmetric) Omega matrix which applies to vectorized state with shape (batch, c, n, 1). """ def __init__(self, n, c): super(DenseOmega, self).__init__() self.n = n self.c = c # self.fc should...
3.09375
3
models/model_redeem_card.py
RapDoodle8080/mooli-milk-tea-management-system
1
12796518
from models.DAO import DAO from utils.exception import ValidationError from utils.validation import is_money from models.shared import find_user import string from random import randint # Prepare the char set for the coupon code # Modify the char set according to your needs # The char set contains all upper case lett...
2.640625
3
eventex/subscriptions/tests/test_view_detail.py
gustavo7lagoas/eventex_wttd
0
12796519
import uuid from django.test import TestCase from django.shortcuts import resolve_url as r from eventex.subscriptions.models import Subscription class SubscriptionDetailGet(TestCase): def setUp(self): self.obj = Subscription.objects.create( name='<NAME>', cpf='12345678901', ...
2.140625
2
NetworkConstants.py
LostMyAccount/Game-Maker-Server
3
12796520
from enum import Enum receive_codes = { "PING": 0, "HANDSHAKE": 1, "DISCONNECT": 2, } handshake_codes = { "UNKNOWN": 0, "WAITING_ACK": 1, "COMPLETED": 2 }
2.171875
2
index/urls.py
woyuanbingbuyuan/LinkedDataQuery
0
12796521
from django.urls import path from . import views urlpatterns = [ path('', views.index), path('expand', views.expand), path('upload', views.upload), path('comment', views.add_comment), path('public_data', views.get_public_data), ]
1.671875
2
tools/pr_spec2raw.py
PearCoding/PearRay
19
12796522
<gh_stars>10-100 #!/usr/bin/python # -*- coding: utf-8 -*- # Use: # pr_spec2xyz INPUT OUTPUT import sys import struct import pypearray as pr # Main if __name__ == '__main__': if len(sys.argv) != 3: print("Not enough arguments given. Need an input and output file") exit() input = sys.argv[1]...
2.75
3
DIMCREATOR/public_function.py
MINT1TINM/DIM-CREATOR
0
12796523
import MySQLdb def antisql(content): antistr=u"'|and|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|declare|;|or|-|+|,".split(u"|") for i in range (len(antistr)): if antistr[i] in content: return 1 return 0 def sql_select(text): conn=MyS...
2.953125
3
py/levels/captured.py
triffid/kiki
2
12796524
<reponame>triffid/kiki<gh_stars>1-10 # ................................................................................................................. # Level design of 'captured' by <NAME> # ................................................................................................................. level_dict[...
1.898438
2
foldit/collab_viz.py
awb-carleton/pattern-analysis
0
12796525
<filename>foldit/collab_viz.py<gh_stars>0 import colorsys import subprocess import argparse import os import csv import json import logging from itertools import groupby import pandas as pd import numpy as np import matplotlib.pyplot as plt from graphviz import Digraph from concurrent.futures import ProcessPoolExecuto...
2.265625
2
bin/output_mover.py
ndeporzio/cosmicfish
0
12796526
import os import shutil prepath_in='/n/home02/ndeporzio/projects/cosmicfish/cfworkspace/results/FINAL_RESULTS/EUCLID/EUCLID_GridPlot_' prepath_out='/n/home02/ndeporzio/projects/cosmicfish/cfworkspace/results/FINAL_RESULTS/Parsed/EUCLID/EUCLID_GridPlot_' for idx in range(120): tidx=idx//10 midx=idx%10 pat...
2.140625
2
reinforce.py
kitfactory/python_test
0
12796527
<reponame>kitfactory/python_test<filename>reinforce.py import gym import numpy as np import matplotlib.pyplot as plt # 動画の描画関数の宣言 # 参考URL http://nbviewer.jupyter.org/github/patrickmineault # /xcorr-notebooks/blob/master/Render%20OpenAI%20gym%20as%20GIF.ipynb # from JSAnimation.IPython_display import display_animatio...
2.875
3
tests/settings_test.py
uploadcare/intercom-rank
12
12796528
from app.settings import * DEBUG = False TESTING = True SQLALCHEMY_DATABASE_URI = 'sqlite:///:memory:' SERVER_NAME = 'localhost' WTF_CSRF_ENABLED = False WTF_CSRF_CHECK_DEFAULT = False WTF_CSRF_METHODS = []
1.28125
1
Desafio/ex097.py
NathanMuniz/Exercises-Python
0
12796529
<reponame>NathanMuniz/Exercises-Python def tran_titulo(tit): x = len(tit) print((x + 5) * "~") print(f" {tit}") print((x + 5) * "~") titulo_principal = "<NAME>" titulo_secundario = "Curso de Python no Youtube" paragrafo = "Cev" tran_titulo(titulo_principal) tran_titulo(titulo_secundario) tran_titul...
3.453125
3
users/migrations/0002_shifts_per_roster.py
gregcowell/roster-wizard
18
12796530
# Generated by Django 2.2 on 2019-04-24 03:05 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='customuser', name='ward_name', )...
1.5625
2
mongoDB/connections.py
Atharva-Gundawar/PyDB
0
12796531
<filename>mongoDB/connections.py # Install pymongo using 'pip install pymongo' import urllib from pymongo import MongoClient client = MongoClient() # Connect to localhost : # Format : # client = MongoClient('<host>', port_number) client = MongoClient('localhost', 27017) # or use the entire URL # client = MongoClien...
2.8125
3
myenv/Scripts/alembic-script.py
tcsnszh97/Software-engineering
6
12796532
<filename>myenv/Scripts/alembic-script.py #!e:\python\szuprojects\flasky\myenv\scripts\python3.exe # EASY-INSTALL-ENTRY-SCRIPT: 'alembic==0.8.10','console_scripts','alembic' __requires__ = 'alembic==0.8.10' import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.exit( load_entr...
1.921875
2
interact/roc.py
drugilsberg/interact
43
12796533
"""Methods used to build ROC.""" import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from sklearn.metrics import roc_curve, auc # seaborn settings sns.set_style("white") sns.set_context("paper") color_palette = sns.color_palette("colorblind") sns.set_palette(color_palette) d...
2.875
3
frappe-bench/apps/erpnext/erpnext/hr/doctype/attendance/attendance.py
Semicheche/foa_frappe_docker
0
12796534
<reponame>Semicheche/foa_frappe_docker<filename>frappe-bench/apps/erpnext/erpnext/hr/doctype/attendance/attendance.py # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils i...
2.078125
2
sdk/ml/azure-ai-ml/azure/ai/ml/_restclient/aio/_azure_machine_learning_workspaces.py
dubiety/azure-sdk-for-python
1
12796535
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
1.695313
2
tests/operators/test_op/test_csr_mul.py
KnowingNothing/akg-test
0
12796536
import numpy as np import scipy.sparse import akg from akg import tvm from akg import topi from tests.common.base import get_rtol_atol from tests.common.gen_random import random_gaussian from tests.common.tensorio import compare_tensor from akg.utils import kernel_exec as utils from akg.utils.result_analysis import ta...
1.90625
2
pywebfaction/exceptions.py
dominicrodger/pywebfaction
0
12796537
import ast EXCEPTION_TYPE_PREFIX = "<class 'webfaction_api.exceptions." EXCEPTION_TYPE_SUFFIX = "'>" def _parse_exc_type(exc_type): # This is horribly hacky, but there's not a particularly elegant # way to go from the exception type to a string representing that # exception. if not exc_type.startswi...
2.546875
3
forms.py
sarar0sa/PCAPinator
0
12796538
<filename>forms.py from flask_wtf import FlaskForm from wtforms import (StringField, IntegerField, SubmitField) from wtforms.validators import InputRequired, Length, Regexp valid_search_time = "^(19[0-9][0-9]|20[0-9][0-9])(\/)(0[1-9]|1[0-2])(\/)(0[1-9]|1[0-9]|2[0-9]|3[0-1])\+(0[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][...
2.953125
3
download/bookmarks_spreadsheet.py
quihi/fanfiction
0
12796539
<reponame>quihi/fanfiction #!/usr/bin/env python3 ''' This downloads metadata about the bookmarks in a collection on Archive of Our Own and creates a spreadsheet. It will likely work for a user's bookmark's but I haven't tried it. To use: replace BOOKMARKS with the URL that you want to summarize ...
3.484375
3
baselines/ddpg/src/simulation/Simulate_training.py
hzm2016/Peg_in_hole_assembly
25
12796540
<filename>baselines/ddpg/src/simulation/Simulate_training.py<gh_stars>10-100 # -*- coding: utf-8 -*- """ ------------------------------------------------- File Name: Simulate_main Description : Author : <NAME> date: 18-1-12 ------------------------------------------------- Change Activi...
1.890625
2
secret/migrations/0002_auto_20191230_1047.py
sgilissen/PulseSecretServer
0
12796541
# Generated by Django 2.2.9 on 2019-12-30 10:47 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('secret', '0001_initial'), ] operations = [ migrations.AlterField( model_name='secret', name='expiry_date', ...
1.421875
1
github_terminal/github_terminal.py
amritghimire/github-terminal
0
12796542
<gh_stars>0 """Main module.""" from .issue import issue from .pr import pr def handle_category_action(args): """Handle the category specific action.""" category = args.category return {'issue': issue, 'pr': pr}.get(category, issue)
2.09375
2
CursoemVideo/Desafio009.py
davihonorato/Curso-python
0
12796543
# Faça um programa que leia um número inteiro qualquer e mostre na tela a sua tabuada. n1 = int(input('Digite um número qualquer: ')) print('-'*13) print(f'1 x {n1} = {1*n1}') print(f'2 x {n1} = {2*n1}') print(f'3 x {n1} = {3*n1}') print(f'4 x {n1} = {4*n1}') print(f'5 x {n1} = {5*n1}') print(f'6 x {n1} = {6*n1}') pr...
3.9375
4
venv/lib/python3.6/site-packages/madmom/io/__init__.py
metu-sparg/higrid
8
12796544
# encoding: utf-8 """ Input/output package. """ from __future__ import absolute_import, division, print_function import io as _io import contextlib import numpy as np from .audio import load_audio_file from .midi import load_midi, write_midi from ..utils import suppress_warnings, string_types ENCODING = 'utf8' #...
2.40625
2
Plumber/Side.py
paldynaagata/plumber
0
12796545
<reponame>paldynaagata/plumber from enum import Enum class Side(Enum): Left = 0 Up = 1 Right = 2 Down = 3
2.53125
3
typhoon/examples/airflow_docker/src/tests/integration/exchange_rates_api_test.py
typhoon-data-org/typhoon-orchestrator
21
12796546
<filename>typhoon/examples/airflow_docker/src/tests/integration/exchange_rates_api_test.py<gh_stars>10-100 from datetime import date from functions import exchange_rates_api def test_xr_get(): symbols = ['EUR', 'PHP', 'HKD'] response = exchange_rates_api.get(date(2020, 1, 1), base='USD', symbols=symbols) ...
2.375
2
tests/models/test_example_add.py
TaiSakuma/acondbs
0
12796547
from acondbs.db.sa import sa from acondbs.models import Map, Beam # These tests are written primarily for the developer to understand # how models in flask_sqlalchemy work. # __________________________________________________________________|| def test_simple(app): '''A simple test of adding an object ''' ...
2.59375
3
UTAT_Matlab/Rocket Optimizer/reg_fuel.py
coursekevin/AerospikeDesign
1
12796548
<gh_stars>1-10 rho_fuel = 950 L = 0.3048 #fuel core length CHECK r_fo = 0.068/2 # Inner combustion chamber radius a0 = 0.000155 # Regression rate coeff (m/s**2) n_reg = 0.5 # Regression rate exponent, FLUX EXP??? MW_ox = 44.013 # Molecular weight/mass of N2O (kg/kmol) m_ox = #liquid ox mass in tank initial n = m_ox/M...
1.9375
2
tools/view_traces.py
PHILAE-PROJECT/agilkia
1
12796549
<gh_stars>1-10 # -*- coding: utf-8 -*- """ View the traces within an Agilkia TraceSet. It prints a one-line summary of each trace, plus some general statistics. If the TraceSet is clustered, traces will be displayed in clusters, by default. TODO: allow user to specify the 'Ok' status value (e.g. --ok=200 for HTTP res...
2.75
3
src/i3_battery_block_vgg/font_awesome_glyphs.py
vgoehler/python-i3-battery-block
0
12796550
FA_QUESTION = '\uf128' FA_LAPTOP = '\uf109' FA_PLUG = '\uf1e6' FA_BUG = '\uf188' FA_BATTERY_LIST = [ "\uf244", # empty "\uf243", # 1 quarter "\uf242", # half "\uf241", # 3 quarters "\uf240", # full ] FA_NO_BATTERY = "\uf00d " + FA_BATTERY_LIST[4]
1.40625
1