hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f27acd0b94f784d85a24a1358e2c015c3198e304 | 4,138 | py | Python | keras_med_io/utils/intensity_io.py | jchen42703/keras_med_io | 2113de64a448c90b66993d6ed4fdbba7971f3417 | [
"MIT"
] | null | null | null | keras_med_io/utils/intensity_io.py | jchen42703/keras_med_io | 2113de64a448c90b66993d6ed4fdbba7971f3417 | [
"MIT"
] | 6 | 2019-03-24T02:39:43.000Z | 2019-04-10T01:15:14.000Z | keras_med_io/utils/intensity_io.py | jchen42703/keras_med_io | 2113de64a448c90b66993d6ed4fdbba7971f3417 | [
"MIT"
] | null | null | null | # coding: utf-8
# funcions for quick testing
import numpy as np
# helper functions
def normalization(arr, normalize_mode, norm_range = [0,1]):
"""
Helper function: Normalizes the image based on the specified mode and range
Args:
arr: numpy array
normalize_mode: either "whiten", "normalize_cl... | 39.037736 | 121 | 0.656597 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,581 | 0.623731 |
f27ae5b52fc981bd0a9765592021614aae946fe5 | 130 | py | Python | day00/ex05/kata02.py | bcarlier75/python_bootcamp_42ai | 916c258596f90a222f20329894048addb6f64dd9 | [
"MIT"
] | 1 | 2020-04-17T18:47:46.000Z | 2020-04-17T18:47:46.000Z | day00/ex05/kata02.py | bcarlier75/python_bootcamp_42ai | 916c258596f90a222f20329894048addb6f64dd9 | [
"MIT"
] | null | null | null | day00/ex05/kata02.py | bcarlier75/python_bootcamp_42ai | 916c258596f90a222f20329894048addb6f64dd9 | [
"MIT"
] | null | null | null | import datetime
t = (3, 30, 2019, 9, 25)
x = datetime.datetime(t[2], t[3], t[4], t[0], t[1])
print(x.strftime("%m/%d/%Y %H:%M"))
| 21.666667 | 51 | 0.546154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 0.123077 |
f27c23356c06fcdc25ca581c0cf5398df4251dbf | 8,654 | py | Python | source/notebooks/sagemaker_predictive_maintenance/autoencoder_entry_point/autoencoder_entry_point.py | brightsparc/predictive-maintenance-using-machine-learning | fae69698750185bb58a3fa67ff8887f435f46458 | [
"Apache-2.0"
] | null | null | null | source/notebooks/sagemaker_predictive_maintenance/autoencoder_entry_point/autoencoder_entry_point.py | brightsparc/predictive-maintenance-using-machine-learning | fae69698750185bb58a3fa67ff8887f435f46458 | [
"Apache-2.0"
] | null | null | null | source/notebooks/sagemaker_predictive_maintenance/autoencoder_entry_point/autoencoder_entry_point.py | brightsparc/predictive-maintenance-using-machine-learning | fae69698750185bb58a3fa67ff8887f435f46458 | [
"Apache-2.0"
] | null | null | null | # Autoencoder based on: https://towardsdatascience.com/predictive-maintenance-of-turbofan-engine-64911e39c367
import argparse
import pandas as pd
import numpy as np
import itertools
import logging
import random
import os
from scipy.spatial.distance import pdist, squareform
from sklearn.metrics import confusion_matrix... | 39.336364 | 159 | 0.686388 | 0 | 0 | 654 | 0.075572 | 0 | 0 | 0 | 0 | 2,132 | 0.24636 |
f27c2659a6f08c68bf5a68b6f0434f1302972e63 | 437 | py | Python | util/dump_cmudict_json.py | raygard/readability-rg | 3e0820ee5def6ffccfdc1114e511bdf137ff9b04 | [
"MIT"
] | null | null | null | util/dump_cmudict_json.py | raygard/readability-rg | 3e0820ee5def6ffccfdc1114e511bdf137ff9b04 | [
"MIT"
] | null | null | null | util/dump_cmudict_json.py | raygard/readability-rg | 3e0820ee5def6ffccfdc1114e511bdf137ff9b04 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# vim: set fileencoding=utf-8
import sys
import json
def main():
args = sys.argv[1:]
fn = args[0]
with open(fn) as fp:
d = json.load(fp)
# Using sorted() to get same results in Python 2 and 3.
for k, v in sorted(d.items()):
assert isinstance(v, list)
... | 19.863636 | 62 | 0.533181 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 136 | 0.311213 |
f27e08d8b8e21a50f9f19aef584ea000ba47242e | 6,070 | py | Python | app/loader.py | DFilyushin/librusec | fd6d7a99037aac4c1112f648397830284f4165f9 | [
"Apache-2.0"
] | 2 | 2017-12-14T11:50:16.000Z | 2021-12-27T13:42:16.000Z | app/loader.py | DFilyushin/librusec | fd6d7a99037aac4c1112f648397830284f4165f9 | [
"Apache-2.0"
] | null | null | null | app/loader.py | DFilyushin/librusec | fd6d7a99037aac4c1112f648397830284f4165f9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import datetime
import time
import MySQLdb as mdb
LIB_INDEXES = 'D:\\TEMP\\librusec'
MYSQL_HOST = '127.0.0.1'
MYSQL_BASE = 'books100'
MYSQL_LOGIN = 'root'
MYSQL_PASSW = 'qwerty'
SQL_CHECK_BASE = "SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = '%s'"
SQL_CREATE... | 33.351648 | 134 | 0.594728 | 2,449 | 0.40346 | 0 | 0 | 0 | 0 | 0 | 0 | 1,872 | 0.308402 |
f27e5faf956aa7b884e2d5afa37ca81bb25dcb92 | 1,328 | py | Python | src/EvalShift.py | nekonyanneko/GA | 328f37c421a8bd4857a0804b130c23bd7b98de19 | [
"MIT"
] | null | null | null | src/EvalShift.py | nekonyanneko/GA | 328f37c421a8bd4857a0804b130c23bd7b98de19 | [
"MIT"
] | null | null | null | src/EvalShift.py | nekonyanneko/GA | 328f37c421a8bd4857a0804b130c23bd7b98de19 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import Shift as shi
import Enum as enu
def evalShift(individual):
"""
This method is grobal method.
This method is evaluation.
If you need new evaluation method, you must define it as follows.
RETURN:
evaluation values
"""
shift = shi.Shift(individual) # Get indiviaual of ... | 24.145455 | 83 | 0.652108 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 570 | 0.373037 |
f27e8907ba835e5562beea72db0b2659774edc40 | 46 | py | Python | calandarevent/__init__.py | YHallouard/adventofcode_yann | c6afb43c2af0bce74c5dee9c31e6eda2caa081d4 | [
"MIT"
] | null | null | null | calandarevent/__init__.py | YHallouard/adventofcode_yann | c6afb43c2af0bce74c5dee9c31e6eda2caa081d4 | [
"MIT"
] | null | null | null | calandarevent/__init__.py | YHallouard/adventofcode_yann | c6afb43c2af0bce74c5dee9c31e6eda2caa081d4 | [
"MIT"
] | null | null | null | from .version import __version__
__version__
| 11.5 | 32 | 0.847826 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f27f8a655e82f556df2399b3f99f4848f377c47b | 375 | py | Python | app/models/word.py | shiniao/soul-api | 1438281c2dce237d735f7309c2ddb606c8d01e1e | [
"Apache-2.0"
] | 1 | 2021-02-27T09:05:40.000Z | 2021-02-27T09:05:40.000Z | app/models/word.py | shiniao/soulapi | 1438281c2dce237d735f7309c2ddb606c8d01e1e | [
"Apache-2.0"
] | null | null | null | app/models/word.py | shiniao/soulapi | 1438281c2dce237d735f7309c2ddb606c8d01e1e | [
"Apache-2.0"
] | null | null | null | from sqlalchemy import Column, Integer, String
from app.database import Base
class Word(Base):
id = Column(Integer, primary_key=True, index=True, autoincrement=True)
origin = Column(String, index=True, unique=True, nullable=False)
pronunciation = Column(String)
translation = Column(String)
creat... | 26.785714 | 74 | 0.733333 | 294 | 0.784 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f280236c60f310af1d18ad0b782faeb404b108be | 912 | py | Python | anomaly/Read_img.py | Jun-CEN/Open-World-Semantic-Segmentation | a95bac374e573055c23220e299789f34292988bc | [
"MIT"
] | 19 | 2021-08-09T15:34:10.000Z | 2022-03-14T09:20:58.000Z | anomaly/Read_img.py | Jun-CEN/Open-World-Semantic-Segmentation | a95bac374e573055c23220e299789f34292988bc | [
"MIT"
] | 4 | 2021-11-08T07:10:35.000Z | 2022-01-16T01:53:06.000Z | anomaly/Read_img.py | Jun-CEN/Open-World-Semantic-Segmentation | a95bac374e573055c23220e299789f34292988bc | [
"MIT"
] | 4 | 2021-10-06T09:28:16.000Z | 2022-01-14T08:26:54.000Z | from PIL import Image
import matplotlib.pyplot as plt
import numpy as np
import bdlb
import torch
import json
# path_img = './data/test_result/t5/'
# path_img = './results_18_ce_noshuffle/2_'
#
# image = Image.open(path_img + '100.png')
# plt.imshow(image)
# plt.show()
#
# overlay = Image.open(path_img + 'overlay.png'... | 20.727273 | 54 | 0.667763 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 605 | 0.663377 |
f280852bfea33f9eda7c3cbe87f494f3dbe4c0a3 | 238 | py | Python | Bot.py | pythonNoobas/Python228 | 7c266acad5bb5ae45df10ac3fdea209831399729 | [
"MIT"
] | null | null | null | Bot.py | pythonNoobas/Python228 | 7c266acad5bb5ae45df10ac3fdea209831399729 | [
"MIT"
] | null | null | null | Bot.py | pythonNoobas/Python228 | 7c266acad5bb5ae45df10ac3fdea209831399729 | [
"MIT"
] | null | null | null | import telebot
bot = telebot.TeleBot("879497357:AAHxUAZR2ZMy7q1dsC12NoFOmvBnKo9a3FA")
@bot.message_handler(content_types=['text'])
def echo_all(message):
bot.send_message(message.chat.id, message.text)
bot.polling( none_stop = True ) | 23.8 | 70 | 0.794118 | 0 | 0 | 0 | 0 | 116 | 0.487395 | 0 | 0 | 53 | 0.222689 |
f2808bb95000137789190b399e2a920a24f1f97a | 2,980 | py | Python | generator/address.py | leg020/python-training | f595b8b836ff60c68bdff9d881ca50c026762457 | [
"Apache-2.0"
] | null | null | null | generator/address.py | leg020/python-training | f595b8b836ff60c68bdff9d881ca50c026762457 | [
"Apache-2.0"
] | null | null | null | generator/address.py | leg020/python-training | f595b8b836ff60c68bdff9d881ca50c026762457 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from model.address import Address
import random
import string
import os.path
import json
import getopt
import sys
import jsonpickle
try:
opts, args = getopt.getopt(sys.argv[1:], 'n:f:', ['number of address', 'file'])
except getopt.GetoptError as err:
getopt.usage()
sys.exit(2)
n ... | 33.483146 | 94 | 0.451342 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 304 | 0.102013 |
f2813fd14566cad91048d44239959b70b5b53e25 | 192 | py | Python | tests/__init__.py | sjspielman/hyphyhelper | 0291cd72f0ba6ccb76e97feef97431f677dde730 | [
"BSD-3-Clause"
] | 16 | 2017-12-04T14:52:36.000Z | 2021-07-21T15:15:25.000Z | tests/__init__.py | sjspielman/hyphyhelper | 0291cd72f0ba6ccb76e97feef97431f677dde730 | [
"BSD-3-Clause"
] | 11 | 2018-01-16T16:06:13.000Z | 2021-12-07T14:14:15.000Z | tests/__init__.py | sjspielman/hyphyhelper | 0291cd72f0ba6ccb76e97feef97431f677dde730 | [
"BSD-3-Clause"
] | 10 | 2017-12-03T19:54:53.000Z | 2021-07-21T15:15:30.000Z | """``phyphy`` package for automating and parsing HyPhy (>=2.3.7) standard analyses.
Written by Stephanie J. Spielman.
Test modules
----------------
* phyphy_test
"""
from phyphy import *
| 14.769231 | 83 | 0.651042 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 170 | 0.885417 |
f283d91585cbb97de4ca77780a488265da69f263 | 613 | py | Python | scripts/test.py | darkmatter2222/Agar.AI | a757544581239a7b4c2b00bb7befa9b649d73f7f | [
"MIT"
] | 1 | 2020-01-02T13:49:51.000Z | 2020-01-02T13:49:51.000Z | scripts/test.py | darkmatter2222/Agar.AI | a757544581239a7b4c2b00bb7befa9b649d73f7f | [
"MIT"
] | null | null | null | scripts/test.py | darkmatter2222/Agar.AI | a757544581239a7b4c2b00bb7befa9b649d73f7f | [
"MIT"
] | 1 | 2020-01-24T19:17:38.000Z | 2020-01-24T19:17:38.000Z | import scripts.screen_interface as si
import scripts.game_interface as gi
import ctypes
import os
import keyboard
import uuid
GI = gi.GameInterface()
# find center of screen
user32 = ctypes.windll.user32
screenSize = user32.GetSystemMetrics(0), user32.GetSystemMetrics(1)
centerPoint = tuple(i/2 for i in screenSize)
p... | 25.541667 | 67 | 0.761827 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 74 | 0.120718 |
f284677f3d515ed6519b9b9782d95ab9e355ded5 | 4,052 | py | Python | Controller/control/WorkerControl.py | th-nuernberg/ml-cloud | 6d7527cbf6cceb7062e74dbc43d51998381aa6c8 | [
"MIT"
] | null | null | null | Controller/control/WorkerControl.py | th-nuernberg/ml-cloud | 6d7527cbf6cceb7062e74dbc43d51998381aa6c8 | [
"MIT"
] | 7 | 2020-07-19T03:29:21.000Z | 2022-03-02T06:46:12.000Z | Controller/control/WorkerControl.py | th-nuernberg/ml-cloud | 6d7527cbf6cceb7062e74dbc43d51998381aa6c8 | [
"MIT"
] | null | null | null | import json
import queue
from control.WorkerQueue import WorkerQueue as WQ
from data.StorageIO import StorageIO
'''
The WorkerControl coordinates workers and assigns jobs.
Worker register themself at startup. The controller queues workers as well as jobs in two seperate queues.
As soon as a worker and a job are availa... | 38.226415 | 112 | 0.607601 | 3,573 | 0.881787 | 0 | 0 | 0 | 0 | 0 | 0 | 900 | 0.222113 |
f28467f33870630c6d980108ee2deecf6e265916 | 986 | py | Python | spammer/groupdmspam.py | 00-00-00-11/Raid-Toolbox | 4d24841de5ef112dc15b858f62607e0d6b5277cd | [
"0BSD"
] | null | null | null | spammer/groupdmspam.py | 00-00-00-11/Raid-Toolbox | 4d24841de5ef112dc15b858f62607e0d6b5277cd | [
"0BSD"
] | null | null | null | spammer/groupdmspam.py | 00-00-00-11/Raid-Toolbox | 4d24841de5ef112dc15b858f62607e0d6b5277cd | [
"0BSD"
] | 1 | 2021-05-15T11:32:24.000Z | 2021-05-15T11:32:24.000Z | import discord
import sys
import random
import aiohttp
import logging
token = sys.argv[1]
group = sys.argv[2]
tokenno = sys.argv[3]
msgtxt = sys.argv[4]
useproxies = sys.argv[5]
logging.basicConfig(filename='RTB.log', filemode='w', format='Token {}'.format(str(tokenno))+' - %(levelname)s - %(message)s',le... | 28.171429 | 150 | 0.649087 | 0 | 0 | 0 | 0 | 216 | 0.219067 | 201 | 0.203854 | 112 | 0.11359 |
f2854a477097d46506783a017f1b2352a0421334 | 570 | py | Python | school/migrations/0018_listemplois.py | Belaid-RWW/PFAEspaceParent | 8fd0000d4ee1427599bcb7da5aa301050469e7a8 | [
"MIT"
] | null | null | null | school/migrations/0018_listemplois.py | Belaid-RWW/PFAEspaceParent | 8fd0000d4ee1427599bcb7da5aa301050469e7a8 | [
"MIT"
] | null | null | null | school/migrations/0018_listemplois.py | Belaid-RWW/PFAEspaceParent | 8fd0000d4ee1427599bcb7da5aa301050469e7a8 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.7 on 2021-05-07 03:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('school', '0017_emplois_emp'),
]
operations = [
migrations.CreateModel(
name='ListEmplois',
fields=[
... | 25.909091 | 114 | 0.568421 | 477 | 0.836842 | 0 | 0 | 0 | 0 | 0 | 0 | 109 | 0.191228 |
f28613b99f347cb3a0fc049c18db1898247d805e | 522 | py | Python | t2t_bert/distributed_encoder/gpt_encoder.py | yyht/bert | 480c909e0835a455606e829310ff949c9dd23549 | [
"Apache-2.0"
] | 34 | 2018-12-19T01:00:57.000Z | 2021-03-26T09:36:37.000Z | t2t_bert/distributed_encoder/gpt_encoder.py | yyht/bert | 480c909e0835a455606e829310ff949c9dd23549 | [
"Apache-2.0"
] | 11 | 2018-12-25T03:37:59.000Z | 2021-08-25T14:43:58.000Z | t2t_bert/distributed_encoder/gpt_encoder.py | yyht/bert | 480c909e0835a455606e829310ff949c9dd23549 | [
"Apache-2.0"
] | 9 | 2018-12-27T08:00:44.000Z | 2020-06-08T03:05:14.000Z | from model.gpt import gpt
import tensorflow as tf
import numpy as np
def gpt_encoder(model_config, features, labels,
mode, target, reuse=tf.AUTO_REUSE):
input_ids = features["input_ids"]
past = features.get('past', None)
model = gpt.GPT(model_config)
if model_config.get("scope", None):
scope = model_config... | 20.88 | 48 | 0.695402 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.086207 |
f28637ac36ec4e4cf9bd05dd4661f26ee82946dd | 900 | py | Python | ejercicios_resueltos/t04/t04ejer03.py | workready/pythonbasic | 59bd82caf99244f5e711124e1f6f4dec8de22141 | [
"MIT"
] | null | null | null | ejercicios_resueltos/t04/t04ejer03.py | workready/pythonbasic | 59bd82caf99244f5e711124e1f6f4dec8de22141 | [
"MIT"
] | null | null | null | ejercicios_resueltos/t04/t04ejer03.py | workready/pythonbasic | 59bd82caf99244f5e711124e1f6f4dec8de22141 | [
"MIT"
] | null | null | null | import os
def gcat(filenames):
for filename in filenames:
with open(filename) as f:
for line in f:
yield line
def ggrep(pattern, filenames):
for filename in filenames:
with open(filename) as f:
for line in f:
if pattern in line:
... | 25 | 104 | 0.537778 | 0 | 0 | 328 | 0.364444 | 0 | 0 | 0 | 0 | 288 | 0.32 |
f286492200c20b0ffd878c540e355986ac87e759 | 265 | py | Python | __init__.py | Lukas-Dresel/dice22_breach_binja | 7b481b9209e56203b17d24f4a03e567765cf77d7 | [
"MIT"
] | null | null | null | __init__.py | Lukas-Dresel/dice22_breach_binja | 7b481b9209e56203b17d24f4a03e567765cf77d7 | [
"MIT"
] | null | null | null | __init__.py | Lukas-Dresel/dice22_breach_binja | 7b481b9209e56203b17d24f4a03e567765cf77d7 | [
"MIT"
] | null | null | null | import binaryninja
from .breach_arch import BreachArch
BreachArch.register()
from .breach_programview import BreachProgramView
BreachProgramView.register()
from .breach_calling_convention import BreachCallingConvention
from .breach_platform import BreachPlatform | 26.5 | 62 | 0.879245 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f2864bce946124a8b9383d4c53008de00cff4e49 | 2,460 | py | Python | swot_item_vote/views.py | imranariffin/liveswot-api | a2acc05fd2c51adc30e8e1785b857a94af81677d | [
"MIT"
] | null | null | null | swot_item_vote/views.py | imranariffin/liveswot-api | a2acc05fd2c51adc30e8e1785b857a94af81677d | [
"MIT"
] | 25 | 2018-03-25T05:25:22.000Z | 2021-06-10T19:51:12.000Z | swot_item_vote/views.py | imranariffin/liveswot-api | a2acc05fd2c51adc30e8e1785b857a94af81677d | [
"MIT"
] | 2 | 2018-07-02T02:59:24.000Z | 2018-08-21T02:58:21.000Z | from django.core.exceptions import ObjectDoesNotExist
from django.db import IntegrityError
from rest_framework.decorators import api_view
from rest_framework import status
from swot_item_vote.models import Vote
from swot_item.models import SwotItem
from .serializers import serialize, get_item_confidence
from swot.m... | 21.964286 | 64 | 0.605285 | 0 | 0 | 0 | 0 | 2,033 | 0.826423 | 0 | 0 | 93 | 0.037805 |
f2895989ed18fa1ea8643af23dca6836bad3cec9 | 30,553 | py | Python | car2dc-kiran/Scripts/StartTraffic.py | kirannCS/MasterThesis | a12771dc40efe77ae7d6e1631ed66c4b9992afd8 | [
"Unlicense"
] | null | null | null | car2dc-kiran/Scripts/StartTraffic.py | kirannCS/MasterThesis | a12771dc40efe77ae7d6e1631ed66c4b9992afd8 | [
"Unlicense"
] | null | null | null | car2dc-kiran/Scripts/StartTraffic.py | kirannCS/MasterThesis | a12771dc40efe77ae7d6e1631ed66c4b9992afd8 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
#################################################################################
################# Helper Module #################################################
################# Provides abstraction to car sensors and PHY layer #############
##################################################... | 37.1691 | 239 | 0.700717 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9,623 | 0.314961 |
f28ae939117634bfbb4da17376ebc5f47320b58f | 879 | py | Python | quick_sort.py | MichaelLenghel/Sorting-Algorithms | b0aba03a7e5d95b4ca4038e8b53a9d544adeefb1 | [
"MIT"
] | null | null | null | quick_sort.py | MichaelLenghel/Sorting-Algorithms | b0aba03a7e5d95b4ca4038e8b53a9d544adeefb1 | [
"MIT"
] | null | null | null | quick_sort.py | MichaelLenghel/Sorting-Algorithms | b0aba03a7e5d95b4ca4038e8b53a9d544adeefb1 | [
"MIT"
] | null | null | null | def partition(a, start, end):
pivot = a[start]
left = start + 1
right = end
met = False
# Iterate until i reaches j in the middle
while not met:
while left <= right and a[left] <= pivot:
left = left + 1
while right >= left and a[right] >= pivot:
right = right - 1
... | 22.538462 | 49 | 0.531286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 167 | 0.189989 |
f28b677805cf2bdfc02ec0d719ce0fad31f82786 | 5,787 | py | Python | astacus/coordinator/plugins/clickhouse/parts.py | aiven/astacus | 2d64e1f33e01d50a41127f41d9da3d1ab0ce0387 | [
"Apache-2.0"
] | 19 | 2020-06-22T12:17:59.000Z | 2022-02-18T00:12:17.000Z | astacus/coordinator/plugins/clickhouse/parts.py | aiven/astacus | 2d64e1f33e01d50a41127f41d9da3d1ab0ce0387 | [
"Apache-2.0"
] | 7 | 2020-06-24T05:16:20.000Z | 2022-02-28T07:35:31.000Z | astacus/coordinator/plugins/clickhouse/parts.py | aiven/astacus | 2d64e1f33e01d50a41127f41d9da3d1ab0ce0387 | [
"Apache-2.0"
] | 2 | 2020-09-05T21:23:08.000Z | 2022-02-17T15:02:37.000Z | """
Copyright (c) 2021 Aiven Ltd
See LICENSE for details
Algorithms to help with redistributing parts across servers for tables using the
Replicated family of table engines.
This does not support shards, but this is the right place to add support for them.
"""
from astacus.common.ipc import SnapshotFile
from astacus.... | 39.101351 | 111 | 0.697598 | 191 | 0.033005 | 0 | 0 | 273 | 0.047175 | 0 | 0 | 2,268 | 0.391913 |
f28ccbdb8a0ea7d42a8a232e4a98e01aac77cc9d | 1,301 | py | Python | tests/test_init.py | mds2/Rocket | 53313677768159d13e6c2b7c69ad69ca59bb8c79 | [
"MIT"
] | 16 | 2015-12-16T10:50:42.000Z | 2020-06-04T10:39:20.000Z | tests/test_init.py | mds2/Rocket | 53313677768159d13e6c2b7c69ad69ca59bb8c79 | [
"MIT"
] | 6 | 2017-11-01T14:51:52.000Z | 2019-01-01T22:12:27.000Z | tests/test_init.py | mds2/Rocket | 53313677768159d13e6c2b7c69ad69ca59bb8c79 | [
"MIT"
] | 13 | 2016-04-22T20:14:39.000Z | 2021-12-21T22:52:02.000Z | # -*- coding: utf-8 -*-
# This file is part of the Rocket Web Server
# Copyright (c) 2012 Timothy Farrell
#
# See the included LICENSE.txt file for licensing details.
# Import System Modules
import sys
import unittest
# Import Custom Modules
import rocket
# Define Constants
PY3K = sys.version_info[0] > 2
# Define T... | 32.525 | 275 | 0.647963 | 926 | 0.71176 | 0 | 0 | 0 | 0 | 0 | 0 | 613 | 0.471176 |
f2903e37d62a64c2678663ac58e60ba0efca0df6 | 206 | py | Python | setup.py | hemanths933/Segmentation_Unet | 701585b31df7e4159e2fdbe56aaca99d9a4a8ea9 | [
"MIT"
] | null | null | null | setup.py | hemanths933/Segmentation_Unet | 701585b31df7e4159e2fdbe56aaca99d9a4a8ea9 | [
"MIT"
] | null | null | null | setup.py | hemanths933/Segmentation_Unet | 701585b31df7e4159e2fdbe56aaca99d9a4a8ea9 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='Unet',
version='',
packages=['models'],
url='',
license='',
author='hemanth sharma',
author_email='',
description=''
)
| 15.846154 | 29 | 0.538835 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.194175 |
f2904abee88ac63551da7aa60f4599002d25cdcf | 2,757 | py | Python | side_scroller/game.py | pecjas/Sidescroller-PyGame | dfcaf4ff95a1733714eaaeb00dc00cd876ab1468 | [
"MIT"
] | null | null | null | side_scroller/game.py | pecjas/Sidescroller-PyGame | dfcaf4ff95a1733714eaaeb00dc00cd876ab1468 | [
"MIT"
] | null | null | null | side_scroller/game.py | pecjas/Sidescroller-PyGame | dfcaf4ff95a1733714eaaeb00dc00cd876ab1468 | [
"MIT"
] | null | null | null | import pygame
from side_scroller.constants import BLACK
from side_scroller.settings import GameSettings, Fonts
from side_scroller.player import Player, Hitbox
from side_scroller.constants import GAME_NAME
class Game():
def __init__(self):
self.player = Player(0, Player.y_bottom_barrier)
self.scree... | 31.329545 | 91 | 0.66848 | 2,550 | 0.924918 | 0 | 0 | 0 | 0 | 0 | 0 | 152 | 0.055132 |
f2909580065a2556ae0c58be271bee9537858bf1 | 366 | py | Python | solutions/problem_230.py | ksvr444/daily-coding-problem | 5d9f488f81c616847ee4e9e48974523ec2d598d7 | [
"MIT"
] | 1,921 | 2018-11-13T18:19:56.000Z | 2021-11-15T14:25:41.000Z | solutions/problem_230.py | MohitIndian/daily-coding-problem | 5d9f488f81c616847ee4e9e48974523ec2d598d7 | [
"MIT"
] | 2 | 2019-07-19T01:06:16.000Z | 2019-08-01T22:21:36.000Z | solutions/problem_230.py | MohitIndian/daily-coding-problem | 5d9f488f81c616847ee4e9e48974523ec2d598d7 | [
"MIT"
] | 1,066 | 2018-11-19T19:06:55.000Z | 2021-11-13T12:33:56.000Z | def get_min_drops(N, k):
if N == 0 or N == 1 or k == 1:
return N
possibilities = list()
for i in range(1, N + 1):
possibilities.append(
max(get_min_drops(i-1, k-1),
get_min_drops(N-i, k))
)
return min(possibilities) + 1
# Tests
assert get_min_drops... | 20.333333 | 40 | 0.538251 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.019126 |
f290ef8b6c3eb1ab597e06f8dc82e1806488e974 | 3,525 | py | Python | src/advanceoperate/uploadthread.py | zengrx/S.M.A.R.T | 47a9abe89008e9b34f9b9d057656dbf3fb286456 | [
"MIT"
] | 10 | 2017-07-11T01:08:28.000Z | 2021-05-07T01:49:00.000Z | src/advanceoperate/uploadthread.py | YanqiangHuang/S.M.A.R.T | 47a9abe89008e9b34f9b9d057656dbf3fb286456 | [
"MIT"
] | null | null | null | src/advanceoperate/uploadthread.py | YanqiangHuang/S.M.A.R.T | 47a9abe89008e9b34f9b9d057656dbf3fb286456 | [
"MIT"
] | 6 | 2017-05-02T14:27:15.000Z | 2017-05-15T05:56:40.000Z | #coding=utf-8
import sys, os
import socket
import hashlib
import virus_total_apis
from PyQt4 import QtCore
sys.path.append("..")
from publicfunc.fileanalyze import PEFileAnalize, getFileInfo
class UploadFile(QtCore.QThread):
finishSignal = QtCore.pyqtSignal(int, tuple)
'''
@文件名
@用户公钥
'''
def ... | 34.558824 | 119 | 0.584681 | 3,526 | 0.947595 | 0 | 0 | 0 | 0 | 0 | 0 | 1,170 | 0.314432 |
f291aa8b92b2b817f77cb42f08e1e15a9557dcfe | 240 | py | Python | JaroEliCall/src/functionality/sending_activation_key.py | jaroslaw-wieczorek/Project_IP_Telephony_Python_Voip | 05143356fe91f745c286db8c3e2432714ab122e7 | [
"MIT"
] | null | null | null | JaroEliCall/src/functionality/sending_activation_key.py | jaroslaw-wieczorek/Project_IP_Telephony_Python_Voip | 05143356fe91f745c286db8c3e2432714ab122e7 | [
"MIT"
] | null | null | null | JaroEliCall/src/functionality/sending_activation_key.py | jaroslaw-wieczorek/Project_IP_Telephony_Python_Voip | 05143356fe91f745c286db8c3e2432714ab122e7 | [
"MIT"
] | 1 | 2018-03-20T21:22:40.000Z | 2018-03-20T21:22:40.000Z | import smtplib
server = smtplib.SMTP('smtp.gmail.com', 587)
server.starttls()
server.login("tt0815550@gmail.com", "AureliaK1609")
msg = "YOUR MESSAGE!"
server.sendmail("e.kaczmarek01@gmail.com", "tt0815550@gmail.com", msg)
server.quit()
| 21.818182 | 70 | 0.7375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 112 | 0.466667 |
f2925fa462ff21785df92756f554dc30e7733df7 | 1,450 | py | Python | app/cipher_caesar.py | igorsilva3/cipher-of-caesar | 2024dae7eb795f273785e9622d9e20a49cea089d | [
"MIT"
] | 2 | 2020-09-30T00:04:59.000Z | 2020-10-02T14:33:56.000Z | app/cipher_caesar.py | igorsilva3/cipher-of-caesar | 2024dae7eb795f273785e9622d9e20a49cea089d | [
"MIT"
] | null | null | null | app/cipher_caesar.py | igorsilva3/cipher-of-caesar | 2024dae7eb795f273785e9622d9e20a49cea089d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import string
class Caesar(object):
def __init__(self):
self.ALPHABET = string.ascii_letters
def character_type(self, character):
""" Returns the alphabet box """
if character.isupper():
return string.ascii_uppercase
... | 29 | 63 | 0.512414 | 1,373 | 0.946897 | 0 | 0 | 0 | 0 | 0 | 0 | 148 | 0.102069 |
f292addc6e3042f36d3fbfdde0bec8e8159cc0d4 | 193 | py | Python | Desafio049.py | tmoura1981/Python_Exercicios | c873e2758dfd9058d2c2d83b5b38b522c6264029 | [
"MIT"
] | 1 | 2021-11-25T11:19:59.000Z | 2021-11-25T11:19:59.000Z | Desafio049.py | tmoura1981/Python_Exercicios | c873e2758dfd9058d2c2d83b5b38b522c6264029 | [
"MIT"
] | null | null | null | Desafio049.py | tmoura1981/Python_Exercicios | c873e2758dfd9058d2c2d83b5b38b522c6264029 | [
"MIT"
] | null | null | null | # Informe um nº e mostre sua tabuada
print('-' * 36)
n = int(input('Digite um nº e veja sua tabuada: '))
print('=' * 36)
for i in range(1, 11):
print(n, 'x', i, '=', n * i)
print('=' * 36)
| 24.125 | 51 | 0.554404 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 88 | 0.451282 |
f292e080e8bc6567932c91ed5f7d509146d3ac76 | 473 | py | Python | programming-logic/teste.py | raulrosapacheco/python3-udemy | b84e6f82417aecd0e2a28c3fb3cb222e057a660b | [
"MIT"
] | null | null | null | programming-logic/teste.py | raulrosapacheco/python3-udemy | b84e6f82417aecd0e2a28c3fb3cb222e057a660b | [
"MIT"
] | null | null | null | programming-logic/teste.py | raulrosapacheco/python3-udemy | b84e6f82417aecd0e2a28c3fb3cb222e057a660b | [
"MIT"
] | null | null | null | """
Split: dividir string
Join: juntar uma lista (str)
Enumerate: enumerar elementos da lista (iteráveis)
"""
string ='O Brasil é o pais do futebol, o Brasil é penta.'
lista_1 = string.split(' ')
lista_2 = string.split(',')
print(lista_1)
print(lista_2)
palavra = ''
contagem = 0
for valor in lista_1:
print(f'A pal... | 23.65 | 73 | 0.69556 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 231 | 0.485294 |
f293d5631b8815a984d95fcfd9fd7e627ddefdd5 | 484 | py | Python | tests/conftest.py | 12rambau/commitizen | 4309813974b6be72a246d47fc77f4c7f8ef64be1 | [
"MIT"
] | 866 | 2020-03-18T06:09:07.000Z | 2022-03-30T15:46:17.000Z | tests/conftest.py | 12rambau/commitizen | 4309813974b6be72a246d47fc77f4c7f8ef64be1 | [
"MIT"
] | 364 | 2020-03-18T02:13:09.000Z | 2022-03-31T01:57:12.000Z | tests/conftest.py | 12rambau/commitizen | 4309813974b6be72a246d47fc77f4c7f8ef64be1 | [
"MIT"
] | 136 | 2020-03-20T18:06:32.000Z | 2022-03-31T00:02:34.000Z | import pytest
from commitizen import cmd
@pytest.fixture(scope="function")
def tmp_git_project(tmpdir):
with tmpdir.as_cwd():
cmd.run("git init")
yield tmpdir
@pytest.fixture(scope="function")
def tmp_commitizen_project(tmp_git_project):
with tmp_git_project.as_cwd():
tmp_commitize... | 23.047619 | 80 | 0.71281 | 0 | 0 | 368 | 0.760331 | 436 | 0.900826 | 0 | 0 | 86 | 0.177686 |
f2957c2436185eaacb1c43fe2b6685f21c467731 | 188 | py | Python | python/testData/inspections/PyStringFormatInspection/PackedRefInsideList.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/inspections/PyStringFormatInspection/PackedRefInsideList.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/inspections/PyStringFormatInspection/PackedRefInsideList.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | list = [3, 4]
"{3}".format(*[1, 2, *list])
"{4}".format(*[1, 2, *list])
"{1}".format(*[1, 2, *list])
"{3}".format(*[*list, 1, 2])
"{4}".format(*[*list, 1, 2])
"{1}".format(*[*list, 1, 2]) | 23.5 | 28 | 0.446809 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 0.159574 |
f296278ff7fbbd618f4bc706e8d6af3757d8034e | 2,547 | py | Python | grizzly_cli/argparse/__init__.py | mgor/grizzly-cli | 00da1a5a822baefedf61497120fd52dbb5203f12 | [
"MIT"
] | null | null | null | grizzly_cli/argparse/__init__.py | mgor/grizzly-cli | 00da1a5a822baefedf61497120fd52dbb5203f12 | [
"MIT"
] | null | null | null | grizzly_cli/argparse/__init__.py | mgor/grizzly-cli | 00da1a5a822baefedf61497120fd52dbb5203f12 | [
"MIT"
] | 1 | 2021-11-02T09:36:21.000Z | 2021-11-02T09:36:21.000Z | import sys
import re
from typing import Any, Optional, IO, Sequence
from argparse import ArgumentParser as CoreArgumentParser, Namespace, _SubParsersAction
from .markdown import MarkdownFormatter, MarkdownHelpAction
from .bashcompletion import BashCompletionAction, hook as bashcompletion_hook
ArgumentSubParser = _S... | 38.014925 | 131 | 0.645465 | 2,208 | 0.866902 | 0 | 0 | 0 | 0 | 0 | 0 | 415 | 0.162937 |
f296a031d5f0c54dcf0daafc3b2597cd41d7d8ee | 524 | py | Python | sharedData.py | vidalmatheus/DS.com | 47b8d3cbb6d9ecd30178c4ba76408191c0715866 | [
"MIT"
] | null | null | null | sharedData.py | vidalmatheus/DS.com | 47b8d3cbb6d9ecd30178c4ba76408191c0715866 | [
"MIT"
] | null | null | null | sharedData.py | vidalmatheus/DS.com | 47b8d3cbb6d9ecd30178c4ba76408191c0715866 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request, redirect,Blueprint, json, url_for, session
from modules import dataBase,usuario
import psycopg2, os, subprocess, bcrypt
#
#def getData():
# DATABASE_URL = os.environ['DATABASE_URL']
# con = psycopg2.connect(DATABASE_URL, sslmode='require')
# return con
###... | 20.96 | 93 | 0.740458 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 227 | 0.433206 |
f29854376d62be05bf8d63dd4375c7cfd29ed77c | 6,192 | py | Python | ipa_util/validate.py | koolspin/vipa | f5b79a6ab4ce60975ff5ee6f173b97eebaf99b14 | [
"MIT"
] | null | null | null | ipa_util/validate.py | koolspin/vipa | f5b79a6ab4ce60975ff5ee6f173b97eebaf99b14 | [
"MIT"
] | null | null | null | ipa_util/validate.py | koolspin/vipa | f5b79a6ab4ce60975ff5ee6f173b97eebaf99b14 | [
"MIT"
] | null | null | null | import plistlib
from pathlib import Path
from datetime import datetime, timezone, timedelta
class Validate:
"""
Validate an unpacked .ipa file in various ways
The following rules are enforced. All are treated as errors, except as noted:
req-001: The root must contain a sub-directory called 'Payload'
... | 41.837838 | 152 | 0.653424 | 6,096 | 0.984496 | 0 | 0 | 231 | 0.037306 | 0 | 0 | 2,889 | 0.46657 |
f2995fcdd8762cd23c69c1f140cd16f1c0b58140 | 6,183 | py | Python | merlin/analysis/sequential.py | greentea1079/MERlin | f4c50cb15722263ee9397561b9ce4b2eddc3d559 | [
"MIT"
] | 14 | 2019-08-19T15:26:44.000Z | 2022-01-12T16:38:42.000Z | merlin/analysis/sequential.py | greentea1079/MERlin | f4c50cb15722263ee9397561b9ce4b2eddc3d559 | [
"MIT"
] | 60 | 2019-08-19T15:48:37.000Z | 2021-11-11T19:19:18.000Z | merlin/analysis/sequential.py | epigen-UCSD/MERlin | 3aa784fb28a2a4ebae92cfaf3a72f30a459daab9 | [
"MIT"
] | 13 | 2019-08-16T06:03:23.000Z | 2021-08-02T15:52:46.000Z | import pandas
import rtree
import networkx
import numpy as np
import cv2
from skimage.measure import regionprops
from merlin.core import analysistask
from merlin.util import imagefilters
class SumSignal(analysistask.ParallelAnalysisTask):
"""
An analysis task that calculates the signal intensity within the ... | 37.472727 | 80 | 0.603105 | 5,989 | 0.968624 | 0 | 0 | 0 | 0 | 0 | 0 | 975 | 0.15769 |
f29a992ba965f8e9cb047c742d3ca46176d0fa03 | 3,012 | py | Python | netests/comparators/facts_compare.py | Netests/netests | 1a48bda461761c4ec854d6fa0c38629049009a4a | [
"MIT"
] | 14 | 2020-06-08T07:34:59.000Z | 2022-03-14T08:52:03.000Z | netests/comparators/facts_compare.py | Netests/netests | 1a48bda461761c4ec854d6fa0c38629049009a4a | [
"MIT"
] | null | null | null | netests/comparators/facts_compare.py | Netests/netests | 1a48bda461761c4ec854d6fa0c38629049009a4a | [
"MIT"
] | 3 | 2020-06-19T03:57:05.000Z | 2020-06-22T22:46:42.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from nornir.core.task import Task
from netests import log
from netests.tools.file import open_file
from netests.protocols.facts import Facts
from netests.select_vars import select_host_vars
from netests.comparators.log_compare import log_compare, log_no_yaml_data
from net... | 31.705263 | 75 | 0.60259 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 383 | 0.127158 |
f29b2579ee8dd83fbc2ef37d5767b8505b228c21 | 1,579 | py | Python | graph.py | shinmura0/tkinter_kouza | 1617a01591bf3cee808c4b3e62dc785cc76381f2 | [
"MIT"
] | null | null | null | graph.py | shinmura0/tkinter_kouza | 1617a01591bf3cee808c4b3e62dc785cc76381f2 | [
"MIT"
] | null | null | null | graph.py | shinmura0/tkinter_kouza | 1617a01591bf3cee808c4b3e62dc785cc76381f2 | [
"MIT"
] | null | null | null | #おまじない
from tkinter import Tk, Button, X, Frame, GROOVE, W, E, Label, Entry, END
import numpy as np
import os
from matplotlib import pyplot as plt
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
# プロットする関数
def graph(data):
# 大きさ(6,3)のグラフを生成する
fig = plt.Figure(figsize=(6,3... | 24.292308 | 82 | 0.60038 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 718 | 0.360985 |
f29df525d2aaa21035a1c17e65dbb2cbbc6a88ba | 1,326 | py | Python | levis/encoding.py | rawg/levis | 33cd6c915f51134f79f3586dc0e4a6072247b568 | [
"MIT"
] | 42 | 2016-06-29T21:13:02.000Z | 2022-01-23T03:23:59.000Z | levis/encoding.py | rawg/levis | 33cd6c915f51134f79f3586dc0e4a6072247b568 | [
"MIT"
] | null | null | null | levis/encoding.py | rawg/levis | 33cd6c915f51134f79f3586dc0e4a6072247b568 | [
"MIT"
] | 12 | 2016-07-18T20:46:55.000Z | 2021-06-13T16:08:37.000Z | # coding=utf-8
"""
"""
from . import mutation
from . import crossover
from . import base
class BinaryGA(base.GeneticAlgorithm):
"""A binary encoded genetic algorithm."""
def num_bits(self):
"""Return the number of bits used by the encoding scheme.
Returns:
int: The number of bi... | 26.52 | 79 | 0.662142 | 1,224 | 0.923077 | 0 | 0 | 0 | 0 | 0 | 0 | 444 | 0.334842 |
f29ee11e7e85111e249a8c2b4d2fb8ce2bd1370b | 1,230 | py | Python | mopidy_monobox/__init__.py | oxullo/mopidy-monobox | 3cf9077e49afb0f0171f990cc4205cc348dcda1d | [
"Apache-2.0"
] | null | null | null | mopidy_monobox/__init__.py | oxullo/mopidy-monobox | 3cf9077e49afb0f0171f990cc4205cc348dcda1d | [
"Apache-2.0"
] | null | null | null | mopidy_monobox/__init__.py | oxullo/mopidy-monobox | 3cf9077e49afb0f0171f990cc4205cc348dcda1d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import logging
import os
# TODO: Remove entirely if you don't register GStreamer elements below
import pygst
pygst.require('0.10')
import gst
import gobject
from mopidy import config, ext
__version__ = '0.1.0'
# TODO: If you ne... | 26.170213 | 77 | 0.688618 | 809 | 0.657724 | 0 | 0 | 0 | 0 | 0 | 0 | 328 | 0.266667 |
f2a0401693fdb2fa350f876989f4e1cc6a3ea3c3 | 698 | py | Python | im3agents/tests/test_farmers.py | IMMM-SFA/im3agents | 544e89803379a44108227e9cd83ce09f6974fe2d | [
"BSD-2-Clause"
] | null | null | null | im3agents/tests/test_farmers.py | IMMM-SFA/im3agents | 544e89803379a44108227e9cd83ce09f6974fe2d | [
"BSD-2-Clause"
] | 4 | 2020-05-27T18:50:29.000Z | 2020-09-24T14:27:00.000Z | im3agents/tests/test_farmers.py | IMMM-SFA/im3agents | 544e89803379a44108227e9cd83ce09f6974fe2d | [
"BSD-2-Clause"
] | null | null | null | """Farmer class tests.
:author: Someone
:email: someone@pnnl.gov
License: BSD 2-Clause, see LICENSE and DISCLAIMER files
"""
import unittest
from im3agents import FarmerOne
class TestFarmers(unittest.TestCase):
def test_farmerone(self):
error_min_age = FarmerOne(age=-1)
error_max_age ... | 19.388889 | 56 | 0.659026 | 462 | 0.661891 | 0 | 0 | 0 | 0 | 0 | 0 | 208 | 0.297994 |
f2a1157fdb66b63890403106ad4f269358b5419e | 1,744 | py | Python | day-24/part-1/th-ch.py | evqna/adventofcode-2020 | 526bb9c87057d02bda4de9647932a0e25bdb3a5b | [
"MIT"
] | 12 | 2020-11-30T19:22:18.000Z | 2021-06-21T05:55:58.000Z | day-24/part-1/th-ch.py | evqna/adventofcode-2020 | 526bb9c87057d02bda4de9647932a0e25bdb3a5b | [
"MIT"
] | 13 | 2020-11-30T17:27:22.000Z | 2020-12-22T17:43:13.000Z | day-24/part-1/th-ch.py | evqna/adventofcode-2020 | 526bb9c87057d02bda4de9647932a0e25bdb3a5b | [
"MIT"
] | 3 | 2020-12-01T08:49:40.000Z | 2022-03-26T21:47:38.000Z | from tool.runners.python import SubmissionPy
WHITE = 0
BLACK = 1
DIRECTIONS = {
"e": (-1, 0), # (x, y) with axes right/bottom
"se": (-0.5, 1),
"sw": (0.5, 1),
"w": (1, 0),
"nw": (0.5, -1),
"ne": (-0.5, -1),
}
class ThChSubmission(SubmissionPy):
def run(self, s):
flipped_tiles = {... | 25.275362 | 78 | 0.614106 | 666 | 0.381881 | 0 | 0 | 0 | 0 | 0 | 0 | 789 | 0.452408 |
f2a14427a74c318066628e0e58bdecded62e08df | 259 | py | Python | Python/tais_formula.py | mimseyedi/Kattis | a99ea2112544e89cc466feb7d81ffe6eb017f7e2 | [
"MIT"
] | null | null | null | Python/tais_formula.py | mimseyedi/Kattis | a99ea2112544e89cc466feb7d81ffe6eb017f7e2 | [
"MIT"
] | null | null | null | Python/tais_formula.py | mimseyedi/Kattis | a99ea2112544e89cc466feb7d81ffe6eb017f7e2 | [
"MIT"
] | null | null | null | n = int(input())
l1 = list()
l2 = list()
for _ in range(n):
t, v = input().split()
l1.append(int(t))
l2.append(float(v))
result = 0
for i in range(len(l1) - 1):
result += ((l2[i] + l2[i + 1]) / 2) * (l1[i + 1] - l1[i])
print(result / 1000)
| 17.266667 | 61 | 0.505792 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f2a16388d4271df1ce952f8cf5640d703d0a37c8 | 66 | py | Python | nyoka/PMML44/doc/source/scripts/metadata.py | maxibor/nyoka | 19f480eee608035aa5fba368c96d4143bc2f5710 | [
"Apache-2.0"
] | 71 | 2020-08-24T07:59:56.000Z | 2022-03-21T08:36:35.000Z | nyoka/PMML44/doc/source/scripts/metadata.py | maxibor/nyoka | 19f480eee608035aa5fba368c96d4143bc2f5710 | [
"Apache-2.0"
] | 16 | 2020-09-02T10:27:36.000Z | 2022-03-31T05:37:12.000Z | nyoka/PMML44/doc/source/scripts/metadata.py | nimeshgit/nyoka | 43bf049825922213eeb3e6a8f39864f9b75d01d5 | [
"Apache-2.0"
] | 16 | 2020-09-17T15:01:33.000Z | 2022-03-28T03:13:25.000Z | __version__ = '3.1.0rc1'
__license__ = "Apache Software License"
| 16.5 | 39 | 0.742424 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 35 | 0.530303 |
f2a1b14f9c19a43e8614ebf25a3e38b7faa2cee4 | 126 | py | Python | 2375.py | ShawonBarman/URI-Online-judge-Ad-Hoc-level-problem-solution-in-python | 9a0f0ad5efd4a9e73589c357ab4b34b7c73a11da | [
"MIT"
] | 1 | 2022-01-14T08:45:32.000Z | 2022-01-14T08:45:32.000Z | 2375.py | ShawonBarman/URI-Online-judge-Ad-Hoc-level-problem-solution-in-python | 9a0f0ad5efd4a9e73589c357ab4b34b7c73a11da | [
"MIT"
] | null | null | null | 2375.py | ShawonBarman/URI-Online-judge-Ad-Hoc-level-problem-solution-in-python | 9a0f0ad5efd4a9e73589c357ab4b34b7c73a11da | [
"MIT"
] | null | null | null | n = int(input())
a, l, p = map(int, input().split())
if a >= n and l >= n and p >= n:
print("S")
else:
print("N") | 21 | 36 | 0.460317 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.047619 |
f2a1e765b746fab626eeae28ec0da8d5f9142f43 | 643 | py | Python | modules/constant.py | aubravo/Clasificacion-de-actividad-volcanica | 0f7be0d77509fa13948a0f714103ce6e6d8cb2ae | [
"MIT"
] | 1 | 2021-10-20T02:42:20.000Z | 2021-10-20T02:42:20.000Z | modules/constant.py | aubravo/ActividadVolcanica | 0f7be0d77509fa13948a0f714103ce6e6d8cb2ae | [
"MIT"
] | null | null | null | modules/constant.py | aubravo/ActividadVolcanica | 0f7be0d77509fa13948a0f714103ce6e6d8cb2ae | [
"MIT"
] | null | null | null | """----------------------------------------------------------------------------
This is the core of the parsing stage:
*re_find comments will search for everything between the $$ and EOL
*re_findDataLabels will search for everything between the start of a tag
(##) and the start of the next tag ignoring the... | 45.928571 | 79 | 0.494557 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 561 | 0.872473 |
f2a2b6ab09a985aa72dfef0d5e15e51b49c536f0 | 607,382 | py | Python | submission/custom_reinforcement_learning_geesenet.py | peterbonnesoeur/HandyRL | bb180677cb2d8268317b95c35c98d4536dd906f1 | [
"MIT"
] | null | null | null | submission/custom_reinforcement_learning_geesenet.py | peterbonnesoeur/HandyRL | bb180677cb2d8268317b95c35c98d4536dd906f1 | [
"MIT"
] | null | null | null | submission/custom_reinforcement_learning_geesenet.py | peterbonnesoeur/HandyRL | bb180677cb2d8268317b95c35c98d4536dd906f1 | [
"MIT"
] | null | null | null |
# This is a lightweight ML agent trained by self-play.
# After sharing this notebook,
# we will add Hungry Geese environment in our HandyRL library.
# https://github.com/DeNA/HandyRL
# We hope you enjoy reinforcement learning!
import pickle
import bz2
import base64
import numpy as np
import torch
import torch.nn as ... | 5,281.582609 | 604,151 | 0.966882 | 1,426 | 0.002348 | 0 | 0 | 0 | 0 | 0 | 0 | 604,722 | 0.995621 |
f2a3e15dbd9f5aecf7c8735a8a4cd1ee5164b116 | 5,879 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/f5networks/f5_modules/tests/unit/modules/network/f5/test_bigip_message_routing_transport_config.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 1 | 2020-01-22T13:11:23.000Z | 2020-01-22T13:11:23.000Z | venv/lib/python3.6/site-packages/ansible_collections/f5networks/f5_modules/tests/unit/modules/network/f5/test_bigip_message_routing_transport_config.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible_collections/f5networks/f5_modules/tests/unit/modules/network/f5/test_bigip_message_routing_transport_config.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright: (c) 2019, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import json
import pytest
import sys
if sys.version_info < (2... | 33.403409 | 136 | 0.628678 | 4,553 | 0.774451 | 0 | 0 | 0 | 0 | 0 | 0 | 1,282 | 0.218064 |
f2a46d1dd481c7acb620b8393b2d3f64e291c4db | 3,062 | py | Python | externals/IBK/scripts/personaltypes.py | Arombolosh/PVTool | 043f4c94b1f473e6e26b2ee0da8e6a064d9343c5 | [
"BSD-3-Clause"
] | 2 | 2020-06-03T08:22:25.000Z | 2020-06-04T13:05:19.000Z | externals/IBK/scripts/personaltypes.py | Arombolosh/PVTool | 043f4c94b1f473e6e26b2ee0da8e6a064d9343c5 | [
"BSD-3-Clause"
] | null | null | null | externals/IBK/scripts/personaltypes.py | Arombolosh/PVTool | 043f4c94b1f473e6e26b2ee0da8e6a064d9343c5 | [
"BSD-3-Clause"
] | null | null | null | ############################################################################
#
# Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
# Contact: http://www.qt-project.org/legal
#
# This file is part of Qt Creator.
#
# Commercial License Usage
# Licensees holding valid commercial Qt licenses may use this file in
# ... | 39.25641 | 78 | 0.68452 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,813 | 0.918681 |
f2a4c80d5b858823c4ef9a8432cc56f697eb6900 | 3,618 | py | Python | tests/test_builder_path_parameter.py | tabebqena/flask-open-spec | ee1fd9cd349e46e1d8295fc2799898731392af6a | [
"MIT"
] | null | null | null | tests/test_builder_path_parameter.py | tabebqena/flask-open-spec | ee1fd9cd349e46e1d8295fc2799898731392af6a | [
"MIT"
] | null | null | null | tests/test_builder_path_parameter.py | tabebqena/flask-open-spec | ee1fd9cd349e46e1d8295fc2799898731392af6a | [
"MIT"
] | null | null | null | from ..open_oas.builder.builder import OasBuilder
from unittest import TestCase
from ..tests.schemas.schemas import PaginationSchema
from ..open_oas.decorators import Deferred, path_parameter
class TestPathParameter(TestCase):
def run_tests(self, builder: OasBuilder):
data = builder.get_data()
par... | 30.661017 | 68 | 0.369541 | 3,423 | 0.946103 | 0 | 0 | 0 | 0 | 0 | 0 | 759 | 0.209784 |
f2a53c9d24ff35deb138d84a030fd47b3eb06aa1 | 3,214 | py | Python | Proj/2048/test_with_f/tpybrain.py | PiscesDream/Ideas | 9ba710e62472f183ae4525f35659cd265c71392e | [
"Apache-2.0"
] | null | null | null | Proj/2048/test_with_f/tpybrain.py | PiscesDream/Ideas | 9ba710e62472f183ae4525f35659cd265c71392e | [
"Apache-2.0"
] | null | null | null | Proj/2048/test_with_f/tpybrain.py | PiscesDream/Ideas | 9ba710e62472f183ae4525f35659cd265c71392e | [
"Apache-2.0"
] | null | null | null | from load import *
from _2048 import _2048
from numpy import *
from pybrain.datasets import ClassificationDataSet
from pybrain.utilities import percentError
from pybrain.tools.shortcuts import buildNetwork
from pybrain.supervised.trainers import BackpropTrainer
from pybrain.structure.modules ... | 30.903846 | 120 | 0.528002 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 232 | 0.072184 |
f2a5d347767b990fa97d063da0ee6a2aa890bd9d | 2,757 | py | Python | run.py | mishel254/py-password-locker | c14dd314251f078125df39104b99384c8cbd292b | [
"MIT"
] | null | null | null | run.py | mishel254/py-password-locker | c14dd314251f078125df39104b99384c8cbd292b | [
"MIT"
] | null | null | null | run.py | mishel254/py-password-locker | c14dd314251f078125df39104b99384c8cbd292b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3.8
from passwords import Credentials
from login import accounts
import random
#create credentials func
def create(fname,lname,user,passwords,email):
newCredentials = Credentials(fname,lname,user,passwords,email)
return newCredentials
#delete
'''
function to delete credentials & accounts
'... | 22.056 | 73 | 0.573087 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 724 | 0.262604 |
f2a7f8c88dbf4887b1d166b409dc1bae27f7d5b9 | 815 | py | Python | tests/test_templates.py | knipknap/django_searchable | 6fd9f8aa766477e8648fdbed720e966af1b216b7 | [
"MIT"
] | 62 | 2018-11-05T09:06:39.000Z | 2022-02-18T15:33:06.000Z | tests/test_templates.py | knipknap/django_searchable | 6fd9f8aa766477e8648fdbed720e966af1b216b7 | [
"MIT"
] | 4 | 2018-11-05T07:57:27.000Z | 2021-05-30T00:37:35.000Z | tests/test_templates.py | knipknap/django_searchable | 6fd9f8aa766477e8648fdbed720e966af1b216b7 | [
"MIT"
] | 8 | 2018-11-08T16:10:04.000Z | 2022-01-27T09:31:53.000Z |
from django.test import TestCase
from django.test.client import RequestFactory
from django.template import Template, Context
from django.template.loader import render_to_string
from .models import Author, Book
expected_headers = '''
<tr>
<th>Name</th><th>The title</th><th>Comment</th><th>Stars</th><th>AuthorID</th>
<... | 32.6 | 78 | 0.69816 | 476 | 0.584049 | 0 | 0 | 0 | 0 | 0 | 0 | 149 | 0.182822 |
f2a86a4dc06766b095f7432edceef5b58b99f8ac | 103,875 | py | Python | diabolo_play/scripts/interactive_play.py | omron-sinicx/diabolo | a0258fdf634d27c7cf185b2e40c6b12699417d36 | [
"BSD-3-Clause"
] | 11 | 2021-10-15T15:51:24.000Z | 2021-12-26T16:43:17.000Z | diabolo_play/scripts/interactive_play.py | omron-sinicx/diabolo | a0258fdf634d27c7cf185b2e40c6b12699417d36 | [
"BSD-3-Clause"
] | null | null | null | diabolo_play/scripts/interactive_play.py | omron-sinicx/diabolo | a0258fdf634d27c7cf185b2e40c6b12699417d36 | [
"BSD-3-Clause"
] | 1 | 2022-02-01T01:58:37.000Z | 2022-02-01T01:58:37.000Z | #!/usr/bin/env python
import sys
import copy
import rospy
import tf_conversions
import tf.transformations as transform
import tf
from math import pi
import math
import thread
import os
import random
import geometry_msgs.msg
from geometry_msgs.msg import Pose, PoseArray
from trajectory_msgs.msg import JointTrajectory, J... | 44.014831 | 142 | 0.575779 | 96,025 | 0.924428 | 0 | 0 | 0 | 0 | 0 | 0 | 25,587 | 0.246325 |
f2a9847b819084a601442dc4d30086db0ba4a8ad | 1,378 | py | Python | genius.py | fedecalendino/alfred-lyrics-finder | 771eb9ddcd1849b6095b2e7b16a2335d25c74f30 | [
"MIT"
] | 3 | 2020-09-14T01:07:11.000Z | 2021-03-12T09:43:12.000Z | genius.py | fedecalendino/alfred-lyrics-finder | 771eb9ddcd1849b6095b2e7b16a2335d25c74f30 | [
"MIT"
] | null | null | null | genius.py | fedecalendino/alfred-lyrics-finder | 771eb9ddcd1849b6095b2e7b16a2335d25c74f30 | [
"MIT"
] | null | null | null | from workflow import web
class APIException(Exception):
def __init__(self, status, message, url):
self.status = status
self.message = message
self.url = url
super(APIException, self).__init__(
"{status} > {message}".format(
status=self.status,
... | 26 | 85 | 0.564586 | 1,347 | 0.977504 | 0 | 0 | 0 | 0 | 0 | 0 | 189 | 0.137155 |
f2ab54aefe1c397702c020ba41c25aedb91b9d9b | 555 | py | Python | setup.py | akvatol/CosmOrc | 6ee1e1f3521a6d2b4c8eec104fa4e93db32d9352 | [
"MIT"
] | 1 | 2018-12-07T17:21:39.000Z | 2018-12-07T17:21:39.000Z | setup.py | akvatol/CosmOrc | 6ee1e1f3521a6d2b4c8eec104fa4e93db32d9352 | [
"MIT"
] | 8 | 2018-11-23T10:05:01.000Z | 2019-04-09T19:17:43.000Z | setup.py | akvatol/CosmOrc | 6ee1e1f3521a6d2b4c8eec104fa4e93db32d9352 | [
"MIT"
] | 1 | 2018-12-07T17:21:40.000Z | 2018-12-07T17:21:40.000Z | from setuptools import setup, find_packages
setup(
name='CosmOrc',
version='0.1',
include_package_data=True,
packages=find_packages(),
python_requires='>=3.6',
install_requires=[
'Click==7.0',
'numpy==1.16.2',
'pandas==0.24.2',
'pyaml==19.4.1',
'PySnooper... | 21.346154 | 43 | 0.506306 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 244 | 0.43964 |
f2ac969d340070fc7df625b368680b8b1a6e1f30 | 323 | py | Python | src/ralph/assets/filters.py | DoNnMyTh/ralph | 97b91639fa68965ad3fd9d0d2652a6545a2a5b72 | [
"Apache-2.0"
] | 1,668 | 2015-01-01T12:51:20.000Z | 2022-03-29T09:05:35.000Z | src/ralph/assets/filters.py | hq-git/ralph | e2448caf02d6e5abfd81da2cff92aefe0a534883 | [
"Apache-2.0"
] | 2,314 | 2015-01-02T13:26:26.000Z | 2022-03-29T04:06:03.000Z | src/ralph/assets/filters.py | hq-git/ralph | e2448caf02d6e5abfd81da2cff92aefe0a534883 | [
"Apache-2.0"
] | 534 | 2015-01-05T12:40:28.000Z | 2022-03-29T21:10:12.000Z | from ralph.admin.filters import DateListFilter
class BuyoutDateFilter(DateListFilter):
def queryset(self, request, queryset):
queryset = super().queryset(request, queryset)
if queryset is not None:
queryset = queryset.filter(model__category__show_buyout_date=True)
return querys... | 32.3 | 78 | 0.724458 | 273 | 0.845201 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f2ada1e33fb51298d8dea6d25a8d7c5459098cce | 3,976 | py | Python | sweetie_bot_flexbe_behaviors/src/sweetie_bot_flexbe_behaviors/rbc18part2_sm.py | sweetie-bot-project/sweetie_bot_flexbe_behaviors | d8511564bb9d6125838b4373263fb68a8b858d70 | [
"BSD-3-Clause"
] | null | null | null | sweetie_bot_flexbe_behaviors/src/sweetie_bot_flexbe_behaviors/rbc18part2_sm.py | sweetie-bot-project/sweetie_bot_flexbe_behaviors | d8511564bb9d6125838b4373263fb68a8b858d70 | [
"BSD-3-Clause"
] | null | null | null | sweetie_bot_flexbe_behaviors/src/sweetie_bot_flexbe_behaviors/rbc18part2_sm.py | sweetie-bot-project/sweetie_bot_flexbe_behaviors | d8511564bb9d6125838b4373263fb68a8b858d70 | [
"BSD-3-Clause"
] | 1 | 2019-12-23T05:06:26.000Z | 2019-12-23T05:06:26.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###########################################################
# WARNING: Generated code! #
# ************************** #
# Manual changes may get lost if file is generated again. #
# Only code inside the [MANUAL] ta... | 37.866667 | 217 | 0.647133 | 3,142 | 0.790241 | 0 | 0 | 0 | 0 | 0 | 0 | 1,800 | 0.452716 |
f2b258bd5e08c7cfd6f403dd7e2e5de3a6cb8a04 | 9,512 | py | Python | steel_segmentation/utils.py | marcomatteo/steel-segmentation-nbdev | dde19b0b3bf7657ab575e691bca1751592aecc67 | [
"Apache-2.0"
] | 1 | 2021-08-20T14:56:26.000Z | 2021-08-20T14:56:26.000Z | steel_segmentation/utils.py | marcomatteo/steel-segmentation-nbdev | dde19b0b3bf7657ab575e691bca1751592aecc67 | [
"Apache-2.0"
] | 1 | 2021-05-03T16:42:34.000Z | 2021-05-03T16:42:34.000Z | steel_segmentation/utils.py | marcomatteo/steel_segmentation | dde19b0b3bf7657ab575e691bca1751592aecc67 | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/01_eda.ipynb (unless otherwise specified).
__all__ = ['palet', 'seed_everything', 'print_competition_data', 'get_train_pivot', 'get_train_df', 'count_pct',
'get_classification_df', 'rle2mask', 'make_mask', 'mask2rle', 'plot_mask_image', 'plot_defected_image',
... | 34.589091 | 114 | 0.637931 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,032 | 0.318621 |
f2b2b39cb97742f076427952e2dfe5b302a0b56b | 1,548 | py | Python | webapp/vaga_remanescente/views.py | prefeiturasp/SME-VagasNaCreche-API | 20ae8862375124c7459fe6ff2d2d33ed34d136fb | [
"0BSD"
] | null | null | null | webapp/vaga_remanescente/views.py | prefeiturasp/SME-VagasNaCreche-API | 20ae8862375124c7459fe6ff2d2d33ed34d136fb | [
"0BSD"
] | 9 | 2020-06-06T00:20:46.000Z | 2022-02-10T10:57:35.000Z | webapp/vaga_remanescente/views.py | prefeiturasp/SME-VagasNaCreche-API | 20ae8862375124c7459fe6ff2d2d33ed34d136fb | [
"0BSD"
] | 1 | 2020-09-17T14:46:24.000Z | 2020-09-17T14:46:24.000Z | import pickle
import zlib
from django.core.cache import cache
from fila_da_creche.queries.dt_atualizacao import get_dt_atualizacao
from rest_framework.response import Response
from rest_framework.views import APIView
from vaga_remanescente.queries.distrito import get_distritos
from vaga_remanescente.queries.dr... | 36 | 89 | 0.672481 | 1,048 | 0.676566 | 0 | 0 | 0 | 0 | 0 | 0 | 159 | 0.102647 |
f2b2b69ac9c8d9c5d5b9c1cb7f1d8d0174255511 | 2,310 | py | Python | utils/html_markup.py | carlboudreau007/BlockChain_Demo | fb90212e9a401aa3b757e49af7fd28d250bafbc4 | [
"MIT"
] | null | null | null | utils/html_markup.py | carlboudreau007/BlockChain_Demo | fb90212e9a401aa3b757e49af7fd28d250bafbc4 | [
"MIT"
] | null | null | null | utils/html_markup.py | carlboudreau007/BlockChain_Demo | fb90212e9a401aa3b757e49af7fd28d250bafbc4 | [
"MIT"
] | null | null | null | import glob
from flask import Markup
SERVER_OPTIONS = [{'text': 'Local Host', 'value': '127.0.0.1'},
{'text': 'Test weved23962', 'value': '10.201.144.167'},
{'text': 'Stage weves31263', 'value': '10.50.8.130'},
{'text': 'Prod wevep31172', 'value': '10.48.164.198'}
... | 32.535211 | 93 | 0.577056 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 899 | 0.389177 |
f2b606f246e1cf267d985e5ff3efcca86aeda8cd | 2,237 | py | Python | streamlit_app.py | sebastiandres/xkcd_streamlit | 68b1c01dd8eca34135126ebb33a2d539a0d25650 | [
"MIT"
] | 1 | 2021-07-21T03:20:52.000Z | 2021-07-21T03:20:52.000Z | streamlit_app.py | sebastiandres/xkcd_streamlit | 68b1c01dd8eca34135126ebb33a2d539a0d25650 | [
"MIT"
] | null | null | null | streamlit_app.py | sebastiandres/xkcd_streamlit | 68b1c01dd8eca34135126ebb33a2d539a0d25650 | [
"MIT"
] | null | null | null | import streamlit as st
from xkcd import xkcd_plot
from shared import translate, LANGUAGE_DICT
# Set page properties for the app
st.set_page_config(
page_title="Streamlit & XKCD",
layout="wide",
initial_sidebar_state="expanded",
)
# Initialize the session states - f_list has functions and colors
if 'f_list... | 37.283333 | 93 | 0.644166 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 618 | 0.276263 |
f2b72d00fd0e6778383cb9c2b7f0e084dcbc51b2 | 5,798 | py | Python | gui/wndRecipeProcedure.py | ralic/gnu_brewtools | ba09dc11e23d93e623f497286f3f2c3e9aaa41c2 | [
"BSD-3-Clause"
] | null | null | null | gui/wndRecipeProcedure.py | ralic/gnu_brewtools | ba09dc11e23d93e623f497286f3f2c3e9aaa41c2 | [
"BSD-3-Clause"
] | null | null | null | gui/wndRecipeProcedure.py | ralic/gnu_brewtools | ba09dc11e23d93e623f497286f3f2c3e9aaa41c2 | [
"BSD-3-Clause"
] | null | null | null | """
* Copyright (c) 2008, Flagon Slayer Brewery
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of ... | 35.570552 | 121 | 0.723698 | 4,085 | 0.704553 | 0 | 0 | 0 | 0 | 0 | 0 | 3,609 | 0.622456 |
f2b7bb0de76b2e0ba5ce5495b4efc9822958361d | 1,018 | py | Python | oidc_provider/migrations/0028_change_response_types_field_1_of_3.py | avallbona/django-oidc-provider | 93b41e9ada42ca7c4bd6c860de83793ba3701d68 | [
"MIT"
] | null | null | null | oidc_provider/migrations/0028_change_response_types_field_1_of_3.py | avallbona/django-oidc-provider | 93b41e9ada42ca7c4bd6c860de83793ba3701d68 | [
"MIT"
] | null | null | null | oidc_provider/migrations/0028_change_response_types_field_1_of_3.py | avallbona/django-oidc-provider | 93b41e9ada42ca7c4bd6c860de83793ba3701d68 | [
"MIT"
] | 1 | 2021-02-17T16:23:41.000Z | 2021-02-17T16:23:41.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2018-12-16 02:43
from __future__ import unicode_literals
from django.db import migrations, models
import oidc_provider.fields
class Migration(migrations.Migration):
dependencies = [
('oidc_provider', '0027_swappable_client_model'),
]
opera... | 37.703704 | 415 | 0.652259 | 832 | 0.817289 | 0 | 0 | 0 | 0 | 0 | 0 | 459 | 0.450884 |
f2b7c2a6955082c094b447b57a5e843a6c763e15 | 4,693 | py | Python | cyclegan/data/celeba/mask_face_region_with_avail_kpts.py | dingyanna/DepthNets | a13b05e315b0732b6a28594b1343a6940bbab229 | [
"MIT"
] | 114 | 2018-11-27T19:34:13.000Z | 2022-03-26T19:39:00.000Z | cyclegan/data/celeba/mask_face_region_with_avail_kpts.py | dingyanna/DepthNets | a13b05e315b0732b6a28594b1343a6940bbab229 | [
"MIT"
] | 9 | 2018-12-11T09:05:22.000Z | 2021-07-02T21:27:34.000Z | cyclegan/data/celeba/mask_face_region_with_avail_kpts.py | kdh4672/Face_Recognition_With_Augmentation | b0795b97c94bbba1a1e3310670d0868f3eacb479 | [
"MIT"
] | 32 | 2018-12-03T00:52:54.000Z | 2021-08-30T01:45:31.000Z | """
This module masks faces using kpts already detected
"""
import numpy as np
import argparse
import cv2
#from RCN.preprocessing.tools import BGR2Gray
from PIL import Image
import h5py
def get_parsed_keypoints(path):
with open(path) as f:
x = f.read()
y=x.split('\n')
z=[[int(i) for i in ... | 32.818182 | 97 | 0.603665 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,858 | 0.395909 |
f2b7d3d40db3233a8eadd8a94f91fbf6d7c9b69b | 589 | py | Python | task1/task1.py | ZHN202/opencv_learning | f0725955e6e525d3918c1117763bf0aaa4299777 | [
"MIT"
] | 1 | 2021-11-04T03:41:04.000Z | 2021-11-04T03:41:04.000Z | task1/task1.py | ZHN202/opencv_learning | f0725955e6e525d3918c1117763bf0aaa4299777 | [
"MIT"
] | null | null | null | task1/task1.py | ZHN202/opencv_learning | f0725955e6e525d3918c1117763bf0aaa4299777 | [
"MIT"
] | null | null | null | import cv2 as cv
import numpy as np
img = cv.imread('test.png')
# 将图片大小改为1920*1080h,s,v = cv.split(hsvimg)
img = cv.resize(img, dsize=(1920, 1080), fx=1, fy=1, interpolation=cv.INTER_NEAREST)
# hsv图像
hsvimg = cv.cvtColor(img, cv.COLOR_BGR2HSV)
lower_y = np.array([20, 43, 46])
upper_y = np.array([34, 255, 220])
mask ... | 26.772727 | 84 | 0.665535 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 102 | 0.164782 |
f2b89b6b2b0dc41d3a0e5d1ce5504c256753035d | 926 | py | Python | reservations/migrations/0001_initial.py | danielmicaletti/ride_cell | 910be09ebc714b8c744edaf81559c8a9266473e3 | [
"MIT"
] | null | null | null | reservations/migrations/0001_initial.py | danielmicaletti/ride_cell | 910be09ebc714b8c744edaf81559c8a9266473e3 | [
"MIT"
] | null | null | null | reservations/migrations/0001_initial.py | danielmicaletti/ride_cell | 910be09ebc714b8c744edaf81559c8a9266473e3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-26 00:00
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('parking', '0001_initial'),
]
ope... | 31.931034 | 158 | 0.62959 | 737 | 0.795896 | 0 | 0 | 0 | 0 | 0 | 0 | 251 | 0.271058 |
f2b9b881e8f73f67cedd4bd5a979546da0d9dcab | 988 | py | Python | textembedding/__init__.py | Hanscal/textembedding | 0076a7a67e1c0e0b3ebc4bbbfa9dcdcfbf16c4c7 | [
"MIT"
] | 1 | 2021-05-26T09:42:37.000Z | 2021-05-26T09:42:37.000Z | textembedding/__init__.py | Hanscal/textembedding | 0076a7a67e1c0e0b3ebc4bbbfa9dcdcfbf16c4c7 | [
"MIT"
] | null | null | null | textembedding/__init__.py | Hanscal/textembedding | 0076a7a67e1c0e0b3ebc4bbbfa9dcdcfbf16c4c7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@Time : 2021/2/26 12:07 下午
@Author : hcai
@Email : hua.cai@unidt.com
"""
import textembedding.get_embedding
import textembedding.load_model
name = "textbedding"
# 加载wv model
def load_word2vect(filepath):
model = textembedding.load_model.load_word2vect(fil... | 29.058824 | 122 | 0.765182 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 247 | 0.239341 |
f2ba3f6c4a26d42ba28e90efe9fded89ad4b027a | 385 | py | Python | Importing_&_Managing_Financial_Data/Importing_financial_data_from_the_web/Visualize_a_stock_price_trend.py | RKiddle/python_finance | 7c0ed2998c0f82a0998ba0cb06225453ba8ee3fe | [
"MIT"
] | 1 | 2021-04-28T01:26:38.000Z | 2021-04-28T01:26:38.000Z | Importing_&_Managing_Financial_Data/Importing_financial_data_from_the_web/Visualize_a_stock_price_trend.py | RKiddle/python_finance | 7c0ed2998c0f82a0998ba0cb06225453ba8ee3fe | [
"MIT"
] | null | null | null | Importing_&_Managing_Financial_Data/Importing_financial_data_from_the_web/Visualize_a_stock_price_trend.py | RKiddle/python_finance | 7c0ed2998c0f82a0998ba0cb06225453ba8ee3fe | [
"MIT"
] | null | null | null | # Import matplotlib.pyplot
import matplotlib.pyplot as plt
# Set start and end dates
start = date(2016, 1, 1)
end = date(2016, 12, 31)
# Set the ticker and data_source
ticker = 'FB'
data_source = 'google'
# Import the data using DataReader
stock_prices = DataReader(ticker, data_source, start, end)
# Plot Close
stoc... | 19.25 | 58 | 0.735065 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 163 | 0.423377 |
f2bbbde7ac14cbda28bc8fe761c19a1e71889708 | 2,808 | py | Python | pfrock/cli/config_parser.py | knightliao/pfrock | 33587f11caeeccc11d0b8219b4e02df153905486 | [
"Apache-2.0"
] | 62 | 2016-02-24T10:47:17.000Z | 2019-04-27T01:36:56.000Z | pfrock/cli/config_parser.py | knightliao/pfrock | 33587f11caeeccc11d0b8219b4e02df153905486 | [
"Apache-2.0"
] | 1 | 2019-04-19T12:13:21.000Z | 2021-08-10T09:16:09.000Z | pfrock/cli/config_parser.py | knightliao/pfrock | 33587f11caeeccc11d0b8219b4e02df153905486 | [
"Apache-2.0"
] | 24 | 2016-03-01T14:59:29.000Z | 2019-09-02T08:12:00.000Z | # !/usr/bin/env python
# coding=utf8
import json
import traceback
from tornado.web import RequestHandler
from pfrock.cli import logger
from pfrock.core.constants import PFROCK_CONFIG_SERVER, PFROCK_CONFIG_ROUTER, PFROCK_CONFIG_PORT, ROUTER_METHOD, \
ROUTER_PATH, ROUTER_OPTIONS, ROUTER_HANDLER
from pfrock.core.lib... | 33.428571 | 114 | 0.649217 | 2,442 | 0.869658 | 0 | 0 | 2,406 | 0.856838 | 0 | 0 | 111 | 0.03953 |
f2bdc8d9084d26a302efcbe7ca92780a65ffbfe3 | 3,722 | py | Python | src/resnet/resnetv2_3stage_gaussian.py | googleinterns/out-of-distribution | 84a2d5af59462f0943f629f742090b485ed50e61 | [
"Apache-2.0"
] | null | null | null | src/resnet/resnetv2_3stage_gaussian.py | googleinterns/out-of-distribution | 84a2d5af59462f0943f629f742090b485ed50e61 | [
"Apache-2.0"
] | null | null | null | src/resnet/resnetv2_3stage_gaussian.py | googleinterns/out-of-distribution | 84a2d5af59462f0943f629f742090b485ed50e61 | [
"Apache-2.0"
] | null | null | null | from typing import List, Union
import torch
from torch import nn
from torch.nn import functional as F
from src.modules.max_mahalanobis import MaxMahalanobis, GaussianResult
from src.modules.normalize import Normalize
from src.resnet.bottleneck_block_v2s3 import create_bottleneck_stage_v2s3
from src.resnet.shared impo... | 35.113208 | 109 | 0.671682 | 3,354 | 0.901128 | 0 | 0 | 0 | 0 | 0 | 0 | 605 | 0.162547 |
f2c0ef753b4cd8675d6db691f0d1c053e49d0236 | 504 | py | Python | assignments/Exercise_Lecture73_Phumeth.P.py | ZnoKunG/PythonProject | 388b5dfeb0161aee66094e7b2ecc2d6ed13588bd | [
"MIT"
] | null | null | null | assignments/Exercise_Lecture73_Phumeth.P.py | ZnoKunG/PythonProject | 388b5dfeb0161aee66094e7b2ecc2d6ed13588bd | [
"MIT"
] | null | null | null | assignments/Exercise_Lecture73_Phumeth.P.py | ZnoKunG/PythonProject | 388b5dfeb0161aee66094e7b2ecc2d6ed13588bd | [
"MIT"
] | null | null | null | systemMenu = {"ไก่ทอด": 35, "เป็ดทอด": 45, "ปลาทอด": 55, "ผักทอด": 20}
menuList = []
def showBill():
print("---- My Food----")
totalPrice = 0
for number in range(len(menuList)):
print(menuList[number][0],menuList[number][1])
totalPrice += int(menuList[number][1])
print("Totalprice :", t... | 28 | 70 | 0.613095 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 142 | 0.256318 |
f2c15988d8527886dc69eb42d21e16810aed3ba2 | 2,229 | py | Python | FetchTextFromRISE.py | RISE-MPIWG/hylg | 7d49e7aed0623d9730d5c8933030954fa8f729b0 | [
"MIT"
] | 1 | 2020-05-30T02:29:36.000Z | 2020-05-30T02:29:36.000Z | FetchTextFromRISE.py | RISE-MPIWG/hylg | 7d49e7aed0623d9730d5c8933030954fa8f729b0 | [
"MIT"
] | null | null | null | FetchTextFromRISE.py | RISE-MPIWG/hylg | 7d49e7aed0623d9730d5c8933030954fa8f729b0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import requests
import os
# 6000 is a large number to make sure we get all the components of a collection. Please do note that RISE also has a pagination feature,
# which can be implemented by clients if they wish.
per_page = 6000
# getting the list of collections that the user has access to:
... | 39.803571 | 139 | 0.682369 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 989 | 0.43897 |
f2c28b1aa80b1c46d32c2a27e47aa2e4dc3f68c8 | 612 | py | Python | ipfinder.py | robertas64/realGrowIp | bc1f1f4cf30eaa4091a6f81907a39eb8d3b66990 | [
"MIT"
] | 1 | 2022-03-09T23:21:18.000Z | 2022-03-09T23:21:18.000Z | ipfinder.py | njartemis/realGrowIp | bc1f1f4cf30eaa4091a6f81907a39eb8d3b66990 | [
"MIT"
] | null | null | null | ipfinder.py | njartemis/realGrowIp | bc1f1f4cf30eaa4091a6f81907a39eb8d3b66990 | [
"MIT"
] | 1 | 2021-04-16T16:11:24.000Z | 2021-04-16T16:11:24.000Z | # ___ ___ ___ _ _
# |_ _| _ \___| __(_)_ _ __| |___ _ _
# | || _/___| _|| | ' \/ _` / -_) '_|
# |___|_| |_| |_|_||_\__,_\___|_|
# Made by Robertas64
#Importing the module
import os
from time import *
banner = """
___ ___ ___ _ _
|_ _| _ \___| __(_)_ _ __| |_... | 22.666667 | 40 | 0.47549 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 536 | 0.875817 |
f2c4872a061796a24a75f519586680551cd85468 | 348 | py | Python | data.py | alantess/DDQN-BTC | 0fff185200dd1c16088dc322cbb7790b848c1e6d | [
"MIT"
] | 2 | 2021-01-12T08:59:54.000Z | 2022-02-07T23:41:49.000Z | data.py | alantess/DDQN-BTC | 0fff185200dd1c16088dc322cbb7790b848c1e6d | [
"MIT"
] | null | null | null | data.py | alantess/DDQN-BTC | 0fff185200dd1c16088dc322cbb7790b848c1e6d | [
"MIT"
] | null | null | null | import pandas as pd
import matplotlib.pyplot as plt
def retrieve_data():
train_data = 'data/Nov_btc.csv'
test_data = 'data/btc_test_data.csv'
df = pd.read_csv(test_data)
df = df.drop(columns=['date', 'weighted','volume'])
# Columns are set at close, high, low and open.
df = df.dropna()
data = ... | 23.2 | 55 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 113 | 0.324713 |
f2c664d27fab22d77e93ebebd90d26fccfda0d77 | 4,715 | py | Python | main.py | lucaswerner90/upc_dl_project_2021 | c02061da0e25a0b24a9b742074b87ac30f36586d | [
"MIT"
] | 2 | 2021-07-15T12:30:43.000Z | 2021-11-04T07:50:16.000Z | main.py | lucaswerner90/upc_dl_project_2021 | c02061da0e25a0b24a9b742074b87ac30f36586d | [
"MIT"
] | 30 | 2021-05-03T07:37:37.000Z | 2021-07-01T18:53:23.000Z | main.py | lucaswerner90/upc_dl_project_2021 | c02061da0e25a0b24a9b742074b87ac30f36586d | [
"MIT"
] | 1 | 2021-06-21T11:12:32.000Z | 2021-06-21T11:12:32.000Z | import argparse
import os
import torch
import torch.nn as nn
import torch.optim as optim
import argparse
from torch.utils.data import DataLoader
from torchvision import transforms
from dataset.main import Flickr8kDataset
from dataset.caps_collate import CapsCollate
from dataset.download import DownloadDataset
from mode... | 45.336538 | 196 | 0.759915 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,523 | 0.323012 |
f2c78a6895c6f2bb08f5bc34684b1ca6a132fd79 | 2,050 | py | Python | tests/FasterSubsetSumTests/test_randomizedBase.py | joakiti/Benchmark-SubsetSums | a875b5adf7f800d26b73516452904031c73ec29d | [
"MIT"
] | null | null | null | tests/FasterSubsetSumTests/test_randomizedBase.py | joakiti/Benchmark-SubsetSums | a875b5adf7f800d26b73516452904031c73ec29d | [
"MIT"
] | null | null | null | tests/FasterSubsetSumTests/test_randomizedBase.py | joakiti/Benchmark-SubsetSums | a875b5adf7f800d26b73516452904031c73ec29d | [
"MIT"
] | null | null | null | import unittest
from unittest import TestCase
from Implementations.FastIntegersFromGit import FastIntegersFromGit
from Implementations.helpers.Helper import ListToPolynomial, toNumbers
from Implementations.FasterSubsetSum.RandomizedBase import NearLinearBase
from benchmarks.test_distributions import Distributions as d... | 38.679245 | 112 | 0.661463 | 1,723 | 0.840488 | 0 | 0 | 1,048 | 0.51122 | 0 | 0 | 237 | 0.11561 |
f2ca33e35faaa3a6ab066c758e3c492f242feea7 | 633 | py | Python | lesson_3_set.py | pis2pis2/pis2pis2 | a8ab83d89bbeaa2b4a6a2be684ae5b7513472a7f | [
"MIT"
] | null | null | null | lesson_3_set.py | pis2pis2/pis2pis2 | a8ab83d89bbeaa2b4a6a2be684ae5b7513472a7f | [
"MIT"
] | null | null | null | lesson_3_set.py | pis2pis2/pis2pis2 | a8ab83d89bbeaa2b4a6a2be684ae5b7513472a7f | [
"MIT"
] | 4 | 2019-11-12T06:59:35.000Z | 2021-01-29T21:34:15.000Z | # Тип данных МНОЖЕСТВО (set)------------------------
#------------------------------------------
# Инициализация
temp_set = {1,2,3}
print(type(temp_set), temp_set)
temp_list = [1,2,1,2,2,3,4,12,32]
temp_set = set(temp_list)
print(type(temp_set), temp_set)
# Обращения к элементам множества
print(100 in temp_s... | 20.419355 | 52 | 0.598736 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 313 | 0.424695 |
f2ca9fdc60f3ee0343b7c18df16ab40ecebc987e | 4,744 | py | Python | web/fabric_utils/deploy.py | kbarnes3/guidcoin | c9011a00f18bbd181a538a553950dbc0e8c1a05e | [
"BSD-2-Clause"
] | null | null | null | web/fabric_utils/deploy.py | kbarnes3/guidcoin | c9011a00f18bbd181a538a553950dbc0e8c1a05e | [
"BSD-2-Clause"
] | null | null | null | web/fabric_utils/deploy.py | kbarnes3/guidcoin | c9011a00f18bbd181a538a553950dbc0e8c1a05e | [
"BSD-2-Clause"
] | null | null | null | from fabric.api import cd, run, settings, sudo
configurations = {
'daily': {
'branch': 'master',
'ssl': False,
},
'dev': {
'branch': 'master',
'ssl': False,
},
'prod': {
'branch': 'prod',
'ssl': False,
},
'staging': {
'... | 35.669173 | 92 | 0.620784 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,708 | 0.360034 |
f2cace32420ebacd10ddd9012cee72a53278a13e | 1,863 | py | Python | sorts/4.Tree_sort.py | 18-2-SKKU-OSS/2018-2-OSS-E5-- | 8bb7e4c239f5bd95f4635b442bb8b2838e76fb36 | [
"MIT"
] | 4 | 2018-12-02T14:21:02.000Z | 2019-02-28T04:15:42.000Z | sorts/4.Tree_sort.py | 18-2-SKKU-OSS/2018-2-OSS-E5 | 8bb7e4c239f5bd95f4635b442bb8b2838e76fb36 | [
"MIT"
] | 25 | 2018-11-27T10:00:05.000Z | 2018-12-11T01:58:46.000Z | sorts/4.Tree_sort.py | 18-2-SKKU-OSS/2018-2-OSS-E5-- | 8bb7e4c239f5bd95f4635b442bb8b2838e76fb36 | [
"MIT"
] | null | null | null | """
파이썬으로 Tree Sort를 구현한 코드입니다.
정확히 말하자면 Binary Search Tree를 구현하였습니다.
Binary Search Tree는
각 노드에 값이 있다.
Root 노드가 존재한다.
노드의 왼쪽 서브트리에는 그 노드의 값보다 작은 값들을 지닌 노드들로 이루어져있다.
노드의 오른쪽 서브트리에는 그 노드의 값과 같거나 큰 값들을 지닌 노드들로 이루어져있다.
좌우 하위 트리는 각각이 다시 Binary Search Tree 이어야 합니다.
"""
from __future__ import print_funct... | 28.661538 | 79 | 0.570585 | 820 | 0.34238 | 0 | 0 | 0 | 0 | 0 | 0 | 1,178 | 0.491858 |
f2cb9232d1beaf4ae9243ec51c0966d350c75625 | 446 | py | Python | rules/helpers.py | prokoptsev/rules | 436348004aa34c2e50d71960dad2076719fc433b | [
"MIT"
] | null | null | null | rules/helpers.py | prokoptsev/rules | 436348004aa34c2e50d71960dad2076719fc433b | [
"MIT"
] | 1 | 2017-02-01T08:56:08.000Z | 2017-02-01T08:56:08.000Z | rules/helpers.py | prokoptsev/rules | 436348004aa34c2e50d71960dad2076719fc433b | [
"MIT"
] | 1 | 2019-11-08T10:44:43.000Z | 2019-11-08T10:44:43.000Z | # coding: utf-8
from __future__ import unicode_literals, absolute_import
_NOTSET = type(
b"NotSet",
(object,),
{"__repr__": lambda self: "<ValueNotSet>"}
)()
def get_by_path(keys, source_dict):
if "." in keys:
key, tail_keys = keys.split(".", 1)
if key not in source_dict:
... | 24.777778 | 56 | 0.632287 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 55 | 0.123318 |
4b2bca30173574ead32b90a8d29f7a356f54d612 | 3,030 | py | Python | e2e/Vectors/Generation/Consensus/Beaten.py | kayabaNerve/Currency | 260ebc20f1704f42ad6183fee39ad58ec6d07961 | [
"CC0-1.0"
] | 66 | 2019-01-14T08:39:52.000Z | 2022-01-06T11:39:15.000Z | e2e/Vectors/Generation/Consensus/Beaten.py | kayabaNerve/Currency | 260ebc20f1704f42ad6183fee39ad58ec6d07961 | [
"CC0-1.0"
] | 228 | 2019-01-16T15:42:44.000Z | 2022-02-05T07:48:07.000Z | e2e/Vectors/Generation/Consensus/Beaten.py | kayabaNerve/Currency | 260ebc20f1704f42ad6183fee39ad58ec6d07961 | [
"CC0-1.0"
] | 19 | 2019-01-14T08:53:04.000Z | 2021-11-03T20:19:28.000Z | from typing import List
import json
import e2e.Libs.Ristretto.Ristretto as Ristretto
from e2e.Libs.BLS import PrivateKey
from e2e.Classes.Transactions.Transactions import Claim, Send, Transactions
from e2e.Classes.Consensus.Verification import SignedVerification
from e2e.Classes.Consensus.VerificationPacket import V... | 29.705882 | 89 | 0.718482 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 329 | 0.108581 |
4b2c8fbe001a03db6be5e0e2f8295d8600500dd8 | 5,105 | py | Python | main/pythonDev/TestModels/sphericalJointTest.py | eapcivil/EXUDYN | 52bddc8c258cda07e51373f68e1198b66c701d03 | [
"BSD-3-Clause-Open-MPI"
] | 1 | 2020-10-06T08:06:25.000Z | 2020-10-06T08:06:25.000Z | main/pythonDev/TestModels/sphericalJointTest.py | eapcivil/EXUDYN | 52bddc8c258cda07e51373f68e1198b66c701d03 | [
"BSD-3-Clause-Open-MPI"
] | null | null | null | main/pythonDev/TestModels/sphericalJointTest.py | eapcivil/EXUDYN | 52bddc8c258cda07e51373f68e1198b66c701d03 | [
"BSD-3-Clause-Open-MPI"
] | null | null | null | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# This is an EXUDYN example
#
# Details: Simulate Chain with 3D rigid bodies and SphericalJoint;
# Also test MarkerNodePosition
#
# Author: Johannes Gerstmayr
# Date: 2020-04-09
#
# Copyright:This file is part of Exudyn. Exu... | 40.84 | 181 | 0.681097 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,795 | 0.351616 |
4b315d99b885f67bca9bd8f9e32645470a5d8448 | 1,915 | py | Python | inference/online_inference/src/app.py | made-ml-in-prod-2021/marina-zav | 7b4b6e5f333707001e36dfb014dcd36bf975d969 | [
"FTL"
] | null | null | null | inference/online_inference/src/app.py | made-ml-in-prod-2021/marina-zav | 7b4b6e5f333707001e36dfb014dcd36bf975d969 | [
"FTL"
] | null | null | null | inference/online_inference/src/app.py | made-ml-in-prod-2021/marina-zav | 7b4b6e5f333707001e36dfb014dcd36bf975d969 | [
"FTL"
] | null | null | null | import logging
import sys
import time
from typing import List, Optional
import uvicorn
from fastapi import FastAPI
from fastapi.exceptions import RequestValidationError
from fastapi.responses import PlainTextResponse
from sklearn.pipeline import Pipeline
from src.entities import (
read_app_params,
HeartDiseas... | 26.232877 | 80 | 0.769191 | 0 | 0 | 0 | 0 | 980 | 0.511749 | 109 | 0.056919 | 292 | 0.15248 |
4b34659c04f2dfee8c71b653e9b765ff930cf91e | 8,040 | py | Python | serverCollector.py | VertexC/pipot-server | 0e2c9b0e34a589d9813301765ef8d2433ef67869 | [
"ISC"
] | 4 | 2019-02-11T12:43:08.000Z | 2019-03-23T06:59:38.000Z | serverCollector.py | VertexC/pipot-server | 0e2c9b0e34a589d9813301765ef8d2433ef67869 | [
"ISC"
] | 25 | 2019-02-26T17:16:58.000Z | 2019-08-19T03:36:56.000Z | serverCollector.py | VertexC/pipot-server | 0e2c9b0e34a589d9813301765ef8d2433ef67869 | [
"ISC"
] | 5 | 2019-01-15T06:32:21.000Z | 2020-01-10T11:58:43.000Z | import hashlib
import hmac
import json
import datetime
from abc import ABCMeta, abstractmethod
from twisted.internet import protocol
from mod_config.models import Rule, Actions
from mod_honeypot.models import PiPotReport, Deployment
from pipot.encryption import Encryption
from pipot.notifications import Notification... | 37.924528 | 78 | 0.486318 | 7,657 | 0.952363 | 0 | 0 | 604 | 0.075124 | 0 | 0 | 1,846 | 0.229602 |
4b3702971613873f8e0d3ea487888d2084d6acd1 | 4,852 | py | Python | pyhttptest/decorators.py | NickMitin/pyhttptest | 5116caf3962dab63d62bffe94b0659f435b3e2d3 | [
"BSD-3-Clause"
] | 142 | 2019-10-22T11:19:44.000Z | 2021-11-09T11:05:27.000Z | pyhttptest/decorators.py | NickMitin/pyhttptest | 5116caf3962dab63d62bffe94b0659f435b3e2d3 | [
"BSD-3-Clause"
] | 5 | 2019-10-22T14:43:39.000Z | 2020-10-09T13:25:24.000Z | pyhttptest/decorators.py | NickMitin/pyhttptest | 5116caf3962dab63d62bffe94b0659f435b3e2d3 | [
"BSD-3-Clause"
] | 14 | 2019-10-23T18:27:58.000Z | 2020-09-22T01:07:39.000Z | from sys import modules
from functools import wraps
from jsonschema import validate
from pyhttptest.constants import (
HTTP_METHOD_NAMES,
JSON_FILE_EXTENSION,
)
from pyhttptest.exceptions import (
FileExtensionError,
HTTPMethodNotSupportedError
)
from pyhttptest.http_schemas import ( # noqa
get_s... | 31.303226 | 82 | 0.61789 | 0 | 0 | 0 | 0 | 2,225 | 0.458574 | 0 | 0 | 2,513 | 0.517931 |
4b37117f289d4054432d5850f0a931ebb4548e7d | 4,523 | py | Python | resources/tests/test_perf.py | HotStew/respa | 04f39efb15b4f4206a122e665f8377c7198e1f25 | [
"MIT"
] | 49 | 2015-10-21T06:25:31.000Z | 2022-03-20T07:24:20.000Z | resources/tests/test_perf.py | HotStew/respa | 04f39efb15b4f4206a122e665f8377c7198e1f25 | [
"MIT"
] | 728 | 2015-06-24T13:26:54.000Z | 2022-03-24T12:18:41.000Z | resources/tests/test_perf.py | digipointtku/respa | a529e0df4d3f072df7801adb5bf97a5f4abd1243 | [
"MIT"
] | 46 | 2015-06-26T10:52:57.000Z | 2021-12-17T09:38:25.000Z | from datetime import datetime
import arrow
import pytest
from django.conf import settings
from resources.models import Day, Period, Reservation, Resource, ResourceType, Unit
TEST_PERFORMANCE = bool(getattr(settings, "TEST_PERFORMANCE", False))
@pytest.mark.skipif(not TEST_PERFORMANCE, reason="TEST_PERFORMANCE not ... | 50.255556 | 118 | 0.676984 | 0 | 0 | 0 | 0 | 4,270 | 0.944064 | 0 | 0 | 1,544 | 0.341366 |
4b37de6730f4bf33d3ca155f712cb0a661d6d553 | 951 | py | Python | docker-app/qfieldcloud/core/migrations/0045_auto_20211012_2234.py | livelihoods-and-landscapes/qfieldcloud-tcs | 3075e19d89caa3090a0d2027a376336526572764 | [
"MIT"
] | 34 | 2021-06-08T12:06:24.000Z | 2022-03-07T11:45:10.000Z | docker-app/qfieldcloud/core/migrations/0045_auto_20211012_2234.py | livelihoods-and-landscapes/qfieldcloud-tcs | 3075e19d89caa3090a0d2027a376336526572764 | [
"MIT"
] | 139 | 2021-06-08T00:24:51.000Z | 2022-03-28T09:59:54.000Z | docker-app/qfieldcloud/core/migrations/0045_auto_20211012_2234.py | livelihoods-and-landscapes/qfieldcloud-tcs | 3075e19d89caa3090a0d2027a376336526572764 | [
"MIT"
] | 8 | 2021-06-11T04:18:36.000Z | 2022-02-15T20:52:58.000Z | # Generated by Django 3.2.8 on 2021-10-12 22:34
from django.db import migrations, models
def fill_in_datetime_fields(apps, schema_editor):
# Old values in output field of delta table where string instead of json
Job = apps.get_model("core", "Job")
Job.objects.update(
started_at=models.F("created_... | 28.818182 | 81 | 0.64143 | 581 | 0.610936 | 0 | 0 | 0 | 0 | 0 | 0 | 221 | 0.232387 |
4b385a13715b06d087f942d7458bcb33eb5bba5d | 74 | py | Python | src/wagtail_tag_manager/__init__.py | Tehnode/wagtail-tag-manager | 048a03fe61b57ddd1eea0377ab26cf96527f5457 | [
"BSD-3-Clause"
] | 59 | 2018-06-13T07:30:42.000Z | 2022-03-22T02:14:34.000Z | src/wagtail_tag_manager/__init__.py | Tehnode/wagtail-tag-manager | 048a03fe61b57ddd1eea0377ab26cf96527f5457 | [
"BSD-3-Clause"
] | 74 | 2018-08-09T20:52:56.000Z | 2022-03-02T08:39:30.000Z | src/wagtail_tag_manager/__init__.py | Tehnode/wagtail-tag-manager | 048a03fe61b57ddd1eea0377ab26cf96527f5457 | [
"BSD-3-Clause"
] | 23 | 2018-10-10T05:29:38.000Z | 2022-01-19T15:09:51.000Z | default_app_config = "wagtail_tag_manager.config.WagtailTagManagerConfig"
| 37 | 73 | 0.891892 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 52 | 0.702703 |
4b3983c191ae8db18994072c0ce7b31ca01543db | 12,081 | py | Python | python/test/lib/zk/cache_test.py | cschutijser/scion | 054cef53b31a577ed224a090d6a4fd3883fd520b | [
"Apache-2.0"
] | 1 | 2018-03-18T14:46:34.000Z | 2018-03-18T14:46:34.000Z | python/test/lib/zk/cache_test.py | cschutijser/scion | 054cef53b31a577ed224a090d6a4fd3883fd520b | [
"Apache-2.0"
] | 1 | 2020-03-20T01:28:56.000Z | 2020-03-20T01:28:56.000Z | python/test/lib/zk/cache_test.py | cschutijser/scion | 054cef53b31a577ed224a090d6a4fd3883fd520b | [
"Apache-2.0"
] | 2 | 2020-03-14T16:03:27.000Z | 2020-03-18T08:13:19.000Z | # Copyright 2015 ETH Zurich
#
# 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, sof... | 36.279279 | 77 | 0.631653 | 10,930 | 0.904726 | 1,004 | 0.083106 | 8,543 | 0.707143 | 0 | 0 | 2,936 | 0.243026 |
4b3b08e4408a36e23ecf7b49e3efe15dedf8336d | 2,347 | py | Python | scripts/macro-f1-tag.py | shuoyangd/stenella | a677c67c602f2229e4452ed7f38b778897df51c0 | [
"MIT"
] | 1 | 2021-11-09T04:57:24.000Z | 2021-11-09T04:57:24.000Z | scripts/macro-f1-tag.py | shuoyangd/stenella | a677c67c602f2229e4452ed7f38b778897df51c0 | [
"MIT"
] | null | null | null | scripts/macro-f1-tag.py | shuoyangd/stenella | a677c67c602f2229e4452ed7f38b778897df51c0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright © 2021 Shuoyang Ding <shuoyangd@gmail.com>
# Created on 2021-02-11
#
# Distributed under terms of the MIT license.
import argparse
import logging
import math
import sys
logging.basicConfig(
format='%(asctime)s %(levelname)s: %(message)s',
datefmt='%Y-%m-%d %H:%M:%S', level=lo... | 27.611765 | 127 | 0.647635 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 683 | 0.290886 |
4b3bc0d2b44d013537c672eed0453f853feeca74 | 8,865 | py | Python | Stack/Solutions_Two.py | daniel-zeiler/potential-happiness | 1c9d503a52c35dab8b031f72e63725578735ac73 | [
"MIT"
] | null | null | null | Stack/Solutions_Two.py | daniel-zeiler/potential-happiness | 1c9d503a52c35dab8b031f72e63725578735ac73 | [
"MIT"
] | null | null | null | Stack/Solutions_Two.py | daniel-zeiler/potential-happiness | 1c9d503a52c35dab8b031f72e63725578735ac73 | [
"MIT"
] | null | null | null | import collections
from typing import List
def maxDepth(s: str) -> int:
stack = []
max_depth = 0
for character in s:
if character == '(':
stack.append(character)
elif character == ')':
stack.pop()
max_depth = max(max_depth, len(stack))
return max_depth
... | 24.901685 | 77 | 0.502538 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 108 | 0.012183 |
4b3c016c7ef444898f5da6f026c91b333cec123a | 4,684 | py | Python | scripts/pklhisto2root.py | umd-lhcb/lhcb-ntuples-gen | d306895a0dc6bad2def19ca3d7d1304a5a9be239 | [
"BSD-2-Clause"
] | null | null | null | scripts/pklhisto2root.py | umd-lhcb/lhcb-ntuples-gen | d306895a0dc6bad2def19ca3d7d1304a5a9be239 | [
"BSD-2-Clause"
] | 105 | 2018-12-20T19:09:19.000Z | 2022-03-19T09:53:06.000Z | scripts/pklhisto2root.py | umd-lhcb/lhcb-ntuples-gen | d306895a0dc6bad2def19ca3d7d1304a5a9be239 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
#
# Stolen almost verbatim from:
# https://gitlab.cern.ch/lhcb-rta/pidcalib2/-/blob/master/src/pidcalib2/pklhisto2root.py
###############################################################################
# (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration #
# ... | 35.755725 | 107 | 0.604825 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,867 | 0.398591 |
4b3d1227daae503aacdc59d3f5aff14a4ad6eda7 | 112 | py | Python | week3DataStructuren/Dictionaries/dictionary.py | hanbioinformatica/owe2a | f572866ef3bc75689d2d571cb393c6d60480655b | [
"Apache-2.0"
] | null | null | null | week3DataStructuren/Dictionaries/dictionary.py | hanbioinformatica/owe2a | f572866ef3bc75689d2d571cb393c6d60480655b | [
"Apache-2.0"
] | null | null | null | week3DataStructuren/Dictionaries/dictionary.py | hanbioinformatica/owe2a | f572866ef3bc75689d2d571cb393c6d60480655b | [
"Apache-2.0"
] | 1 | 2018-12-04T15:23:47.000Z | 2018-12-04T15:23:47.000Z | d1 = {"koe":4,"slang":0,"konijn":4,"zebra":4}
d1["koe"]
d2 = {"vis":0,"beer":4,"kip":2}
d1.update(d2)
print (d1) | 22.4 | 45 | 0.553571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 48 | 0.428571 |
4b3d9db6b58f7211471a5f7c96ec4eb5f14b1e04 | 958 | py | Python | backend/app/exceptions/exceptions.py | Michal-Miko/competitive-teams | 6bb55542e06121f413248ddf0b75285296b610bb | [
"MIT"
] | null | null | null | backend/app/exceptions/exceptions.py | Michal-Miko/competitive-teams | 6bb55542e06121f413248ddf0b75285296b610bb | [
"MIT"
] | null | null | null | backend/app/exceptions/exceptions.py | Michal-Miko/competitive-teams | 6bb55542e06121f413248ddf0b75285296b610bb | [
"MIT"
] | null | null | null | from app.database import crud
from fastapi import HTTPException, status
def check_for_team_existence(db, team_id):
if crud.get_team(db, team_id=team_id) is None:
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail="Team {} not found".format(team_id))
def check_for_player_existence(db, play... | 41.652174 | 117 | 0.775574 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 0.083507 |
4b42581465b8edd2e244428913cc73b52bb89dd0 | 1,964 | py | Python | ASC/Teme/tema1/consumer.py | mihai-constantin/ACS | 098c99d82dad8fb5d0e909da930c72f1185a99e2 | [
"Apache-2.0"
] | null | null | null | ASC/Teme/tema1/consumer.py | mihai-constantin/ACS | 098c99d82dad8fb5d0e909da930c72f1185a99e2 | [
"Apache-2.0"
] | null | null | null | ASC/Teme/tema1/consumer.py | mihai-constantin/ACS | 098c99d82dad8fb5d0e909da930c72f1185a99e2 | [
"Apache-2.0"
] | null | null | null | """
This module represents the Consumer.
Computer Systems Architecture Course
Assignment 1
March 2020
"""
from threading import Thread
from time import sleep
class Consumer(Thread):
"""
Class that represents a consumer.
"""
def __init__(self, carts, marketplace, retry_wait_time, **kwargs):
"... | 30.215385 | 85 | 0.563646 | 1,802 | 0.917515 | 0 | 0 | 0 | 0 | 0 | 0 | 681 | 0.346741 |
4b42f8a4c4ed9dadeb6bc01da50d750be154d614 | 978 | py | Python | rnn_based/model2.py | gunkaynar/heart_anomaly | 94ea2700e2c4d79028e0448022f6857df3c35e04 | [
"MIT"
] | null | null | null | rnn_based/model2.py | gunkaynar/heart_anomaly | 94ea2700e2c4d79028e0448022f6857df3c35e04 | [
"MIT"
] | null | null | null | rnn_based/model2.py | gunkaynar/heart_anomaly | 94ea2700e2c4d79028e0448022f6857df3c35e04 | [
"MIT"
] | null | null | null | import torch.nn as nn
import torch
import numpy as np
from torch.autograd import Variable
class RNNModel(nn.Module):
def __init__(self, input_dim, hidden_dim, layer_dim, output_dim):
super(RNNModel, self).__init__()
self.hidden_dim = hidden_dim
self.layer_dim = layer_dim
self.rnn = ... | 31.548387 | 98 | 0.649284 | 556 | 0.568507 | 237 | 0.242331 | 0 | 0 | 0 | 0 | 6 | 0.006135 |
4b442e7411a54e834374d8e754640fa1c026849b | 791 | py | Python | src/linuxforhealth/x12/v5010/x12_834_005010X220A1/transaction_set.py | joewright/x12 | 3734589b5ffa554388174234aa7dc37c2543f46a | [
"Apache-2.0"
] | 4 | 2021-12-11T15:38:03.000Z | 2021-12-22T13:18:31.000Z | src/linuxforhealth/x12/v5010/x12_834_005010X220A1/transaction_set.py | joewright/x12 | 3734589b5ffa554388174234aa7dc37c2543f46a | [
"Apache-2.0"
] | 55 | 2021-06-12T01:11:15.000Z | 2022-02-03T19:28:32.000Z | src/linuxforhealth/x12/v5010/x12_834_005010X220A1/transaction_set.py | joewright/x12 | 3734589b5ffa554388174234aa7dc37c2543f46a | [
"Apache-2.0"
] | 3 | 2021-06-11T19:33:19.000Z | 2021-11-19T23:33:58.000Z | """
transaction_set.py
Defines the Enrollment 834 005010X220A1 transaction set model.
"""
from typing import List, Optional
from linuxforhealth.x12.models import X12SegmentGroup
from .loops import Footer, Header, Loop1000A, Loop1000B, Loop1000C, Loop2000
from pydantic import root_validator, Field
from linuxforhealt... | 27.275862 | 88 | 0.78129 | 421 | 0.532238 | 0 | 0 | 0 | 0 | 0 | 0 | 261 | 0.329962 |