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
neuralmonkey/nn/projection.py
Simon-Will/neuralmonkey
5
16500
"""Module which implements various types of projections.""" from typing import List, Callable import tensorflow as tf from neuralmonkey.nn.utils import dropout def maxout(inputs: tf.Tensor, size: int, scope: str = "MaxoutProjection") -> tf.Tensor: """Apply a maxout operation. Implementa...
3.546875
4
test_default_application/application.py
Ca11MeE/dophon
1
16501
<filename>test_default_application/application.py # properties detail please read \ # default_properties.py in dophon_properties module \ # inside your used dophon module package. # author: CallMeE
1.085938
1
afk.py
bsoyka/sunset-bot
1
16502
<filename>afk.py from datetime import datetime from textwrap import shorten from typing import Optional, Union import discord from discord.abc import Messageable from discord.errors import Forbidden from discord.ext.commands import Bot, Cog, Context, check, command, is_owner from discord.utils import get fr...
2.765625
3
dice/dice.pyde
ahoefnagel/ProjectA-Digital-Components
0
16503
<reponame>ahoefnagel/ProjectA-Digital-Components<filename>dice/dice.pyde # The shape of the numbers for the dice dice = { 1: [[None, None, None], [None, "", None], [None, None, None]], 2: [["", None, None], [None, None, None], [None, None, ""]], 3: [["", None, None], [None, "", None], [None, None, ""]],...
3.703125
4
src/pdf/domain/encrypt.py
ichiro-kazusa/PDFCon
0
16504
<filename>src/pdf/domain/encrypt.py from ..command.encrypt import EncryptionCommand class Encryption: def __init__(self, owner: str = '', user: str = '') -> None: self.__owner = owner self.__user = user self.__verify_entries() @property def owner(self): return self.__own...
3.125
3
photos/migrations/0002_auto_20190616_1812.py
savannah8/The-gallery
0
16505
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2019-06-16 15:12 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('photos', '0001_initial'), ] operations = [ migrations.RemoveField( model_...
1.53125
2
scripts/old_scripts/test1.py
noambuckman/mpc-multiple-vehicles
1
16506
import time, datetime, argparse import os, sys import numpy as np np.set_printoptions(precision=2) import matplotlib.pyplot as plt import copy as cp import pickle PROJECT_PATH = '/home/nbuckman/Dropbox (MIT)/DRL/2020_01_cooperative_mpc/mpc-multiple-vehicles/' sys.path.append(PROJECT_PATH) import casadi as cas import ...
1.992188
2
RenameMaps.py
uesp/uesp-dbmapscripts
0
16507
<reponame>uesp/uesp-dbmapscripts<filename>RenameMaps.py import os import sys import shutil import re INPUT_PATH = "d:\\dbmaps\\test\\final\\" OUTPUT_PATH = "d:\\dbmaps\\test\\zoom17\\" for filename in os.listdir(INPUT_PATH): InputFile = INPUT_PATH + filename matchResult = re.search('([a-zA-Z]+)-...
2.453125
2
my/rtm.py
almereyda/HPI
0
16508
<reponame>almereyda/HPI """ [[https://rememberthemilk.com][Remember The Milk]] tasks and notes """ REQUIRES = [ 'icalendar', ] import re from pathlib import Path from typing import Dict, List, Optional, Iterator from datetime import datetime from .common import LazyLogger, get_files, group_by_key, cproperty, mak...
2.3125
2
learnpython/fib.py
Octoberr/swm0920
2
16509
# def fib2(n): # 返回到 n 的斐波那契数列 # result = [] # a, b = 0, 1 # while b < n: # result.append(b) # a, b = b, a+b # return result # # a = fib2(500) # print(a) def recur_fibo(n): """递归函数 输出斐波那契数列""" if n <= 1: return n else: return(recur_fibo(n-1) + recur_fibo(n-2))...
3.609375
4
taco/tests/aws_wrappers/dynamodb/integration/consts.py
Intsights/taco
18
16510
<gh_stars>10-100 import taco.aws_wrappers.dynamodb_wrapper.consts as dynamodb_consts from taco.boto3.boto_config import Regions DEFAULT_REGION = Regions.n_virginia.value RESPONSE_KEY_NAME = 'Responses' PRIMARY_KEY_NAME = 'KEY1' ATTRIBUTE_DEFINITIONS = [ dynamodb_consts.property_schema(PRIMARY_KEY_NAME, dynamodb_c...
1.898438
2
examples/HMF_oxidation_WO3/model.py
flboudoire/chemical-kinetics
0
16511
<gh_stars>0 import numpy as np from scipy import constants measured_species = ["HMF", "DFF", "HMFCA", "FFCA", "FDCA"] all_species = measured_species.copy() all_species.extend(["H_" + s for s in measured_species]) all_species.extend(["Hx_" + s for s in measured_species]) def c_to_q(c): c_e = list() for i, ...
2.375
2
cayennelpp/tests/test_lpp_type_humidity.py
smlng/pycayennelpp
16
16512
<filename>cayennelpp/tests/test_lpp_type_humidity.py import pytest from cayennelpp.lpp_type import LppType @pytest.fixture def hum(): return LppType.get_lpp_type(104) def test_humidity(hum): val = (50.00,) hum_buf = hum.encode(val) assert hum.decode(hum_buf) == val hum_buf = hum.encode(50.25) ...
2.109375
2
src/frogtips/api/__init__.py
FROG-TIPS/frog.tips-python-client
2
16513
<filename>src/frogtips/api/__init__.py from frogtips.api.Credentials import Credentials from frogtips.api.Tip import Tip from frogtips.api.Tips import Tips
1.289063
1
scripts/studs_dist.py
inesc-tec-robotics/carlos_controller
0
16514
<reponame>inesc-tec-robotics/carlos_controller<filename>scripts/studs_dist.py #!/usr/bin/env python from mission_ctrl_msgs.srv import * from studs_defines import * import rospy import time import carlos_vision as crlv from geometry_msgs.msg import PointStamped from geometry_msgs.msg import PoseArray from geometry_msgs...
2.140625
2
code/bodmas/utils.py
whyisyoung/BODMAS
18
16515
<reponame>whyisyoung/BODMAS # -*- coding: utf-8 -*- """ utils.py ~~~~~~~~ Helper functions for setting up the environment and parsing args, etc. """ import os os.environ['PYTHONHASHSEED'] = '0' from numpy.random import seed import random random.seed(1) seed(1) import sys import logging import argparse import pickl...
2.5
2
session11.py
sahanashetty31/session_11_epai3_assignment
0
16516
import math from functools import lru_cache class Polygon: def __init__(self, n, R): if n < 3: raise ValueError('Polygon must have at least 3 vertices.') self._n = n self._R = R def __repr__(self): return f'Polygon(n={self._n}, R={self._R})' @property def c...
3.65625
4
Software for Other Building Blocks and Integration/PoW.py
fkerem/Cryptocurrency-Blockchain
0
16517
<reponame>fkerem/Cryptocurrency-Blockchain<gh_stars>0 """ PoW.py """ import DSA import sys import hashlib if sys.version_info < (3, 6): import sha3 def rootMerkle(TxBlockFile, TxLen): #To Get the Root Hash of the Merkle Tree TxBlockFileBuffer = open(TxBlockFile, "r") lines = TxBlockFileBuf...
2.890625
3
core/cdag/node/sub.py
prorevizor/noc
84
16518
# ---------------------------------------------------------------------- # SubNode # ---------------------------------------------------------------------- # Copyright (C) 2007-2020 The NOC Project # See LICENSE for details # ---------------------------------------------------------------------- # Python modules from ...
2.921875
3
chapter03/3.5_simulate_output_layer.py
Myeonghan-Jeong/deep-learning-from-scratch
0
16519
import numpy as np # softmax function def softmax(a): exp_a = np.exp(a) sum_a = np.sum(exp_a) return exp_a / sum_a # modified softmax function def modified_softmax(a): maxA = np.max(a) exp_a = np.exp(a - maxA) sum_a = np.sum(exp_a) return exp_a / sum_a
3.1875
3
example.py
luisfciencias/intro-cv
0
16520
<reponame>luisfciencias/intro-cv # example of mask inference with a pre-trained model (COCO) import sys from keras.preprocessing.image import img_to_array from keras.preprocessing.image import load_img from mrcnn.config import Config from mrcnn.model import MaskRCNN from mrcnn.visualize import display_instances from to...
3.546875
4
rubi/datasets/vqa2.py
abhipsabasu/rubi.bootstrap.pytorch
83
16521
<reponame>abhipsabasu/rubi.bootstrap.pytorch import os import csv import copy import json import torch import numpy as np from os import path as osp from bootstrap.lib.logger import Logger from bootstrap.lib.options import Options from block.datasets.vqa_utils import AbstractVQA from copy import deepcopy import random ...
2.171875
2
W3Schools/dates.py
FRX-DEV/Python-Practice-Challenges
0
16522
<reponame>FRX-DEV/Python-Practice-Challenges<gh_stars>0 import datetime x = datetime.datetime.now() print(x) # 2021-07-13 22:55:43.029046 print(x.year) print(x.strftime("%A")) """ 2021 Tuesday """ x = datetime.datetime(2020, 5, 17) print(x) # 2020-05-17 00:00:00 x = datetime.datetime(2018, 6, 1) print(x.strft...
3.625
4
venv/lib/python2.7/site-packages/ebcli/objects/tier.py
zwachtel11/fruitful-backend
4
16523
# Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
2.15625
2
Leetcode.py
SakuraSa/Leetcode_CodeDownloader
3
16524
#!/usr/bin/env python #coding=utf-8 import os import re import requests import datetime import BeautifulSoup #url requests setting host_url = 'https://oj.leetcode.com' login_url = 'https://oj.leetcode.com/accounts/login/' question_list_url = 'https://oj.leetcode.com/problems/' code_...
2.5
2
tokenizer.py
momennaas/kalam-lp
6
16525
# -*- encoding: utf-8 -*- ############################################################## ## Author: <NAME> ## Description: Arabic Natural Language Processor (Kalam-lp) ## Version: 0.0.1 ## Copyright (c) 2014 <NAME> ############################################################## import re import string from co...
3.3125
3
Class4/shoppingcart_pom/features/lib/pages/summer_dresses_catalog_page.py
techsparksguru/python_ci_automation
0
16526
<reponame>techsparksguru/python_ci_automation __author__ = 'techsparksguru' from selenium.webdriver.common.by import By from .base_page_object import BasePage class SummerDressesCatalogPage(BasePage): def __init__(self, context): BasePage.__init__( self, context.browser, ...
2.5625
3
ch3/collatz_test.py
jakdept/pythonbook
0
16527
<filename>ch3/collatz_test.py import unittest import collatz class TestCollatz(unittest.TestCase): '''tests the collatz.py script''' def test_collatz(self): '''table driven test to verify collatz''' tests = ((742, 371), (418, 209), (118, 59), ...
2.96875
3
test/surrogate/test_sk_random_forest.py
Dee-Why/lite-bo
184
16528
<gh_stars>100-1000 from sklearn.ensemble import RandomForestRegressor from openbox.utils.config_space import ConfigurationSpace from openbox.utils.config_space import UniformFloatHyperparameter, \ CategoricalHyperparameter, Constant, UniformIntegerHyperparameter import numpy as np from openbox.utils.config_space.ut...
2.15625
2
cli_wrapper.py
anirbandas18/report-engine
0
16529
<filename>cli_wrapper.py import subprocess, os # constants with global scope INPUT = "--input" OUTPUT = "--output" FILTERS = "--filters" SUPPPLEMENTS = "--supplements" JAR_DIRECTORY = "target" JAR_NAME = "report-engine.jar" def build_jar(): should_package = input("\nBuild " + JAR_NAME + " file from src...
2.578125
3
19-05-150_protein_ridge/inference.py
danhtaihoang/sparse-network
0
16530
<gh_stars>0 ##======================================================================================== import numpy as np from scipy import linalg from sklearn.preprocessing import OneHotEncoder from scipy.spatial import distance #========================================================================================...
2.15625
2
src/test/resources/script/jython/testReturnString.py
adchilds/jythonutil
5
16531
import sys if __name__ == '__main__': # Set the defaults a = '' b = '' # If arguments were passed to this script, use those try: a = sys.argv[1] b = sys.argv[2] except Exception: pass # Sets the result to the longer of the two Strings result = a if len(a) ...
2.875
3
scraper.py
quake0day/chessreview
0
16532
""" PGN Scraper is a small program which downloads each of a user's archived games from chess.com and stores them in a pgn file. When running the user is asked for the account name which shall be scraped and for game types. The scraper only downloads games of the correct type. Supported types are: bullet, rapid, blitz...
3.453125
3
testpro1/DB_handler_jjd.py
dongkakika/OXS
4
16533
import sqlite3 import codecs # for using '한글' import os # 타이틀 정보 읽어오기 f = codecs.open("jjd_info_title.txt", "r") title_list = [] while True: line = f.readline() # 한 줄씩 읽 if not line: break # break the loop when it's End Of File title_list.append(line) # split the line and append it to...
3.15625
3
scripts/regression_tests.py
zhangxaochen/Opt
260
16534
from opt_utils import * import argparse parser = argparse.ArgumentParser() parser.add_argument("-s", "--skip_compilation", action='store_true', help="skip compilation") args = parser.parse_args() if not args.skip_compilation: compile_all_opt_examples() for example in all_examples: args = [] output = run_example(ex...
2.734375
3
rec/migrations/0005_auto_20200922_1701.py
lpkyrius/rg1
0
16535
<reponame>lpkyrius/rg1<filename>rec/migrations/0005_auto_20200922_1701.py # Generated by Django 3.1.1 on 2020-09-22 20:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('rec', '0004_auto_20200922_1633'), ] operations = [ migrations.Alte...
1.328125
1
deeppavlov/deep.py
cclauss/DeepPavlov
3
16536
<reponame>cclauss/DeepPavlov """ Copyright 2017 Neural Networks and Deep Learning lab, MIPT 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 re...
1.695313
2
test/test_cfg/read_grammar.py
wannaphong/pycfg
8
16537
<reponame>wannaphong/pycfg '''Read grammar specifications for test cases.''' import re import sys from pprint import pprint from cfg.core import ContextFreeGrammar, Terminal, Nonterminal, Marker from cfg.table import END_MARKER, ParseTableNormalForm class GrammarTestCase(object): '''Contains a CFG and optionally ...
2.75
3
pype/plugins/global/publish/extract_review.py
barklaya/pype
0
16538
<reponame>barklaya/pype import os import re import copy import json import pyblish.api import clique import pype.api import pype.lib class ExtractReview(pyblish.api.InstancePlugin): """Extracting Review mov file for Ftrack Compulsory attribute of representation is tags list with "review", otherwise the r...
1.789063
2
tests/peerfinder_test.py
wusel42/PeerFinder
49
16539
import unittest from unittest.mock import Mock import mock import peerfinder.peerfinder as peerfinder import requests from ipaddress import IPv6Address, IPv4Address class testPeerFinder(unittest.TestCase): def setUp(self): self.netixlan_set = { "id": 1, "ix_id": 2, "nam...
2.75
3
ceilometer/network/notifications.py
rackerlabs/instrumented-ceilometer
3
16540
# -*- encoding: utf-8 -*- # # Copyright © 2012 New Dream Network, LLC (DreamHost) # # Author: <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/l...
1.5625
2
optax/_src/update_test.py
pierricklee/optax
2
16541
<reponame>pierricklee/optax<filename>optax/_src/update_test.py<gh_stars>1-10 # Lint as: python3 # Copyright 2019 DeepMind Technologies Limited. 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 c...
2.03125
2
scripts/venv/lib/python2.7/site-packages/cogent/core/entity.py
sauloal/cnidaria
3
16542
#!/usr/bin/env python """Provides the entities, the building blocks of the SMRCA hierachy representation of a macromolecular structure. The MultiEntity class is a special Entity class to hold multiple instances of other entities. All Entities apart from the Atom can hold others and inherit from the MultiEntity. T...
2.53125
3
venv/lib/python3.9/site-packages/ajsonrpc/tests/test_dispatcher.py
janten/ESP32-Paxcounter
12
16543
import unittest from ..dispatcher import Dispatcher class Math: @staticmethod def sum(a, b): return a + b @classmethod def diff(cls, a, b): return a - b def mul(self, a, b): return a * b class TestDispatcher(unittest.TestCase): def test_empty(self): self.ass...
3.28125
3
mesh.py
msellens/pms
0
16544
from itertools import product import struct import pickle import numpy as np from scipy import sparse from scipy import isnan as scipy_isnan import numpy.matlib ASCII_FACET = """facet normal 0 0 0 outer loop vertex {face[0][0]:.4f} {face[0][1]:.4f} {face[0][2]:.4f} vertex {face[1][0]:.4f} {face[1][1]:.4f} {face[1][2]...
2.53125
3
vaccine.py
brannbrann/findavaccinesms
0
16545
''' This is a python script that requires you have python installed, or in a cloud environment. This script scrapes the CVS website looking for vaccine appointments in the cities you list. To update for your area, update the locations commented below. If you receive an error that says something is not installed, type...
2.859375
3
pefile/__init__.py
0x1F9F1/binja-msvc
9
16546
<reponame>0x1F9F1/binja-msvc from .pefile import *
0.953125
1
examples/viewer3DVolume.py
vincefn/silx
0
16547
<gh_stars>0 # coding: utf-8 # /*########################################################################## # # Copyright (c) 2016-2017 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Soft...
1.265625
1
solentware_misc/core/__init__.py
RogerMarsh/solentware-misc
0
16548
# __init__.py # Copyright 2017 <NAME> # Licence: See LICENCE (BSD licence) """Miscellaneous modules for applications available at solentware.co.uk. These do not belong in the solentware_base or solentware_grid packages, siblings of solentware_misc. """
0.941406
1
learn_tf/MNIST.py
pkumusic/AI
1
16549
__author__ = "Music" # MNIST For ML Beginners # https://www.tensorflow.org/versions/r0.9/tutorials/mnist/beginners/index.html
1.015625
1
EXC/CW1/task7/mapper.py
easyCZ/UoE-Projects
0
16550
#!/usr/bin/python # mapper.py import sys for line in sys.stdin: row, values = line.strip().split('\t') row_values = values.split(' ') for (col, col_value) in enumerate(row_values): # out: <col> <row> <value> print("{0}\t{1}\t{2}".format(col, row, col_value))
3.03125
3
rllib/algorithms/maddpg/__init__.py
willfrey/ray
0
16551
from ray.rllib.algorithms.maddpg.maddpg import ( MADDPGConfig, MADDPGTrainer, DEFAULT_CONFIG, ) __all__ = ["MADDPGConfig", "MADDPGTrainer", "DEFAULT_CONFIG"]
1.289063
1
Fig8_RTM/RTM.py
GeoCode-polymtl/Seis_float16
0
16552
<reponame>GeoCode-polymtl/Seis_float16 #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Perform RTM on marmousi """ import os import numpy as np import h5py as h5 from scipy.ndimage.filters import gaussian_filter import sys import shutil from SeisCL import SeisCL names = ['fp32', 'fp16io', 'fp16com'] filedata = os....
1.8125
2
doc/default_issue/fix.py
nadavweidman/pytconf
0
16553
<reponame>nadavweidman/pytconf #!/usr/bin/python3 from typing import List from registry import the_registry from param_collector import the_collector class MetaConfig(type): """ Meta class for all configs """ def __new__(mcs, name, bases, namespace): ret = super().__new__(mcs, name, bases, n...
2.734375
3
argonneV14.py
floresab/Toy-Models
0
16554
<reponame>floresab/Toy-Models """ File : argonneV14.py Language : Python 3.6 Created : 7/13/2018 Edited : 7/13/2018 San Digeo State University Department of Physics and Astronomy #https://journals.aps.org/prc/pdf/10.1103/PhysRevC.51.38 --argonneV18 This code implements Argonne V14 potential outlined...
1.6875
2
solutions/python3/problem1556.py
tjyiiuan/LeetCode
0
16555
# -*- coding: utf-8 -*- """ 1556. Thousand Separator Given an integer n, add a dot (".") as the thousands separator and return it in string format. Constraints: 0 <= n < 2^31 """ class Solution: def thousandSeparator(self, n: int) -> str: res = "" str_n = str(n) count = 0 ind = ...
3.265625
3
app/resources/base.py
smartlab-br/datahub-api
1
16556
''' Controller para fornecer dados da CEE ''' from flask_restful import Resource from service.qry_options_builder import QueryOptionsBuilder from model.thematic import Thematic class BaseResource(Resource): ''' Classe de base de resource ''' DEFAULT_SWAGGER_PARAMS = [ {"name": "valor", "required": Fals...
2.484375
2
tapioca_trello/resource_mapping/checklist.py
humrochagf/tapioca-trello
0
16557
<reponame>humrochagf/tapioca-trello<gh_stars>0 # -*- coding: utf-8 -*- CHECKLIST_MAPPING = { 'checklist_retrieve': { 'resource': '/checklists/{id}', 'docs': ( 'https://developers.trello.com/v1.0/reference' '#checklistsid' ), 'methods': ['GET'], }, 'ch...
1.46875
1
investimentos.py
isaiaspereira307/invest
0
16558
import json import os def calculo(self): meta = float(input('valor da meta: ')) # 1000000 valorinicial = float(input('valor inicial: ')) # 5637.99 valormensal = float(input('investimento mensal: ')) # 150 dividendos = float(input('dividendos: ')) # 16.86 meta = meta - valorinicial - valormensal - d...
3.34375
3
lib/ipython_view.py
drewp/light9
2
16559
# this version is adapted from http://wiki.ipython.org/Old_Embedding/GTK """ Backend to the console plugin. @author: <NAME> @organization: IBM Corporation @copyright: Copyright (c) 2007 IBM Corporation @license: BSD All rights reserved. This program and the accompanying materials are made available under the term...
2.359375
2
todo/urls.py
incomparable/Django
0
16560
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^get', views.index, name='index'), url(r'^details/(?P<id>\w)/$', views.details, name='details'), url(r'^add', views.add, name='add'), url(r'^delete', views.delete, name='delete'), ...
1.742188
2
first_steps_in_coding_and_simple_operations_and_calculations/exercise/charity_campaign.py
PetkoAndreev/Python-basics
0
16561
days = int(input()) sladkar = int(input()) cake = int(input()) gofreta = int(input()) pancake = int(input()) cake_price = cake*45 gofreta_price = gofreta*5.8 pancake_price = pancake*3.2 day_price = (cake_price + gofreta_price + pancake_price)*sladkar total_price = days*day_price campaign = total_price - (total_price/8)...
3.828125
4
deepbiome/loss_and_metric.py
Young-won/deepbiome
4
16562
<gh_stars>1-10 ###################################################################### ## DeepBiome ## - Loss and metrics (mse, cross-entropy) ## ## July 10. 2019 ## Youngwon (<EMAIL>) ## ## Reference ## - Keras (https://github.com/keras-team/keras) ###################################################################### ...
2.328125
2
Hough.py
andresgmz/Scripts-Python
0
16563
import cv2 import numpy as np import matplotlib.pyplot as plt #from matplotlib import pyplot as plt from tkinter import filedialog from tkinter import * root = Tk() root.withdraw() root.filename = filedialog.askopenfilename(initialdir = "/",title = "Select file",filetypes = (("all files",".*"),("jpg files","...
3.046875
3
src/SentimentAnalyzer.py
IChowdhury01/Sentiment-Analyzer
0
16564
<gh_stars>0 # Binary Sentiment Analysis using Recurrent Neural Networks # Import libraries & dataset list import tensorflow as tf import tensorflow_datasets as dslist # Load Dataset print("\nLoading dataset...") # Download dataset and dataset info DATASET_CODE = 'imdb_reviews/subwords8k' ...
3.3125
3
google_image_scraping_script_for_arg.py
KuoYuHong/Shihu-Cat-Image-Recognition-System
1
16565
<reponame>KuoYuHong/Shihu-Cat-Image-Recognition-System<filename>google_image_scraping_script_for_arg.py import selenium from selenium import webdriver import time import requests import os from PIL import Image import io import hashlib # All in same directory DRIVER_PATH = 'chromedriver.exe' def fetch_image_urls(que...
3.203125
3
pyslowloris/utils.py
goasdsdkai/daas
75
16566
""" MIT License Copyright (c) 2020 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distri...
1.804688
2
brahe/data_models/geojson.py
duncaneddy/brahe
14
16567
<reponame>duncaneddy/brahe """The geojson module provides data model classes for initialization and storing of GeoJSON objects. """ import typing import typing_extensions import pydantic import numpy as np import brahe.astro as astro import brahe.coordinates as coords import brahe.frames as frames geographic_point =...
2.9375
3
lab7/7.7.py
rikudo765/algorithms
1
16568
<reponame>rikudo765/algorithms n = int(input()) lst = list(map(int, input().split())) def sort1(arr): l = len(arr) for i in range(1, n): cur = arr[i] pos = i check = False while pos > 0: if arr[pos - 1] > cur: check = True arr[po...
3.609375
4
CORE/engines/Gudmundsson_Constraint.py
geoffreynyaga/ostrich-project
15
16569
<filename>CORE/engines/Gudmundsson_Constraint.py #!/usr/bin/env python3 # -*- coding:utf-8 -*- ################################################################################## # File: c:\Projects\KENYA ONE PROJECT\CORE\engines\Gudmundsson_Constraint.py # # Project: c:\Projects\KENYA ONE PROJECT\CORE\engines ...
1.335938
1
libs/blocks/tests/test_variable_filter.py
dendisuhubdy/attention-lvcsr
295
16570
<filename>libs/blocks/tests/test_variable_filter.py from nose.tools import raises from blocks.bricks import Bias, Linear, Logistic from blocks.bricks.parallel import Merge from blocks.filter import VariableFilter from blocks.graph import ComputationGraph from blocks.roles import BIAS, FILTER, PARAMETER, OUTPUT from t...
2.359375
2
techminer/gui/comparative_analysis.py
jdvelasq/techMiner
2
16571
<reponame>jdvelasq/techMiner from collections import Counter import pandas as pd import ipywidgets as widgets import techminer.core.dashboard as dash from techminer.core import ( CA, Dashboard, TF_matrix, TFIDF_matrix, add_counters_to_axis, clustering, corpus_filter, exclude_terms, ) ...
2.234375
2
WayOfTheTurtle1.0.py
BYHu-2/-
2
16572
import sys from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.QtGui import * import qtawesome import matplotlib.pyplot as plt import csv import numpy as np import datetime import os class Stack: def __init__(self): self.items=[] def isEmpty(self): return self.i...
2.484375
2
posthog/test/test_update_person_props.py
csmatar/posthog
58
16573
from datetime import datetime from django.db import connection from posthog.models import Person from posthog.test.base import BaseTest # How we expect this function to behave: # | call | value exists | call TS is ___ existing TS | previous fn | write/override # 1| set | no | N/A ...
2.53125
3
setup.py
cclauss/AIF360
0
16574
from setuptools import setup, find_packages with open("README.md", "r") as fh: long_description = fh.read() setup(name='aif360', version='0.1.0', description='IBM AI Fairness 360', author='aif360 developers', author_email='<EMAIL>', url='https://github.com/IBM/AIF360', long_des...
1.320313
1
src/examples/customstyle/wow_style/widgetstyle/radiobutton.py
robertkist/qtmodernredux
4
16575
radiobutton_style = ''' QRadioButton:disabled { background: transparent; } QRadioButton::indicator { background: palette(dark); width: 8px; height: 8px; border: 3px solid palette(dark); border-radius: 7px; } QRadioButton::indicator:checked { background: palette(highlight); } QRadioButton:...
1.085938
1
engine.py
kevioconnor/day0
0
16576
from __future__ import annotations import lzma, pickle from typing import TYPE_CHECKING from numpy import e from tcod.console import Console from tcod.map import compute_fov import exceptions, render_functions from message_log import MessageLog if TYPE_CHECKING: from entity import Actor from game_map import...
2.3125
2
friday/models/__init__.py
alexa-infra/friday
1
16577
<filename>friday/models/__init__.py # flake8: noqa # pylint: disable=cyclic-import from .base import db, Model, metadata from .link import Link from .user import User from .event import Event, Repeat from .bookmark import Bookmark from .tag import Tag from .doc import Doc, DocTag from .recipe import Recipe, RecipeImage...
1.257813
1
nqs_tf/models/ffnn.py
ameya1101/neural-quantum-states
0
16578
import tensorflow as tf from tensorflow.keras.models import Model from tensorflow.keras.layers import Dense from activations.activations import tan_sigmoid, exponential, ReLU class FFNN(Model): """ Creates a generic Feedforward neural network. """ def __init__(self): super(FFNN, self).__init__() ...
3.234375
3
examples/other/text_frontend/test_g2p.py
zh794390558/DeepSpeech
0
16579
<reponame>zh794390558/DeepSpeech<gh_stars>0 # Copyright (c) 2021 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/licen...
2.078125
2
data_split.py
DataXujing/ExtremeNet-Pytorch
9
16580
# VOC分割训练集和测试集 import os import random import shutil trainval_percent = 0.1 train_percent = 0.9 imgfilepath = '../myData/JPEGImages' #原数据存放地 total_img = os.listdir(imgfilepath) sample_num = len(total_img) trains = random.sample(total_img,int(sample_num*train_percent)) for file in total_img: if file in trains...
2.921875
3
sciunit/models/examples.py
russelljjarvis/sciun
1
16581
"""Example SciUnit model classes.""" import random from sciunit.models import Model from sciunit.capabilities import ProducesNumber from sciunit.utils import class_intern, method_cache from sciunit.utils import method_memoize # Decorator for caching of capability method results. from typing import Union class ConstM...
3.328125
3
semantic/semantic/model/model.py
VladimirSiv/semantic-search-system
1
16582
from sentence_transformers import SentenceTransformer from semantic.config import CONFIG model = SentenceTransformer(CONFIG["model_name"])
1.726563
2
utils/models.py
miladalipour99/time_series_augmentation
140
16583
from tensorflow.keras.models import Model from tensorflow.keras.layers import Dense, Flatten, Dropout, Input from tensorflow.keras.layers import MaxPooling1D, Conv1D from tensorflow.keras.layers import LSTM, Bidirectional from tensorflow.keras.layers import BatchNormalization, GlobalAveragePooling1D, Permute, concatena...
3.015625
3
ai_flow/test/util/test_sqlalchemy_db.py
flink-extended/ai-flow
79
16584
<reponame>flink-extended/ai-flow # Copyright 2022 The AI Flow 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...
1.984375
2
test.py
blodzbyte/isEven
44
16585
<reponame>blodzbyte/isEven #!/usr/bin/env python3 from isEven import isEven def testRange(min, max, evens): print('Testing [{},{}] {}...'.format(min, max, 'evens' if evens else 'odds')) for i in range(min, max, 2): i = i if evens else i - 1 result = isEven(i) if(not result and evens): ...
2.984375
3
comm.py
thedognexttothetrashcan/spi_tmall
0
16586
#! /usr/bin/python # encoding=utf-8 import os import datetime,time from selenium import webdriver import config import threading import numpy as np def writelog(msg,log): nt=datetime.datetime.now().strftime('%Y-%m-%d %H-%M-%S') text="[%s] %s " % (nt,msg) os.system("echo %s >> %s" % (text.encode('utf8'),l...
2.75
3
sherlockpipe/objectinfo/preparer/LightcurveBuilder.py
LuisCerdenoMota/SHERLOCK
0
16587
<filename>sherlockpipe/objectinfo/preparer/LightcurveBuilder.py import re from abc import ABC, abstractmethod from sherlockpipe.star.EpicStarCatalog import EpicStarCatalog from sherlockpipe.star.KicStarCatalog import KicStarCatalog from sherlockpipe.star.TicStarCatalog import TicStarCatalog class LightcurveBuilder(AB...
2.34375
2
dft/dft-hartree-hydrogen.py
marvinfriede/projects
0
16588
<filename>dft/dft-hartree-hydrogen.py<gh_stars>0 #!/bin/env python3 # coding: utf8 ''' My implementation of DFT Assignment 5.1: Hartree energy for H-atom GS Taught by <NAME> in 2019/2020. Links: https://tu-freiberg.de/fakultaet2/thph/lehre/density-functional-theory https://github.com/PandaScience/teaching-resources...
2.84375
3
workflow & analyses notebooks/fukushima_telomere_methods.py
Jared-Luxton/Fukushima-Nuclear-Disaster-Humans
0
16589
import numpy as np import pandas as pd import os import matplotlib.pyplot as plt from sklearn import datasets, linear_model from difflib import SequenceMatcher import seaborn as sns from statistics import mean from ast import literal_eval from scipy import stats from sklearn.linear_model import LinearRegression from s...
2.9375
3
src/xia2/cli/report.py
graeme-winter/xia2
10
16590
import json import os import sys from collections import OrderedDict import iotbx.phil import xia2.Handlers.Streams from dials.util.options import OptionParser from jinja2 import ChoiceLoader, Environment, PackageLoader from xia2.Modules.Report import Report from xia2.XIA2Version import Version phil_scope = iotbx.phi...
2.046875
2
minoan_project/minoan_project/urls.py
mtzirkel/minoan
0
16591
from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.conf import settings from django.views.generic import TemplateView from . import views # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patt...
1.6875
2
algorithm/__init__.py
sirCamp/bioinformatics
0
16592
from algorithm.InsertionLengthAlgorithm import InsertionLengthAlgorithm from algorithm.PhysicalCoverageAlgorithm import PhysicalCoverageAlgorithm from algorithm.SequenceCoverageAlgorithm import SequenceCoverageAlgorithm from algorithm.CigarAlgorithm import CigarAlgorithm from algorithm.KmersAlgorithm import KmersAlgori...
1.257813
1
attackMain.py
saurabhK99/substitution-cipher
0
16593
from tkinter import * from attack import * #calls letter frequency attack def attack(on, cipherTxt): plainTxt = str() attack = LetterFrequencyAttack(cipherTxt, on) for i in range(10): plainTxt = plainTxt + attack.attack() + '\n\n' answer.config(text = plainTxt) #defining main wi...
3.53125
4
eden.py
nobesio/eden
0
16594
<filename>eden.py<gh_stars>0 from random import randint import copy # Auxiliary Function for rotating the DNA in each cycle. def rotate(l,n): return l[n:] + l[:n] # History is the object responsible for accounting all the organisms. class History: def __init__(self): self.orgs = [] def ...
3.359375
3
examples/example_pipeline.py
madconsulting/datanectar
0
16595
import os import datetime from pathlib import Path import pandas as pd import luigi PROCESSED_DIR = 'processed' ROLLUP_DIR = 'rollups' class PrepareDataTask(luigi.Task): def __init__(self): super().__init__() self.last_processed_id = 0 if os.path.exists('last_processed_id.txt'): ...
2.640625
3
scripts/tflite_model_tools/tflite/Metadata.py
LaudateCorpus1/edgeai-tidl-tools
15
16596
<reponame>LaudateCorpus1/edgeai-tidl-tools # automatically generated by the FlatBuffers compiler, do not modify # namespace: tflite import flatbuffers from flatbuffers.compat import import_numpy np = import_numpy() class Metadata(object): __slots__ = ['_tab'] @classmethod def GetRootAsMetadata(cls, buf,...
1.96875
2
kukur/config.py
timeseer-ai/kukur
2
16597
<gh_stars>1-10 """Read the Kukur configuration.""" # SPDX-FileCopyrightText: 2021 Timeseer.AI # # SPDX-License-Identifier: Apache-2.0 import glob import toml class InvalidIncludeException(Exception): """Raised when the include configuration is invalid.""" def __init__(self, message: str): Exception....
2.5
2
scheduletest.py
ambimanus/appsim
0
16598
import time from datetime import datetime import numpy as np from matplotlib import pyplot as plt from matplotlib.dates import epoch2num import device_factory if __name__ == '__main__': amount = 50 devices = [] for i in range(amount): device = device_factory.ecopower_4(i, i) ...
2.40625
2
src/genie/libs/parser/iosxe/tests/ShowInstallState/cli/equal/golden_output3_expected.py
ykoehler/genieparser
0
16599
<reponame>ykoehler/genieparser<filename>src/genie/libs/parser/iosxe/tests/ShowInstallState/cli/equal/golden_output3_expected.py expected_output = { "location": { "R0 R1": { "auto_abort_timer": "inactive", "pkg_state": { 1: { "filename_version": "17...
1.09375
1