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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2893612d9bb5f812e7e498a10ba625355b7d1dee | 1,794 | py | Python | clientV4.py | sekranmert/AWS-Arduino-SmartHomeSystem | 80f4b6a5871fccb3bfc065d3fac5ba09feec525a | [
"MIT"
] | 1 | 2021-06-24T14:24:39.000Z | 2021-06-24T14:24:39.000Z | clientV4.py | sekranmert/AWS-Arduino-SmartHomeSystem | 80f4b6a5871fccb3bfc065d3fac5ba09feec525a | [
"MIT"
] | null | null | null | clientV4.py | sekranmert/AWS-Arduino-SmartHomeSystem | 80f4b6a5871fccb3bfc065d3fac5ba09feec525a | [
"MIT"
] | null | null | null | import socket
import threading
helpMessage = '-q -- close connection\n-l -- list of connected devices\n-t -- server time \n-s "arduino/client ""reciever name" "message" -- send message (messages can be max 100 character) \nif reciever is an arduino board it can be controlled by this messsage:\n -s arduino "arduino ... | 32.618182 | 312 | 0.545151 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 541 | 0.301561 |
289396e6e160ca17355478e692561082d33da8f2 | 3,885 | py | Python | data_loader/data_loaders.py | ChunpingQiu/Sen2LCZ_CNN | 5576567da658f945321280f37ff8d9bf46dd1818 | [
"MIT"
] | null | null | null | data_loader/data_loaders.py | ChunpingQiu/Sen2LCZ_CNN | 5576567da658f945321280f37ff8d9bf46dd1818 | [
"MIT"
] | null | null | null | data_loader/data_loaders.py | ChunpingQiu/Sen2LCZ_CNN | 5576567da658f945321280f37ff8d9bf46dd1818 | [
"MIT"
] | 1 | 2021-08-19T03:35:05.000Z | 2021-08-19T03:35:05.000Z | from torchvision import datasets, transforms
from base import BaseDataLoader
from torch.utils.data import Dataset, DataLoader
import pandas as pd
import torch
from skimage import io#, transform
import numpy as np
class MnistDataLoader(BaseDataLoader):
"""
MNIST data loading demo using BaseDataLoader
"""
... | 32.647059 | 121 | 0.621107 | 3,658 | 0.94157 | 0 | 0 | 0 | 0 | 0 | 0 | 992 | 0.255341 |
28957d205b560942a43fe20af3ee47c7d8d34a15 | 591 | py | Python | eval_predictions.py | uporwal/sigir-2019-ecom-challenge | bffa7f99930321ad5d86e0cddd3c9ddfb98ba3d2 | [
"MIT"
] | 7 | 2019-06-05T01:42:54.000Z | 2020-07-31T04:31:47.000Z | eval_predictions.py | uporwal/sigir-2019-ecom-challenge | bffa7f99930321ad5d86e0cddd3c9ddfb98ba3d2 | [
"MIT"
] | 5 | 2019-06-09T15:11:47.000Z | 2019-06-28T18:35:48.000Z | eval_predictions.py | uporwal/sigir-2019-ecom-challenge | bffa7f99930321ad5d86e0cddd3c9ddfb98ba3d2 | [
"MIT"
] | 5 | 2019-06-04T17:06:33.000Z | 2021-01-15T11:14:43.000Z | import evaluation_script
import argparse
parser = argparse.ArgumentParser(description='Evaluation script used in the eBay SIGIR 2019 eCommerce Search Challenge.')
parser.add_argument('-g', '--ground-truth-file', required=True, help="Ground truth file")
parser.add_argument('-p', '--prediction-file', required=True, help... | 45.461538 | 121 | 0.781726 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 195 | 0.329949 |
2895a62d74a6cf74dd272cfa08d6a6029b8f3434 | 48 | py | Python | starfish/__main__.py | haoxusci/starfish | d7bd856024c75f2ce41504406f2a663566c3814b | [
"MIT"
] | 164 | 2018-03-21T21:52:56.000Z | 2022-03-23T17:14:39.000Z | starfish/__main__.py | lbgbox/starfish | 0e879d995d5c49b6f5a842e201e3be04c91afc7e | [
"MIT"
] | 1,728 | 2018-03-15T23:16:09.000Z | 2022-03-12T00:09:18.000Z | starfish/__main__.py | lbgbox/starfish | 0e879d995d5c49b6f5a842e201e3be04c91afc7e | [
"MIT"
] | 66 | 2018-03-25T17:21:15.000Z | 2022-01-16T09:17:11.000Z | from .core.starfish import starfish
starfish()
| 12 | 35 | 0.791667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2896d0048b215dc837ae66958ce2ac38e7c770f9 | 968 | py | Python | coreapp/migrations/0058_auto_20200426_1348.py | Quanscendence/braynai | ab828ca95571c6dffef2b2392522e6a4160a2304 | [
"MIT"
] | null | null | null | coreapp/migrations/0058_auto_20200426_1348.py | Quanscendence/braynai | ab828ca95571c6dffef2b2392522e6a4160a2304 | [
"MIT"
] | null | null | null | coreapp/migrations/0058_auto_20200426_1348.py | Quanscendence/braynai | ab828ca95571c6dffef2b2392522e6a4160a2304 | [
"MIT"
] | null | null | null | # Generated by Django 2.2 on 2020-04-26 08:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('coreapp', '0057_projectpricing_custom_supprt'),
]
operations = [
migrations.RenameField(
model_name='endpointalgorithm',
... | 29.333333 | 144 | 0.597107 | 877 | 0.905992 | 0 | 0 | 0 | 0 | 0 | 0 | 288 | 0.297521 |
2897d15751315f822719f939136b75871bf6ecab | 1,431 | py | Python | server/price_cache.py | pareeohnos/ktrade | 1eaed1ff16ded580d5649c667935357567e7b514 | [
"MIT"
] | 5 | 2021-09-08T11:04:15.000Z | 2021-11-27T08:42:23.000Z | server/price_cache.py | pareeohnos/ktrade | 1eaed1ff16ded580d5649c667935357567e7b514 | [
"MIT"
] | 36 | 2021-08-31T09:28:10.000Z | 2021-12-10T06:47:04.000Z | server/price_cache.py | pareeohnos/ktrade | 1eaed1ff16ded580d5649c667935357567e7b514 | [
"MIT"
] | 2 | 2021-08-29T02:53:54.000Z | 2021-08-29T06:21:36.000Z | import logging
from server.singleton_meta import SingletonMeta
log = logging.getLogger(__name__)
class PriceCache(metaclass=SingletonMeta):
def __init__(self):
log.debug("[PriceCache] Init new price cache")
self.price_cache = {}
def init_cache_for_ticker(self, watched_ticker_id):
log.info(f"[PriceCa... | 31.108696 | 81 | 0.714186 | 1,331 | 0.930119 | 0 | 0 | 0 | 0 | 0 | 0 | 324 | 0.226415 |
289918d2c57a6904734431ddd51bb10c97d644f6 | 499 | py | Python | series_loop.py | Akshara2820/Python_WhileLoop | d525b547bc8c8236cb2cd1881080ec4e6604fffc | [
"MIT"
] | 1 | 2021-09-15T03:42:15.000Z | 2021-09-15T03:42:15.000Z | series_loop.py | Akshara2820/Python_WhileLoop | d525b547bc8c8236cb2cd1881080ec4e6604fffc | [
"MIT"
] | null | null | null | series_loop.py | Akshara2820/Python_WhileLoop | d525b547bc8c8236cb2cd1881080ec4e6604fffc | [
"MIT"
] | null | null | null | # (10,2,20,4,30,6,40,8,50)
n=int(input("enter no--"))
i=1
c=10
while i<=n:
if i%2==0:
c+=10
print(i,end=",")
i+=1
i+=1
print(c,end=",")
# (1+10=11, 11+20=31, 31+30=61, 61+40=101)
n=int(input("enter no,-"))
i=0
d=1
s=10
while i<n:
print(d,end=",")
d... | 12.794872 | 44 | 0.420842 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 164 | 0.328657 |
289d03fd3a78072e9344f01958c2c279a5179efe | 9,092 | py | Python | modules/Manager.py | jurajkula/IBT | 7b09f6d331433bfbf3e7955754a36b69b332bb4e | [
"MIT"
] | 3 | 2019-05-16T18:54:49.000Z | 2019-10-21T11:12:50.000Z | modules/Manager.py | jurajkula/IBT | 7b09f6d331433bfbf3e7955754a36b69b332bb4e | [
"MIT"
] | null | null | null | modules/Manager.py | jurajkula/IBT | 7b09f6d331433bfbf3e7955754a36b69b332bb4e | [
"MIT"
] | null | null | null | import os
import time
from os import mkdir
from os.path import isdir
from threading import Lock
import cv2
import imutils
from modules.Camera import Detect
from modules.Camera.CameraHandler import CameraHandler
from modules.Config import Config
from modules.Fusion import Fusion
from modules.Logger.Logger import Logge... | 34.439394 | 114 | 0.478883 | 8,715 | 0.958535 | 0 | 0 | 86 | 0.009459 | 0 | 0 | 385 | 0.042345 |
289e8099349c64172c6b2bf0ba568b861c6f1152 | 5,809 | py | Python | train.py | okwrtdsh/3D-ResNets-PyTorch | f36a32ea8b283524d1d102937c49689b1f475b5f | [
"MIT"
] | null | null | null | train.py | okwrtdsh/3D-ResNets-PyTorch | f36a32ea8b283524d1d102937c49689b1f475b5f | [
"MIT"
] | null | null | null | train.py | okwrtdsh/3D-ResNets-PyTorch | f36a32ea8b283524d1d102937c49689b1f475b5f | [
"MIT"
] | null | null | null | import torch
from torch.autograd import Variable
import time
import os
import sys
import numpy as np
from utils import AverageMeter, calculate_accuracy, save_gif, accuracy
from models.binarized_modules import binarizef
def train_epoch(epoch, data_loader, model, criterion, optimizer, opt,
epoch_logger... | 36.30625 | 88 | 0.484249 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,544 | 0.265794 |
289f6d1cb4c2dff400bd79a40abc1c0e080f2635 | 477 | py | Python | contact/views.py | ledomone/kurs_django | c24aaf8f8a22a695b41e2436bf9bf4d1ca665079 | [
"MIT"
] | null | null | null | contact/views.py | ledomone/kurs_django | c24aaf8f8a22a695b41e2436bf9bf4d1ca665079 | [
"MIT"
] | null | null | null | contact/views.py | ledomone/kurs_django | c24aaf8f8a22a695b41e2436bf9bf4d1ca665079 | [
"MIT"
] | null | null | null | from django.contrib.contenttypes import fields
from django.shortcuts import render
from .forms import MessageForm, ContactForm
from django.views.generic import DetailView, ListView, FormView
class MessageAddView(FormView):
# form_class = MessageForm
form_class = ContactForm
template_name = 'contact/messa... | 29.8125 | 63 | 0.740042 | 283 | 0.593291 | 0 | 0 | 0 | 0 | 0 | 0 | 63 | 0.132075 |
289fb47f080457beca96ad6fa33ec1f46323cf2b | 6,506 | py | Python | commands/misc/settings.py | ii-Python/Prism | a404a61ddb16d045aa29d81908ce4ad80b24e24d | [
"MIT"
] | 6 | 2020-09-28T13:19:37.000Z | 2021-07-13T10:37:22.000Z | commands/misc/settings.py | BenjaminGotBanned/Prism | a404a61ddb16d045aa29d81908ce4ad80b24e24d | [
"MIT"
] | 2 | 2020-10-06T17:59:40.000Z | 2020-10-06T20:12:39.000Z | commands/misc/settings.py | BenjaminGotBanned/Prism | a404a61ddb16d045aa29d81908ce4ad80b24e24d | [
"MIT"
] | 3 | 2021-01-05T13:33:58.000Z | 2021-07-13T10:37:37.000Z | # Modules
import discord
from datetime import date
from discord import Embed
from json import loads, dumps
from assets.prism import Tools
from discord.ext import commands
# Main Command Class
class Settings(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.desc = "Changes server settin... | 29.306306 | 196 | 0.527206 | 6,249 | 0.96035 | 0 | 0 | 6,051 | 0.929922 | 5,976 | 0.918396 | 1,830 | 0.281236 |
28a230764b88abf38e3cb6d2f0cf4df9e3778896 | 970 | py | Python | core/test.py | awesome-archive/muzero-pytorch | 2ff4ea145097050031d6026f0aa1a97de72d702d | [
"MIT"
] | null | null | null | core/test.py | awesome-archive/muzero-pytorch | 2ff4ea145097050031d6026f0aa1a97de72d702d | [
"MIT"
] | null | null | null | core/test.py | awesome-archive/muzero-pytorch | 2ff4ea145097050031d6026f0aa1a97de72d702d | [
"MIT"
] | null | null | null | import torch
from .mcts import MCTS, Node
from .utils import select_action
def test(config, model, episodes, device, render):
model.to(device)
model.eval()
test_reward = 0
env = config.new_game()
with torch.no_grad():
for ep_i in range(episodes):
done = False
ep_r... | 31.290323 | 93 | 0.565979 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
28a386192b68f112112b6e68f5293867934e803f | 167 | py | Python | demo/deep_learning/base/second_stage_bounding_box_prediction/dcn_feature_calibration.py | jihuacao/Putil | b753fc94bea4cbda00f483681c55f0e9f54adef2 | [
"Apache-2.0"
] | 1 | 2018-12-09T06:09:29.000Z | 2018-12-09T06:09:29.000Z | demo/deep_learning/base/second_stage_bounding_box_prediction/dcn_feature_calibration.py | jihuacao/Putil | b753fc94bea4cbda00f483681c55f0e9f54adef2 | [
"Apache-2.0"
] | null | null | null | demo/deep_learning/base/second_stage_bounding_box_prediction/dcn_feature_calibration.py | jihuacao/Putil | b753fc94bea4cbda00f483681c55f0e9f54adef2 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
import torch
class RotateRectangleDCNFeatureCalibration(torch.nn.Module):
def __init__(self):
torch.nn.Module.__init__(self)
pass | 20.875 | 60 | 0.712575 | 136 | 0.804734 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.08284 |
953703edf77bdad68e1e40c1a564d92c76b7a5a5 | 1,824 | pyde | Python | listing_70/listing_70.pyde | tiranderel/2019-fall-polytech-cs | 67f0482a0f143381f9b494a4348d6436ce8f8c1e | [
"MIT"
] | null | null | null | listing_70/listing_70.pyde | tiranderel/2019-fall-polytech-cs | 67f0482a0f143381f9b494a4348d6436ce8f8c1e | [
"MIT"
] | null | null | null | listing_70/listing_70.pyde | tiranderel/2019-fall-polytech-cs | 67f0482a0f143381f9b494a4348d6436ce8f8c1e | [
"MIT"
] | null | null | null | import math
class MySuperBall:
x=0
y=0
radius=0
speed=0
counter=0
previousBall=None
vector = 1
def render (self):
noStroke ()
fill (200 , 100)
ellipse (self.x,self.y,self.radius , self.radius )
stroke (10)
strokeWeight (2)
... | 26.057143 | 75 | 0.533991 | 749 | 0.410636 | 0 | 0 | 0 | 0 | 0 | 0 | 27 | 0.014803 |
953906e1815512ae7854e463509fe51bfa7374f8 | 1,340 | py | Python | src/carim_discord_bot/discord_client/member_count.py | schana/carim-discord-bot | c1f5e868404744667156af7ad6d244939998b5a2 | [
"Apache-2.0"
] | 14 | 2020-04-06T17:58:09.000Z | 2022-02-28T13:29:35.000Z | src/carim_discord_bot/discord_client/member_count.py | schana/carim-discord-bot | c1f5e868404744667156af7ad6d244939998b5a2 | [
"Apache-2.0"
] | 48 | 2020-04-05T11:24:10.000Z | 2021-03-10T08:12:19.000Z | src/carim_discord_bot/discord_client/member_count.py | schana/carim-discord-bot | c1f5e868404744667156af7ad6d244939998b5a2 | [
"Apache-2.0"
] | 12 | 2020-03-31T15:08:56.000Z | 2021-09-07T17:54:49.000Z | import asyncio
import logging
import discord
from carim_discord_bot import managed_service, config
from carim_discord_bot.discord_client import discord_service
log = logging.getLogger(__name__)
class MemberCountService(managed_service.ManagedService):
async def handle_message(self, message: managed_service.Mes... | 31.162791 | 102 | 0.698507 | 997 | 0.74403 | 0 | 0 | 0 | 0 | 923 | 0.688806 | 71 | 0.052985 |
953a0c9e9780129db979506c7f1a9628f61e3e34 | 491 | py | Python | code/core/early_stopping.py | ashesh-0/MultiZoomGaze | 24494a1346d09e21e4b6d999a742b5d31bbbeff0 | [
"MIT"
] | 1 | 2022-01-24T04:53:00.000Z | 2022-01-24T04:53:00.000Z | code/core/early_stopping.py | ashesh-0/MultiZoomGaze | 24494a1346d09e21e4b6d999a742b5d31bbbeff0 | [
"MIT"
] | null | null | null | code/core/early_stopping.py | ashesh-0/MultiZoomGaze | 24494a1346d09e21e4b6d999a742b5d31bbbeff0 | [
"MIT"
] | null | null | null | class EarlyStop:
def __init__(self, patience=5):
self._patience = patience
self._min_loss = None
self._counter = -1
def __call__(self, loss):
if self._min_loss is None:
self._counter = 0
self._min_loss = loss
return False
if self._min... | 24.55 | 46 | 0.543788 | 490 | 0.997963 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
953acd7416847beb9014f4f513c188884ed30577 | 567 | py | Python | GAPullTest.py | wrashi/GAReport | b58fb1ef8a8984761ba417879aa52c4100c61a0b | [
"Unlicense"
] | null | null | null | GAPullTest.py | wrashi/GAReport | b58fb1ef8a8984761ba417879aa52c4100c61a0b | [
"Unlicense"
] | null | null | null | GAPullTest.py | wrashi/GAReport | b58fb1ef8a8984761ba417879aa52c4100c61a0b | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
from GAReport import GAReport
VIEW_ID = 'PutViewIDHere'
DIMENSIONS = ["Page", ]
METRICS = ["Pageviews", "Unique Pageviews", "Avg. Time on Page", "Entrances", "Bounce Rate", "% Exit", "Page Value"]
# Use these instructions for creating single and multiple filters: https://developers.google.com... | 43.615385 | 153 | 0.75485 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 328 | 0.578483 |
953ca9b5b1450ae6da266d252be6ca5bb7c74e70 | 14,525 | py | Python | model.py | coolEphemeroptera/AESRC2020 | b64cdeeaaf74e8c1a741930b3a47dc8dcadca8de | [
"Apache-2.0"
] | 35 | 2020-09-26T13:40:16.000Z | 2022-03-22T19:42:20.000Z | model.py | coolEphemeroptera/ARNet | b64cdeeaaf74e8c1a741930b3a47dc8dcadca8de | [
"Apache-2.0"
] | 4 | 2021-04-10T13:05:52.000Z | 2022-03-14T03:22:32.000Z | model.py | coolEphemeroptera/ARNet | b64cdeeaaf74e8c1a741930b3a47dc8dcadca8de | [
"Apache-2.0"
] | 7 | 2020-09-26T15:52:45.000Z | 2021-06-11T05:05:23.000Z | from resnet import resnet18_,resnet34_,resnet50_,resnet101_, resnet152_
from keras.layers import Input, Dense, Lambda,Dropout,Conv2D,Activation,Bidirectional,GlobalAveragePooling1D,\
BatchNormalization,Reshape
from keras_layer_normalization import LayerNormalization
from keras.layers.cudnn_recurrent import CuDN... | 34.748804 | 112 | 0.497969 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,674 | 0.184096 |
953d34fa43582a04419407658a07c6d2cffc68aa | 187 | py | Python | tests/strategies/__init__.py | lycantropos/rsrc_web | 6702840befa4fa70114ce10543144410b453aa30 | [
"MIT"
] | null | null | null | tests/strategies/__init__.py | lycantropos/rsrc_web | 6702840befa4fa70114ce10543144410b453aa30 | [
"MIT"
] | 4 | 2019-06-18T18:36:50.000Z | 2019-07-10T13:14:48.000Z | tests/strategies/__init__.py | lycantropos/rsrc_web | 6702840befa4fa70114ce10543144410b453aa30 | [
"MIT"
] | null | null | null | from .literals import booleans
from .models import (readable_web_streams,
web_streams,
writeable_web_streams)
from .paths import web_url_strings
| 31.166667 | 43 | 0.663102 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
953d79768caec877a768ca7a6b3a2fc0176266ec | 27,309 | py | Python | main.py | ruotianluo/neural-summ-cnndm-pytorch | 027b63107b748bc56356bd119b243cfdda684aa2 | [
"MIT"
] | 3 | 2018-10-22T23:03:40.000Z | 2018-10-23T09:45:32.000Z | main.py | ruotianluo/neural-summ-cnndm-pytorch | 027b63107b748bc56356bd119b243cfdda684aa2 | [
"MIT"
] | null | null | null | main.py | ruotianluo/neural-summ-cnndm-pytorch | 027b63107b748bc56356bd119b243cfdda684aa2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
cudaid = 0
os.environ["CUDA_VISIBLE_DEVICES"] = str(cudaid)
import sys
import time
import numpy as np
import cPickle as pickle
import copy
import random
from random import shuffle
import math
import torch
import torch.nn as nn
from torch.autograd import Variable
import data as datar... | 40.397929 | 211 | 0.587462 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,675 | 0.134355 |
953e614df603a782bc861b2188ed97f796d8d6d2 | 471 | py | Python | openbook_posts/migrations/0016_auto_20190214_1525.py | TamaraAbells/okuna-api | f87d8e80d2f182c01dbce68155ded0078ee707e4 | [
"MIT"
] | 164 | 2019-07-29T17:59:06.000Z | 2022-03-19T21:36:01.000Z | openbook_posts/migrations/0016_auto_20190214_1525.py | TamaraAbells/okuna-api | f87d8e80d2f182c01dbce68155ded0078ee707e4 | [
"MIT"
] | 188 | 2019-03-16T09:53:25.000Z | 2019-07-25T14:57:24.000Z | openbook_posts/migrations/0016_auto_20190214_1525.py | TamaraAbells/okuna-api | f87d8e80d2f182c01dbce68155ded0078ee707e4 | [
"MIT"
] | 80 | 2019-08-03T17:49:08.000Z | 2022-02-28T16:56:33.000Z | # Generated by Django 2.1.5 on 2019-02-14 14:25
from django.db import migrations
import imagekit.models.fields
class Migration(migrations.Migration):
dependencies = [
('openbook_posts', '0015_post_community'),
]
operations = [
migrations.AlterField(
model_name='postimage',
... | 23.55 | 108 | 0.641189 | 356 | 0.755839 | 0 | 0 | 0 | 0 | 0 | 0 | 111 | 0.235669 |
953e8e8b09e196ff5d7362c6a2eeb02c08425111 | 15,517 | py | Python | blackjack.py | hackerboy9/blackjack | 1346642e353719ab68c0dc3573aa33b688431bf8 | [
"MIT"
] | null | null | null | blackjack.py | hackerboy9/blackjack | 1346642e353719ab68c0dc3573aa33b688431bf8 | [
"MIT"
] | 1 | 2020-10-25T10:16:37.000Z | 2020-10-25T10:16:37.000Z | blackjack.py | hackerboy9/blackjack | 1346642e353719ab68c0dc3573aa33b688431bf8 | [
"MIT"
] | 2 | 2017-07-16T08:00:29.000Z | 2020-10-06T14:48:18.000Z | from collections import MutableMapping, MutableSet, namedtuple
from operator import itemgetter
class Node(namedtuple("Node", "value, left, right, red")):
__slots__ = ()
def size(self):
"""
Recursively find size of a tree. Slow.
"""
if self is NULL:
return 0
... | 29.783109 | 82 | 0.566475 | 15,334 | 0.988206 | 482 | 0.031063 | 0 | 0 | 0 | 0 | 5,023 | 0.323709 |
9540c7d295e0a61b349ecd6b4bc768783ff0138e | 45,052 | py | Python | ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/configelement/stack/linkOAM_template.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 20 | 2019-05-07T01:59:14.000Z | 2022-02-11T05:24:47.000Z | ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/configelement/stack/linkOAM_template.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 60 | 2019-04-03T18:59:35.000Z | 2022-02-22T12:05:05.000Z | ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/configelement/stack/linkOAM_template.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 13 | 2019-05-20T10:48:31.000Z | 2021-10-06T07:45:44.000Z | from ixnetwork_restpy.base import Base
from ixnetwork_restpy.files import Files
class LinkOAM(Base):
__slots__ = ()
_SDM_NAME = 'linkOAM'
_SDM_ATT_MAP = {
'PacketSubtype': 'linkOAM.header.packet.subtype-1',
'PacketFlags': 'linkOAM.header.packet.flags-2',
'InformationOAMPDUCode': 'l... | 43.319231 | 202 | 0.715551 | 44,969 | 0.998158 | 0 | 0 | 30,949 | 0.686962 | 0 | 0 | 24,798 | 0.550431 |
954146cbdea7e57641fc5a1ec374f381deb7f479 | 3,967 | py | Python | memos/memos/users/forms.py | iotexpert/docmgr | 735c7bcbaeb73bc44efecffb175f268f2438ac3a | [
"MIT"
] | null | null | null | memos/memos/users/forms.py | iotexpert/docmgr | 735c7bcbaeb73bc44efecffb175f268f2438ac3a | [
"MIT"
] | null | null | null | memos/memos/users/forms.py | iotexpert/docmgr | 735c7bcbaeb73bc44efecffb175f268f2438ac3a | [
"MIT"
] | null | null | null | from flask import current_app
from flask_wtf import FlaskForm
from flask_wtf.file import FileField, FileAllowed
from wtforms import StringField, PasswordField, SubmitField, BooleanField
from wtforms.validators import DataRequired, Length, Email, EqualTo, ValidationError
from flask_login import current_user
from memos.m... | 40.896907 | 98 | 0.659188 | 3,478 | 0.876733 | 0 | 0 | 0 | 0 | 0 | 0 | 705 | 0.177716 |
95419b554583bc803a43eac8c57ec34a913022a2 | 626 | py | Python | app/models/encryption.py | janaSunrise/ZeroCOM | 7197684ce708f080fe215b0a6e57c12836e4c0ab | [
"Apache-2.0"
] | 6 | 2021-03-27T08:58:04.000Z | 2021-05-23T17:07:09.000Z | app/models/encryption.py | janaSunrise/ZeroCOM | 7197684ce708f080fe215b0a6e57c12836e4c0ab | [
"Apache-2.0"
] | 2 | 2021-05-30T08:06:53.000Z | 2021-06-02T17:02:06.000Z | app/models/encryption.py | janaSunrise/ZeroCOM | 7197684ce708f080fe215b0a6e57c12836e4c0ab | [
"Apache-2.0"
] | null | null | null | import rsa
class RSA:
@classmethod
def generate_keys(cls, size: int = 512) -> tuple:
return rsa.newkeys(size)
@classmethod
def export_key_pkcs1(cls, public_key: rsa.PublicKey, format: str = "PEM") -> bytes:
return rsa.PublicKey.save_pkcs1(public_key, format=format)
@classmethod
... | 31.3 | 106 | 0.693291 | 612 | 0.977636 | 0 | 0 | 579 | 0.92492 | 0 | 0 | 12 | 0.019169 |
954332209f4c21416110fe7a318ebf31b6100c2e | 3,566 | py | Python | Terminal_Bot.py | Data-Alchemy/Unix_Automation | 3d5ee450e1b19f79509960f6d117c16fb8aa5313 | [
"Apache-2.0"
] | null | null | null | Terminal_Bot.py | Data-Alchemy/Unix_Automation | 3d5ee450e1b19f79509960f6d117c16fb8aa5313 | [
"Apache-2.0"
] | null | null | null | Terminal_Bot.py | Data-Alchemy/Unix_Automation | 3d5ee450e1b19f79509960f6d117c16fb8aa5313 | [
"Apache-2.0"
] | null | null | null | import paramiko,time,sys,json,os,pandas
########################################################################################################################
################################################### parms #############################################################
proxy = None
Port = 22
Username = open... | 37.93617 | 160 | 0.615536 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,111 | 0.311554 |
95433e555cbe86270b9f0c26744b230b46b56f5a | 825 | py | Python | pnnl/models/__init__.py | rkini-pnnl/volttron-GS | 60055438446a060176381468757ad0ec339f2371 | [
"BSD-3-Clause"
] | 1 | 2021-08-05T04:01:55.000Z | 2021-08-05T04:01:55.000Z | pnnl/models/__init__.py | kevinatkinson-pnnl/volttron-GS | 479c614a6f7cd779fcc208e8e35d27d0961a16f8 | [
"BSD-3-Clause"
] | null | null | null | pnnl/models/__init__.py | kevinatkinson-pnnl/volttron-GS | 479c614a6f7cd779fcc208e8e35d27d0961a16f8 | [
"BSD-3-Clause"
] | null | null | null | import importlib
import logging
from volttron.platform.agent import utils
_log = logging.getLogger(__name__)
utils.setup_logging()
__version__ = "0.1"
__all__ = ['Model']
class Model(object):
def __init__(self, config, **kwargs):
base_module = "volttron.pnnl.models."
try:
model_type ... | 29.464286 | 73 | 0.65697 | 649 | 0.786667 | 0 | 0 | 0 | 0 | 0 | 0 | 78 | 0.094545 |
95446537feef632a16bbea1d71d8483703929711 | 826 | py | Python | src/cli.py | thisistrivial/cr-draft | 25defcf03466b044c28ad42661536e27b6df1222 | [
"MIT"
] | null | null | null | src/cli.py | thisistrivial/cr-draft | 25defcf03466b044c28ad42661536e27b6df1222 | [
"MIT"
] | null | null | null | src/cli.py | thisistrivial/cr-draft | 25defcf03466b044c28ad42661536e27b6df1222 | [
"MIT"
] | null | null | null |
import draft
import os
def run():
picks = [[],[]]
pairs = draft.pairs()
for player in range(1, 3):
os.system("clear")
pre = "[Player %d]: " % player
input(pre + "(Enter when ready) ")
pair = 0
while pair < 4:
pick = input(pre + "%s (1), %s (2) " %
(draft.get_name(pairs[playe... | 22.944444 | 69 | 0.521792 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 113 | 0.136804 |
9547e7b57fef282a81e3052edbdb2d34bb2cd61a | 222 | py | Python | src/honey.py | terror/golf | 9d38f8376c2ddbbb34360a3353ec6f4289736bd4 | [
"Unlicense"
] | null | null | null | src/honey.py | terror/golf | 9d38f8376c2ddbbb34360a3353ec6f4289736bd4 | [
"Unlicense"
] | null | null | null | src/honey.py | terror/golf | 9d38f8376c2ddbbb34360a3353ec6f4289736bd4 | [
"Unlicense"
] | null | null | null | # https://open.kattis.com/problems/honey
print(*(lambda x: [x[int(input())] for _ in range(int(input()))])([1, 0, 6, 12, 90, 360, 2040, 10080, 54810, 290640, 1588356, 8676360, 47977776, 266378112, 1488801600]), sep="\n")
| 55.5 | 179 | 0.657658 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0.198198 |
954b661a558c8d594bb41be0460c68998860e06c | 4,712 | py | Python | plaso/parsers/winreg_plugins/usbstor.py | Defense-Cyber-Crime-Center/plaso | 4f3a85fbea10637c1cdbf0cde9fc539fdcea9c47 | [
"Apache-2.0"
] | 2 | 2016-02-18T12:46:29.000Z | 2022-03-13T03:04:59.000Z | plaso/parsers/winreg_plugins/usbstor.py | Defense-Cyber-Crime-Center/plaso | 4f3a85fbea10637c1cdbf0cde9fc539fdcea9c47 | [
"Apache-2.0"
] | null | null | null | plaso/parsers/winreg_plugins/usbstor.py | Defense-Cyber-Crime-Center/plaso | 4f3a85fbea10637c1cdbf0cde9fc539fdcea9c47 | [
"Apache-2.0"
] | 6 | 2016-12-18T08:05:36.000Z | 2021-04-06T14:19:11.000Z | # -*- coding: utf-8 -*-
"""File containing a Windows Registry plugin to parse the USBStor key."""
import logging
from plaso.events import windows_events
from plaso.lib import eventdata
from plaso.parsers import winreg
from plaso.parsers.winreg_plugins import interface
__author__ = 'David Nides (david.nides@gmail.co... | 39.266667 | 79 | 0.695034 | 4,328 | 0.918506 | 0 | 0 | 0 | 0 | 0 | 0 | 1,472 | 0.312394 |
9550103d22b0d4fa16de9bf491fa914c8ddf64fb | 4,877 | py | Python | musicbot/modules/default/helpmsg.py | oKidd/PrendeMusic | b66d54d93ed36587193c20b71201c4447d80ad85 | [
"MIT"
] | 5 | 2018-09-07T12:17:27.000Z | 2019-12-06T02:35:26.000Z | musicbot/modules/default/helpmsg.py | oKidd/PrendeMusic | b66d54d93ed36587193c20b71201c4447d80ad85 | [
"MIT"
] | null | null | null | musicbot/modules/default/helpmsg.py | oKidd/PrendeMusic | b66d54d93ed36587193c20b71201c4447d80ad85 | [
"MIT"
] | 2 | 2020-04-25T00:35:17.000Z | 2021-05-13T22:20:19.000Z | from collections import defaultdict
from discord.ext.commands import Cog, command
from discord.utils import get
from ...utils import check_restricted
from ... import exceptions
from ... import messagemanager
class Help(Cog):
async def get_cmd(self, name, bot, user, list_all_cmds=False):
cmd = bot.get_comm... | 44.743119 | 204 | 0.568792 | 4,652 | 0.953865 | 0 | 0 | 3,779 | 0.774862 | 4,604 | 0.944023 | 1,310 | 0.268608 |
95515f6c6551928915064695c2fceeeba21d268c | 8,710 | py | Python | flatpak_update.py | willsALMANJ/flatpak_update | 84a8f59a11952a5daf57a18f0426b676f3a707c2 | [
"0BSD"
] | 1 | 2020-06-12T07:51:32.000Z | 2020-06-12T07:51:32.000Z | flatpak_update.py | willsALMANJ/flatpak_update | 84a8f59a11952a5daf57a18f0426b676f3a707c2 | [
"0BSD"
] | null | null | null | flatpak_update.py | willsALMANJ/flatpak_update | 84a8f59a11952a5daf57a18f0426b676f3a707c2 | [
"0BSD"
] | null | null | null | "Update a Flatpak repository for new versions of components"
import argparse
import asyncio
import datetime
from functools import total_ordering
import hashlib
from itertools import zip_longest
import json
from pathlib import Path
import re
import httpx
import jinja2
import yaml
GITHUB_DATE_FORMAT = "%Y-%m-%dT%H:%M:... | 30.138408 | 83 | 0.62721 | 1,324 | 0.152009 | 82 | 0.009414 | 1,340 | 0.153846 | 4,193 | 0.481401 | 1,974 | 0.226636 |
955231e63fbff36ad8601f161f98440ad3a247cb | 1,746 | py | Python | base/env/test_processStrategy.py | stevenchen521/quant_ml | f7d5efc49c934724f97fcafacc560f4a35b24551 | [
"MIT"
] | 5 | 2019-02-14T03:12:22.000Z | 2022-01-24T18:43:07.000Z | base/env/test_processStrategy.py | stevenchen521/quant_ml | f7d5efc49c934724f97fcafacc560f4a35b24551 | [
"MIT"
] | null | null | null | base/env/test_processStrategy.py | stevenchen521/quant_ml | f7d5efc49c934724f97fcafacc560f4a35b24551 | [
"MIT"
] | 2 | 2019-11-13T18:56:13.000Z | 2021-12-31T01:25:22.000Z | from unittest import TestCase
import base.env.pre_process as pre_process
import pandas as pd
from sklearn.preprocessing import MinMaxScaler
from helper.util import get_attribute
from base.env.pre_process_conf import active_stragery, get_strategy_analyze
import base.env.pre_process
class TestProcessStrategy(TestCase)... | 38.8 | 143 | 0.708477 | 1,460 | 0.836197 | 0 | 0 | 0 | 0 | 0 | 0 | 312 | 0.178694 |
9552f2a3d627a440738e08b8175d69d9667e0003 | 12,194 | py | Python | resources/lib/themoviedb/tmdb.py | bopopescu/ServerStatus | a883598248ad6f5273eb3be498e3b04a1fab6510 | [
"MIT"
] | null | null | null | resources/lib/themoviedb/tmdb.py | bopopescu/ServerStatus | a883598248ad6f5273eb3be498e3b04a1fab6510 | [
"MIT"
] | 1 | 2015-04-21T22:05:02.000Z | 2015-04-22T22:27:15.000Z | resources/lib/themoviedb/tmdb.py | GetSomeBlocks/Score_Soccer | a883598248ad6f5273eb3be498e3b04a1fab6510 | [
"MIT"
] | 2 | 2015-09-29T16:31:43.000Z | 2020-07-26T03:41:10.000Z | #!/usr/bin/env python2.5
#encoding:utf-8
#author:dbr/Ben
#project:themoviedb
#forked by ccjensen/Chris
#http://github.com/ccjensen/themoviedb
"""An interface to the themoviedb.org API
"""
__author__ = "dbr/Ben"
__version__ = "0.2b"
config = {}
config['apikey'] = "a8b9f96dde091408a03cb4c78477bd14"
config['urls'] = {... | 33.31694 | 142 | 0.586354 | 10,100 | 0.828276 | 0 | 0 | 0 | 0 | 0 | 0 | 4,716 | 0.386748 |
955351f42a772eb848c0ae2b75d5d28ba1ff2a00 | 3,033 | py | Python | mir3/lib/knn.py | pymir3/pymir3 | c1bcca66a5ef1ff0ebd6373e3820e72dee6b0b70 | [
"MIT"
] | 12 | 2015-08-03T12:41:11.000Z | 2020-08-18T07:55:23.000Z | mir3/lib/knn.py | pymir3/pymir3 | c1bcca66a5ef1ff0ebd6373e3820e72dee6b0b70 | [
"MIT"
] | 1 | 2015-05-27T18:47:20.000Z | 2015-05-27T18:47:20.000Z | mir3/lib/knn.py | pymir3/pymir3 | c1bcca66a5ef1ff0ebd6373e3820e72dee6b0b70 | [
"MIT"
] | 3 | 2016-03-18T03:30:02.000Z | 2018-07-05T02:29:16.000Z | import numpy
import numpy.linalg
def distance_sum(inputs, references):
"""Sum of all distances between inputs and references
Each element should be in a row!
"""
norms = numpy.zeros(inputs.shape[0])
for i in xrange(references.shape[0]):
norms += numpy.apply_along_axis(numpy.linalg.norm, 1... | 31.59375 | 81 | 0.567755 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 777 | 0.256182 |
9553b680206d84c135ef2d6c3b9397a51e5c12a9 | 17,984 | py | Python | pysnmp/CABH-QOS2-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/CABH-QOS2-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/CABH-QOS2-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module CABH-QOS2-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CABH-QOS2-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:26:31 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 201... | 145.032258 | 2,723 | 0.769462 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,978 | 0.221197 |
9554b36b01a4be87039a97f47f4d8ef14a97ffe2 | 2,440 | py | Python | nasafree/views.py | luanmalaquias/projeto_api_nasa_django | 3441c404da821b4177571814014e89b0cff6a6b7 | [
"MIT"
] | null | null | null | nasafree/views.py | luanmalaquias/projeto_api_nasa_django | 3441c404da821b4177571814014e89b0cff6a6b7 | [
"MIT"
] | null | null | null | nasafree/views.py | luanmalaquias/projeto_api_nasa_django | 3441c404da821b4177571814014e89b0cff6a6b7 | [
"MIT"
] | null | null | null | from django.shortcuts import redirect, render
from .models import *
from datetime import date
from brain import ipfunc
def home(request):
dados = Apod.getObjectOrRequest()
buscaData = request.POST.get('data')
if request.method == 'POST':
dados = Apod.getObjectOrRequest(str(buscaData))
ret... | 34.366197 | 93 | 0.685246 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 429 | 0.17582 |
9554dabbb9a81e2fbde331f2e40edcaa0f221585 | 805 | py | Python | bslparloursite/videolibrary/models.py | natfarleydev/thebslparlour | ebb2588282cdb2a977ec6c5f8d82cec4e8fd1f99 | [
"CC0-1.0"
] | 1 | 2016-01-06T23:13:11.000Z | 2016-01-06T23:13:11.000Z | bslparloursite/videolibrary/models.py | natfarleydev/thebslparlour | ebb2588282cdb2a977ec6c5f8d82cec4e8fd1f99 | [
"CC0-1.0"
] | 4 | 2021-03-18T20:15:04.000Z | 2021-06-10T17:52:31.000Z | bslparloursite/videolibrary/models.py | natfarleydev/thebslparlour | ebb2588282cdb2a977ec6c5f8d82cec4e8fd1f99 | [
"CC0-1.0"
] | null | null | null | from django.db import models
from django.utils import timezone
from sizefield.models import FileSizeField
# Create your models here.
class Video(models.Model):
sha224 = models.CharField(max_length=56, unique=True)
filename = models.CharField(max_length=200)
dropbox_directory = models.CharField(max_length=... | 29.814815 | 75 | 0.720497 | 667 | 0.828571 | 0 | 0 | 0 | 0 | 0 | 0 | 33 | 0.040994 |
9554ef14a15f7437ba6f8f9a2cf1620b9d8dfb4c | 1,681 | py | Python | location.py | TED-996/Nightshift | 3cc76af96c8e85e913be8c2f8f70564ea9d9f95d | [
"MIT"
] | null | null | null | location.py | TED-996/Nightshift | 3cc76af96c8e85e913be8c2f8f70564ea9d9f95d | [
"MIT"
] | null | null | null | location.py | TED-996/Nightshift | 3cc76af96c8e85e913be8c2f8f70564ea9d9f95d | [
"MIT"
] | null | null | null | import os.path
import json
from astral import Astral
appdata_folder = os.path.join(os.environ["LOCALAPPDATA"], "Nightshift")
def set_location(latitude, longitude):
print "Setting location to {0}, {1}".format(latitude, longitude)
try:
if not os.path.exists(appdata_folder):
os.mkdir(appdat... | 28.982759 | 75 | 0.625223 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 535 | 0.318263 |
95583195ca817a2531ead6462fb4ef3915b9a847 | 12,140 | py | Python | src/awkward1/operations/reducers.py | martindurant/awkward-1.0 | a3221ee1bab6551dd01d5dd07a1d2dc24fd02c38 | [
"BSD-3-Clause"
] | null | null | null | src/awkward1/operations/reducers.py | martindurant/awkward-1.0 | a3221ee1bab6551dd01d5dd07a1d2dc24fd02c38 | [
"BSD-3-Clause"
] | null | null | null | src/awkward1/operations/reducers.py | martindurant/awkward-1.0 | a3221ee1bab6551dd01d5dd07a1d2dc24fd02c38 | [
"BSD-3-Clause"
] | null | null | null | # BSD 3-Clause License; see https://github.com/jpivarski/awkward-1.0/blob/master/LICENSE
from __future__ import absolute_import
import numpy
import awkward1._util
import awkward1._connect._numpy
import awkward1.layout
import awkward1.operations.convert
def count(array, axis=None, keepdims=False, maskidentity=False)... | 48.174603 | 236 | 0.647117 | 0 | 0 | 0 | 0 | 6,139 | 0.505684 | 0 | 0 | 349 | 0.028748 |
9558fc73a95bcd6653e042be3bc2a2e8ae6c004c | 4,758 | py | Python | dotenv.py | ross-urban/django-dotenv | 16cbf7bb78571174bc5376c95c85b213857cb9f9 | [
"MIT"
] | null | null | null | dotenv.py | ross-urban/django-dotenv | 16cbf7bb78571174bc5376c95c85b213857cb9f9 | [
"MIT"
] | null | null | null | dotenv.py | ross-urban/django-dotenv | 16cbf7bb78571174bc5376c95c85b213857cb9f9 | [
"MIT"
] | 1 | 2021-02-16T15:37:18.000Z | 2021-02-16T15:37:18.000Z | import os
import re
import sys
import warnings
__version__ = '1.4.3'
line_re = re.compile(r"""
^
(?:export\s+)? # optional export
([\w\.]+) # key
(?:\s*=\s*|:\s+?) # separator
( # optional value begin
'(?:\'|[^'])*' # single quoted value
| ... | 31.72 | 78 | 0.481084 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,750 | 0.367802 |
955b60084410969a08f97fe22aa1d69988088bf0 | 16,755 | py | Python | PsychoPy3 Experiments/ContrastDetection.py | mrhunsaker/ContrastDetection | bb058460c5f90119316d0637885cd47f7ca2a307 | [
"MIT"
] | null | null | null | PsychoPy3 Experiments/ContrastDetection.py | mrhunsaker/ContrastDetection | bb058460c5f90119316d0637885cd47f7ca2a307 | [
"MIT"
] | null | null | null | PsychoPy3 Experiments/ContrastDetection.py | mrhunsaker/ContrastDetection | bb058460c5f90119316d0637885cd47f7ca2a307 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This experiment was created using PsychoPy3 Experiment Builder (v2020.2.4post1),
on October 27, 2020, at 14:06
If you publish work using this script the most relevant publication is:
Peirce J, Gray JR, Simpson S, MacAskill M, Höchenberger R, Sogo H, Kastman E, ... | 43.861257 | 102 | 0.66607 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,310 | 0.376559 |
955b6290b3f098708424dbec65825578b92645dc | 1,945 | py | Python | self_driving_desktop/grammar.py | wasimakh2/self-driving-desktop | 309b9b6614f8d3f2b85ed40c8e3cd9d72cd069a6 | [
"MIT"
] | 536 | 2019-05-08T02:54:27.000Z | 2022-03-24T10:02:07.000Z | self_driving_desktop/grammar.py | JonTheNiceGuy/self-driving-desktop | 309b9b6614f8d3f2b85ed40c8e3cd9d72cd069a6 | [
"MIT"
] | 17 | 2019-05-08T03:08:14.000Z | 2021-03-02T12:52:53.000Z | self_driving_desktop/grammar.py | JonTheNiceGuy/self-driving-desktop | 309b9b6614f8d3f2b85ed40c8e3cd9d72cd069a6 | [
"MIT"
] | 33 | 2019-05-08T03:50:56.000Z | 2021-12-08T11:22:29.000Z | grammar = r"""
start: (item ";")+
item: import | coords | playlist | step
import : "import" string
coords : "coords" coords_body
coords_body : "{" coord_def ("," coord_def)* "}"
coord_def: string ":" "{" coord_body ("," coord_body)* "}"
coord_body: string ":" "[" int "," int "]"
playlist : "playlist" string playli... | 19.45 | 58 | 0.682776 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,934 | 0.994344 |
955dce71570249e6e13d912ac4f316735729f8a7 | 1,765 | py | Python | BB/conf.py | poco0317/BarinadeBot-Rewrite | 4f34246178ab2ee0fd4c0a79fff5a43adbed134c | [
"MIT"
] | 2 | 2021-05-06T09:07:44.000Z | 2021-05-11T23:45:38.000Z | BB/conf.py | poco0317/BarinadeBot-Rewrite | 4f34246178ab2ee0fd4c0a79fff5a43adbed134c | [
"MIT"
] | null | null | null | BB/conf.py | poco0317/BarinadeBot-Rewrite | 4f34246178ab2ee0fd4c0a79fff5a43adbed134c | [
"MIT"
] | null | null | null | import configparser
import os
import shutil
import traceback
class Conf:
def __init__(self, conf):
self.options = conf
config = configparser.ConfigParser(interpolation=None)
if not config.read(conf, encoding='utf-8'):
print("I had to remake the config file from default.... | 41.046512 | 155 | 0.602833 | 1,683 | 0.953541 | 0 | 0 | 0 | 0 | 0 | 0 | 510 | 0.288952 |
955f1cf7d1a0592b32cf0c5abbfe0bb9060df419 | 2,805 | py | Python | geocamUtil/usng/convertUsngCsv.py | geocam/geocamUtilWeb | b64fc063c64b4b0baa140db4c126f2ff980756ab | [
"NASA-1.3"
] | 4 | 2017-03-03T16:24:24.000Z | 2018-06-24T05:50:40.000Z | geocamUtil/usng/convertUsngCsv.py | geocam/geocamUtilWeb | b64fc063c64b4b0baa140db4c126f2ff980756ab | [
"NASA-1.3"
] | 1 | 2021-09-29T17:17:30.000Z | 2021-09-29T17:17:30.000Z | geocamUtil/usng/convertUsngCsv.py | geocam/geocamUtilWeb | b64fc063c64b4b0baa140db4c126f2ff980756ab | [
"NASA-1.3"
] | 1 | 2017-12-19T20:45:53.000Z | 2017-12-19T20:45:53.000Z | #!/usr/bin/env python
# __BEGIN_LICENSE__
#Copyright (c) 2015, United States Government, as represented by the
#Administrator of the National Aeronautics and Space Administration.
#All rights reserved.
# __END_LICENSE__
"""
Takes as input a CSV file in the format:
37 46 29.2080,-122 25 08.1336,San Francisco
37 27 1... | 30.824176 | 92 | 0.624242 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,026 | 0.365775 |
955fa29268924998ee2dd6306f368b16b34e2595 | 478 | py | Python | process_cifar10.py | IIGROUP/AttentionProbe | b2c88b064452741a7ccc6660a4b090743013cc73 | [
"MIT"
] | 11 | 2022-01-23T15:09:09.000Z | 2022-03-18T10:27:04.000Z | process_cifar10.py | Wang-jiahao/AttentionProbe | 41a3cc0d5454ec5bba78c3dace9cded00da8cff9 | [
"MIT"
] | null | null | null | process_cifar10.py | Wang-jiahao/AttentionProbe | 41a3cc0d5454ec5bba78c3dace9cded00da8cff9 | [
"MIT"
] | null | null | null | from torchvision.datasets import CIFAR10
from torchvision.datasets import CIFAR100
import os
root = '/database/cifar10/'
from PIL import Image
dataset_train = CIFAR10(root)
for k, (img, label) in enumerate(dataset_train):
print('processsing' + str(k))
if not os.path.exists(root + 'CIFAR10_image/' + ... | 31.866667 | 75 | 0.650628 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 96 | 0.200837 |
955fe4376191cdb0e3d9522af865a55375090411 | 246 | py | Python | examples/fullproject/items/user.py | cnkailyn/toapi | 03a49d02dd0a55f1f83270154144e1a08fae6b78 | [
"Apache-2.0"
] | null | null | null | examples/fullproject/items/user.py | cnkailyn/toapi | 03a49d02dd0a55f1f83270154144e1a08fae6b78 | [
"Apache-2.0"
] | null | null | null | examples/fullproject/items/user.py | cnkailyn/toapi | 03a49d02dd0a55f1f83270154144e1a08fae6b78 | [
"Apache-2.0"
] | 1 | 2019-11-12T20:15:50.000Z | 2019-11-12T20:15:50.000Z | from toapi import Item, XPath
class User(Item):
url = XPath('//a[@class="hnuser"][1]/@href')
name = XPath('//a[@class="hnuser"][1]/text()')
class Meta:
source = XPath('//tr[@class="athing"]')
route = '/news\?p=\d+'
| 22.363636 | 50 | 0.536585 | 213 | 0.865854 | 0 | 0 | 0 | 0 | 0 | 0 | 100 | 0.406504 |
95620b3f160fc0fb6d0c0896e86c4e7d56432d0b | 722 | py | Python | src/tests/test_fail.py | bspeagle/py_git_diff | 1674afc1dfac0408372e11945f4a36b297b77e66 | [
"MIT"
] | null | null | null | src/tests/test_fail.py | bspeagle/py_git_diff | 1674afc1dfac0408372e11945f4a36b297b77e66 | [
"MIT"
] | null | null | null | src/tests/test_fail.py | bspeagle/py_git_diff | 1674afc1dfac0408372e11945f4a36b297b77e66 | [
"MIT"
] | null | null | null | '''
Failure tests
'''
import os
from typing import Any
import pytest
from helpers.github import API
api = API()
pass_token = Any
fail_token = os.getenv('FAIL_TOKEN')
fail_org = os.getenv('FAIL_ORG')
fail_repo = os.getenv('FAIL_REPO')
def test_fail_auth():
'''
Fail 'auth' to Github
'''
with pytest.r... | 16.044444 | 39 | 0.649584 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 167 | 0.231302 |
9562440f3dc7a8e571a4195021e3f9febc5d8b84 | 3,042 | py | Python | tutorials/mechanisms/tutorial_convenience_inhibition.py | AQ18/skimpy | 435fc50244f2ca815bbb39d525a82a4692f5c0ac | [
"Apache-2.0"
] | 13 | 2020-11-05T10:59:13.000Z | 2022-03-21T01:38:31.000Z | tutorials/mechanisms/tutorial_convenience_inhibition.py | AQ18/skimpy | 435fc50244f2ca815bbb39d525a82a4692f5c0ac | [
"Apache-2.0"
] | 4 | 2022-01-27T10:23:40.000Z | 2022-03-10T18:16:06.000Z | tutorials/mechanisms/tutorial_convenience_inhibition.py | AQ18/skimpy | 435fc50244f2ca815bbb39d525a82a4692f5c0ac | [
"Apache-2.0"
] | 6 | 2020-08-04T17:01:33.000Z | 2022-03-21T01:38:32.000Z | # -*- coding: utf-8 -*-
"""
.. module:: skimpy
:platform: Unix, Windows
:synopsis: Simple Kinetic Models in Python
.. moduleauthor:: SKiMPy team
[---------]
Copyright 2017 Laboratory of Computational Systems Biotechnology (LCSB),
Ecole Polytechnique Federale de Lausanne (EPFL), Switzerland
Licensed under the ... | 29.25 | 87 | 0.610782 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,154 | 0.379356 |
9564a1cacc7687a8261fe339aaf329a5f5fa587d | 825 | py | Python | advanced-python/05_advanced_classes_and_objects/enums.py | alexprodan99/python-workspace | 8c805afc29fafe3916759d1cf07e597f945b8b45 | [
"MIT"
] | null | null | null | advanced-python/05_advanced_classes_and_objects/enums.py | alexprodan99/python-workspace | 8c805afc29fafe3916759d1cf07e597f945b8b45 | [
"MIT"
] | null | null | null | advanced-python/05_advanced_classes_and_objects/enums.py | alexprodan99/python-workspace | 8c805afc29fafe3916759d1cf07e597f945b8b45 | [
"MIT"
] | null | null | null |
from enum import Enum, unique, auto
@unique
class Fruit(Enum):
APPLE = 1
BANANA = 2
ORANGE = 3
# if you don't care what value to put you can use auto => basically it will get last value used + 1 (if auto is for first item it will be 0 + 1 = 1)
PEAR = auto()
def main():
print(Fruit.APPLE) # F... | 27.5 | 152 | 0.641212 | 233 | 0.282424 | 0 | 0 | 241 | 0.292121 | 0 | 0 | 346 | 0.419394 |
9566a5fe7dd2b6c92ef1c6e1f73143b039776af9 | 3,313 | py | Python | detector/detector.py | suhendaragung20/Object-Detection-Metrics | e756c9ba20ff1e89143c64e6d38288d2a8680f0e | [
"MIT"
] | null | null | null | detector/detector.py | suhendaragung20/Object-Detection-Metrics | e756c9ba20ff1e89143c64e6d38288d2a8680f0e | [
"MIT"
] | null | null | null | detector/detector.py | suhendaragung20/Object-Detection-Metrics | e756c9ba20ff1e89143c64e6d38288d2a8680f0e | [
"MIT"
] | null | null | null |
# Import packages
import os
import cv2
import numpy as np
import tensorflow as tf
import sys
from imutils.object_detection import non_max_suppression
# This is needed since the notebook is stored in the object_detection folder.
sys.path.append("..")
# Import utilites
from utils import label_map_util
class detec... | 37.224719 | 107 | 0.690915 | 3,002 | 0.906127 | 0 | 0 | 0 | 0 | 0 | 0 | 1,296 | 0.391186 |
9566c8358fb6d074b645539d82fffd8a430711c8 | 1,770 | py | Python | processDiscoveryNews4chat.py | data-henrik/watson-chatbot-discovery-news | d63d579718d4fc529af29bb413c73fdbd9b52361 | [
"Apache-2.0"
] | 3 | 2019-05-03T20:28:45.000Z | 2019-06-28T09:58:25.000Z | processDiscoveryNews4chat.py | psaupsau/watson-chatbot-discovery-news | d63d579718d4fc529af29bb413c73fdbd9b52361 | [
"Apache-2.0"
] | null | null | null | processDiscoveryNews4chat.py | psaupsau/watson-chatbot-discovery-news | d63d579718d4fc529af29bb413c73fdbd9b52361 | [
"Apache-2.0"
] | 4 | 2019-04-25T16:49:47.000Z | 2020-07-02T15:27:05.000Z | # Handle client-side action for an IBM Watson Assistant chatbot
#
# The code requires my Watson Conversation Tool. For details see
# https://github.com/data-henrik/watson-conversation-tool
#
#
# Setup: Configure your credentials
# - for Watson Assistant see instructions for the tool
# - for Discovery change username / ... | 35.4 | 95 | 0.714124 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,163 | 0.657062 |
9566fa933abad53d06086af6a6e451a81990671d | 2,977 | py | Python | test_scripts/test_residual_solver_dynamic.py | JoZimmer/ParOptBeam | 50d15d8d822a2718f2932807e06c4a7e02f866a3 | [
"BSD-3-Clause"
] | 1 | 2021-04-09T14:08:20.000Z | 2021-04-09T14:08:20.000Z | test_scripts/test_residual_solver_dynamic.py | JoZimmer/ParOptBeam | 50d15d8d822a2718f2932807e06c4a7e02f866a3 | [
"BSD-3-Clause"
] | 2 | 2021-04-28T15:05:01.000Z | 2021-11-10T15:12:56.000Z | test_scripts/test_residual_solver_dynamic.py | JoZimmer/ParOptBeam | 50d15d8d822a2718f2932807e06c4a7e02f866a3 | [
"BSD-3-Clause"
] | 2 | 2021-02-01T08:49:45.000Z | 2021-08-10T02:07:36.000Z | import numpy as np
import matplotlib.pyplot as plt
from cycler import cycler
from source.solving_strategies.strategies.residual_based_newton_raphson_solver import ResidualBasedNewtonRaphsonSolver
from source.solving_strategies.strategies.residual_based_picard_solver import ResidualBasedPicardSolver
from source.model.s... | 34.616279 | 118 | 0.566006 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 589 | 0.19785 |
9567e6ba5dc9af36046c391fbc5d4e1144009cc8 | 378 | py | Python | objects/regex_deleter.py | Egor2005l/cho | c7cb165394089b277be5c306edde0b8fb42e466d | [
"MIT"
] | null | null | null | objects/regex_deleter.py | Egor2005l/cho | c7cb165394089b277be5c306edde0b8fb42e466d | [
"MIT"
] | null | null | null | objects/regex_deleter.py | Egor2005l/cho | c7cb165394089b277be5c306edde0b8fb42e466d | [
"MIT"
] | null | null | null | from typing import Dict
from objects.base import BaseModel
class RegexDeleter(BaseModel):
name: str
regex: str
chat_id: int
for_all: bool
def save(self) -> Dict[str, int]:
return {
'name': self.name,
'regex': self.regex,
'chat_id': self.... | 19.894737 | 38 | 0.531746 | 309 | 0.81746 | 0 | 0 | 0 | 0 | 0 | 0 | 31 | 0.082011 |
95697b5d755424cb46ff8e11e52fcff72a602bf4 | 639 | py | Python | cartridge_external_payment/admin.py | thomasWajs/cartridge-external-payment | 02c1c2b43504a17547a908622c3d54a331945c77 | [
"BSD-2-Clause"
] | 7 | 2015-02-14T20:25:27.000Z | 2021-04-10T16:05:00.000Z | cartridge_external_payment/admin.py | thomasWajs/cartridge-external-payment | 02c1c2b43504a17547a908622c3d54a331945c77 | [
"BSD-2-Clause"
] | 2 | 2015-11-30T17:54:19.000Z | 2016-09-09T21:21:01.000Z | cartridge_external_payment/admin.py | thomasWajs/cartridge-external-payment | 02c1c2b43504a17547a908622c3d54a331945c77 | [
"BSD-2-Clause"
] | 3 | 2015-10-19T15:22:18.000Z | 2017-11-13T23:22:17.000Z | from copy import deepcopy
from django.contrib import admin
from cartridge.shop.admin import OrderAdmin
from cartridge.shop.models import Order
order_fieldsets = deepcopy(admin.site._registry[Order].fieldsets)
order_fieldsets[2][1]["fields"] = list(order_fieldsets[2][1]["fields"])
order_fieldsets[2][1]["fields"].ins... | 33.631579 | 74 | 0.748044 | 210 | 0.328638 | 0 | 0 | 0 | 0 | 0 | 0 | 116 | 0.181534 |
9569b1f581ecb174ee905898df207343952c8b6e | 1,483 | py | Python | webeditor/app/attrdict.py | lshen1120/web-editor | 170ac96b47bf957a3a42a99092e45e88e584c49a | [
"Apache-2.0"
] | 4 | 2018-07-25T03:57:08.000Z | 2018-07-25T06:34:59.000Z | webeditor/app/attrdict.py | lshen1120/web-editor | 170ac96b47bf957a3a42a99092e45e88e584c49a | [
"Apache-2.0"
] | null | null | null | webeditor/app/attrdict.py | lshen1120/web-editor | 170ac96b47bf957a3a42a99092e45e88e584c49a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import copy
class AttrDict(dict):
def __init__(self, seq=None, **kwargs):
dict.__init__(self, seq or {}, **kwargs)
def __getattr__(self, name):
return self.get(name, self.get("__default", None))
def __setattr__(self, name, value):
self... | 26.017544 | 68 | 0.574511 | 575 | 0.387728 | 0 | 0 | 0 | 0 | 0 | 0 | 313 | 0.211059 |
956a1d409e8bf27f1eb1d39023f7ad436c2f2c6c | 16,034 | py | Python | EVeP/EVeP.py | amandaortega/EVeP | 4bca562c814210b1d835e9be63ab80385c93320b | [
"MIT"
] | null | null | null | EVeP/EVeP.py | amandaortega/EVeP | 4bca562c814210b1d835e9be63ab80385c93320b | [
"MIT"
] | null | null | null | EVeP/EVeP.py | amandaortega/EVeP | 4bca562c814210b1d835e9be63ab80385c93320b | [
"MIT"
] | null | null | null | """
Author: Amanda Ortega de Castro Ayres
Created in: September 19, 2019
Python version: 3.6
"""
from Least_SRMTL import Least_SRMTL
import libmr
from matplotlib import pyplot, cm
from matplotlib.patches import Circle
from mpl_toolkits.mplot3d import Axes3D, art3d
import numpy as np
import numpy.matlib
impo... | 40.489899 | 247 | 0.591493 | 15,694 | 0.978795 | 0 | 0 | 0 | 0 | 0 | 0 | 2,874 | 0.179244 |
956c1145058b098a2e217c047220f62e14dea6e3 | 5,375 | py | Python | bigml/modelfields.py | alanponce/python | 9423b4c4968b81ee14cef1ab6cd62d23dfa8bd26 | [
"Apache-2.0"
] | 1 | 2021-06-20T11:51:22.000Z | 2021-06-20T11:51:22.000Z | bigml/modelfields.py | alanponce/python | 9423b4c4968b81ee14cef1ab6cd62d23dfa8bd26 | [
"Apache-2.0"
] | null | null | null | bigml/modelfields.py | alanponce/python | 9423b4c4968b81ee14cef1ab6cd62d23dfa8bd26 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Copyright 2013-2016 BigML
#
# 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 requi... | 37.852113 | 77 | 0.596279 | 4,051 | 0.753674 | 0 | 0 | 0 | 0 | 0 | 0 | 1,914 | 0.356093 |
956d8de300f81dc8c0786d5a4d8868b85762da6f | 16,229 | py | Python | networks/infill/func_intersect_ub.py | LArbys/ublarcvserver | 02381c937f49a2eab2f754017ab431c3f6fa70d7 | [
"Apache-2.0"
] | 2 | 2020-07-09T19:34:03.000Z | 2021-06-21T23:09:23.000Z | networks/larflow/models/func_intersect_ub.py | LArbys/ublarcvserver | 02381c937f49a2eab2f754017ab431c3f6fa70d7 | [
"Apache-2.0"
] | null | null | null | networks/larflow/models/func_intersect_ub.py | LArbys/ublarcvserver | 02381c937f49a2eab2f754017ab431c3f6fa70d7 | [
"Apache-2.0"
] | null | null | null | import os,time
import torch
from larcv import larcv
import numpy as np
import ROOT as rt
from array import array
class IntersectUB( torch.autograd.Function ):
larcv_version = None
dataloaded = False
imgdimset = False
@classmethod
def load_intersection_data(cls,intersectiondatafile=None,larcv_vers... | 48.735736 | 182 | 0.644217 | 9,920 | 0.611251 | 0 | 0 | 9,773 | 0.602194 | 0 | 0 | 3,351 | 0.206482 |
956dfd3898d4db0373cc4caa6c858737d336c6e2 | 3,270 | py | Python | simple_api/object/permissions.py | ladal1/simple_api | 1b5d560476bccad9f68a7331d092dbdb68c48bf7 | [
"MIT"
] | 1 | 2021-02-24T22:14:59.000Z | 2021-02-24T22:14:59.000Z | simple_api/object/permissions.py | ladal1/simple_api | 1b5d560476bccad9f68a7331d092dbdb68c48bf7 | [
"MIT"
] | null | null | null | simple_api/object/permissions.py | ladal1/simple_api | 1b5d560476bccad9f68a7331d092dbdb68c48bf7 | [
"MIT"
] | null | null | null | from inspect import isclass
def build_permissions_fn(permissions):
def fn(**kwargs):
for perm in permissions:
if not perm().has_permission(**kwargs):
raise PermissionError(perm().error_message(**kwargs))
return fn
class BasePermission:
def __init__(self, **kwargs):
... | 34.0625 | 119 | 0.663609 | 2,986 | 0.91315 | 0 | 0 | 0 | 0 | 0 | 0 | 850 | 0.259939 |
95728ec4185daad9b5e30451603845ad35ca972b | 290 | py | Python | Desafios/MODULO 1/Desafio 12.py | deneyjunior/python-mundos-cev | 4bc82bf0630f65cf66e5442ae57b72fd4b0207fc | [
"MIT"
] | null | null | null | Desafios/MODULO 1/Desafio 12.py | deneyjunior/python-mundos-cev | 4bc82bf0630f65cf66e5442ae57b72fd4b0207fc | [
"MIT"
] | null | null | null | Desafios/MODULO 1/Desafio 12.py | deneyjunior/python-mundos-cev | 4bc82bf0630f65cf66e5442ae57b72fd4b0207fc | [
"MIT"
] | null | null | null | # Faça um algoritmo que leia o preço de um produto e mostre o novo preço com um desconto.
preco = float(input('Digite o preço atual do produto: R$ '))
desconto = float(input('Digite o valor do desconto (0.X): '))
novopreco = preco * desconto
print('O novo preço é R$ {}.'.format(novopreco)) | 58 | 89 | 0.713793 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 192 | 0.648649 |
957446e0b2daddda7b2cb6fdb76915dc45c186cf | 1,188 | py | Python | test.py | Ericqle/Senior-Design-Project | aa8e2134b26aef151d3736d306a4fbc9fe69790e | [
"MIT"
] | null | null | null | test.py | Ericqle/Senior-Design-Project | aa8e2134b26aef151d3736d306a4fbc9fe69790e | [
"MIT"
] | null | null | null | test.py | Ericqle/Senior-Design-Project | aa8e2134b26aef151d3736d306a4fbc9fe69790e | [
"MIT"
] | null | null | null | from draw_control import DrawControl
if __name__ == '__main__':
zotter = DrawControl()
test = input("track, rail, pen, hor, ver, diag: ")
while(test):
if test == "track":
dir_in = input('dir step: ')
dir = dir_in.split(" ")
zotter.track.spin_fixed_step(int(dir[... | 29.7 | 84 | 0.505051 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 203 | 0.170875 |
95770242fba26f6f07dd35c5f3e789a8b70b5318 | 2,961 | py | Python | fcos/datasets/cityscapes.py | rosshemsley/fcos | de30bb2c78df54cae6814282c7166beed333d34c | [
"MIT"
] | 5 | 2020-08-02T11:03:25.000Z | 2021-12-12T19:37:09.000Z | fcos/datasets/cityscapes.py | rosshemsley/fcos | de30bb2c78df54cae6814282c7166beed333d34c | [
"MIT"
] | null | null | null | fcos/datasets/cityscapes.py | rosshemsley/fcos | de30bb2c78df54cae6814282c7166beed333d34c | [
"MIT"
] | 1 | 2021-03-05T12:19:48.000Z | 2021-03-05T12:19:48.000Z | import pathlib
import logging
from torch import nn
import numpy as np
import torch
import torch.functional as F
import torchvision.transforms as T
from torch.utils.data import Dataset
from torchvision.datasets.cityscapes import Cityscapes
import cv2
from torchvision.transforms import ToPILImage
from torch.utils.data ... | 24.882353 | 90 | 0.628842 | 904 | 0.305302 | 0 | 0 | 0 | 0 | 0 | 0 | 310 | 0.104694 |
9577bc0bf7d0b84bf30768ffc4afd03a7523fd8b | 6,960 | py | Python | core/event/event_handler.py | ErlendHer/AlgoView | 946c2bb38e2ab3af011281c9672af4fcca84ae87 | [
"Apache-2.0"
] | 1 | 2020-11-26T09:37:28.000Z | 2020-11-26T09:37:28.000Z | core/event/event_handler.py | ErlendHer/AlgoView | 946c2bb38e2ab3af011281c9672af4fcca84ae87 | [
"Apache-2.0"
] | null | null | null | core/event/event_handler.py | ErlendHer/AlgoView | 946c2bb38e2ab3af011281c9672af4fcca84ae87 | [
"Apache-2.0"
] | 1 | 2020-12-09T17:18:12.000Z | 2020-12-09T17:18:12.000Z | class EventHandler:
def __init__(self, maze, maze_handler, maze_builder, bfs, a_star, indexes, text_table, screen):
"""
Initialize a new EventHandler instance.
:param maze: _maze list
:param maze_handler: MazeHandler instance
:param maze_builder: MazeBuilder instance
... | 34.117647 | 116 | 0.616379 | 6,959 | 0.999856 | 0 | 0 | 0 | 0 | 0 | 0 | 2,303 | 0.330891 |
957893734aaf183904dce73b5e054520162c5d69 | 11,838 | py | Python | flask_jquery/app.py | lmj0328/SocialMediaReport | 555aa3551844b5ee67bcf9296d574fd99977982d | [
"MIT"
] | 1 | 2021-02-28T05:01:37.000Z | 2021-02-28T05:01:37.000Z | flask_jquery/app.py | lmj0328/SocialMediaReport | 555aa3551844b5ee67bcf9296d574fd99977982d | [
"MIT"
] | null | null | null | flask_jquery/app.py | lmj0328/SocialMediaReport | 555aa3551844b5ee67bcf9296d574fd99977982d | [
"MIT"
] | 1 | 2020-03-12T02:08:10.000Z | 2020-03-12T02:08:10.000Z | from flask import Flask, render_template, request, jsonify
from flask import request
from flask import Response
from flask import url_for
from flask import jsonify
import GetOldTweets3 as got
import pandas as pd
import datetime
import numpy as np
import requests
import json
from pyquery import PyQuery as pq
app = Fla... | 41.391608 | 755 | 0.598496 | 0 | 0 | 0 | 0 | 11,435 | 0.965794 | 0 | 0 | 3,503 | 0.295861 |
9579e725a92b212adbfbee1f939f56455d5e30da | 22 | py | Python | nextfeed/settings/__init__.py | Nurdok/nextfeed | 197818310bbf7134badc2ef5ed11ab5ede7fdb35 | [
"MIT"
] | 1 | 2015-08-09T10:42:04.000Z | 2015-08-09T10:42:04.000Z | nextfeed/settings/__init__.py | Nurdok/nextfeed | 197818310bbf7134badc2ef5ed11ab5ede7fdb35 | [
"MIT"
] | null | null | null | nextfeed/settings/__init__.py | Nurdok/nextfeed | 197818310bbf7134badc2ef5ed11ab5ede7fdb35 | [
"MIT"
] | null | null | null | __author__ = 'Rachum'
| 11 | 21 | 0.727273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0.363636 |
957ac7e6d29caaecedbbbd4e6c92497096862e51 | 10,072 | py | Python | croisee/croisee/models.py | fiee/croisee | 922a163b627855468aac84e0c56ea51082424732 | [
"BSD-3-Clause"
] | 6 | 2017-09-06T02:03:36.000Z | 2021-07-11T15:06:29.000Z | croisee/croisee/models.py | fiee/croisee | 922a163b627855468aac84e0c56ea51082424732 | [
"BSD-3-Clause"
] | null | null | null | croisee/croisee/models.py | fiee/croisee | 922a163b627855468aac84e0c56ea51082424732 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import absolute_import
import unicodedata
import re, os
import logging
from django.utils.translation import ugettext_lazy as _
from django.db import models
from django.template.loader import render_to_string
from djang... | 43.601732 | 196 | 0.642276 | 8,033 | 0.797004 | 0 | 0 | 0 | 0 | 0 | 0 | 2,830 | 0.280782 |
957b9b53b7b5837fb4e6e2e80f7b80d9f1347ef1 | 5,372 | py | Python | tests/views/userprofile/forms_test.py | BMeu/Aerarium | 119946cead727ef68b5ecea339990d982c006391 | [
"MIT"
] | null | null | null | tests/views/userprofile/forms_test.py | BMeu/Aerarium | 119946cead727ef68b5ecea339990d982c006391 | [
"MIT"
] | 139 | 2018-12-26T07:54:31.000Z | 2021-06-01T23:14:45.000Z | tests/views/userprofile/forms_test.py | BMeu/Aerarium | 119946cead727ef68b5ecea339990d982c006391 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from unittest import TestCase
from flask_login import login_user
from flask_wtf import FlaskForm
from wtforms import StringField
from wtforms import ValidationError
from app import create_app
from app import db
from app.configuration import TestConfiguration
from app.localization import get_l... | 27.690722 | 92 | 0.625838 | 4,890 | 0.910276 | 0 | 0 | 0 | 0 | 0 | 0 | 1,730 | 0.32204 |
957d235d1750094b4270c5454f14c28d2e8173f1 | 769 | py | Python | Post/migrations/0002_auto_20201110_0901.py | singh-sushil/minorproject | 02fe8c1dce41109447d5f394bb37e10cb34d9316 | [
"MIT"
] | 2 | 2020-12-27T11:28:02.000Z | 2021-01-04T07:52:38.000Z | Post/migrations/0002_auto_20201110_0901.py | singh-sushil/minorproject | 02fe8c1dce41109447d5f394bb37e10cb34d9316 | [
"MIT"
] | 1 | 2020-12-26T13:36:12.000Z | 2020-12-26T13:36:12.000Z | Post/migrations/0002_auto_20201110_0901.py | singh-sushil/minorproject | 02fe8c1dce41109447d5f394bb37e10cb34d9316 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.1 on 2020-11-10 03:16
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('Post', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='post',
... | 30.76 | 224 | 0.594278 | 639 | 0.830949 | 0 | 0 | 0 | 0 | 0 | 0 | 201 | 0.261378 |
957e510be8f3a2b81dab14d254545719454d7bb3 | 2,714 | py | Python | About.py | pm-str/CountDown-More | 90eed19b3d5e417d474f1d79e07c6740f5a9a53d | [
"MIT"
] | null | null | null | About.py | pm-str/CountDown-More | 90eed19b3d5e417d474f1d79e07c6740f5a9a53d | [
"MIT"
] | null | null | null | About.py | pm-str/CountDown-More | 90eed19b3d5e417d474f1d79e07c6740f5a9a53d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'About.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectN... | 49.345455 | 140 | 0.70339 | 2,474 | 0.91157 | 0 | 0 | 0 | 0 | 0 | 0 | 751 | 0.276713 |
957eae3da3f74babe3abba60f328832ad8f0ef04 | 948 | py | Python | userprofile/migrations/0001_initial.py | jmickela/stalkexchange | 2182fcdfb716dbe3c227c83ac52c567331cc9e73 | [
"Apache-2.0"
] | null | null | null | userprofile/migrations/0001_initial.py | jmickela/stalkexchange | 2182fcdfb716dbe3c227c83ac52c567331cc9e73 | [
"Apache-2.0"
] | 10 | 2020-06-05T17:05:48.000Z | 2022-03-11T23:13:08.000Z | userprofile/migrations/0001_initial.py | jmickela/stalkexchange | 2182fcdfb716dbe3c227c83ac52c567331cc9e73 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.Create... | 36.461538 | 157 | 0.635021 | 806 | 0.850211 | 0 | 0 | 0 | 0 | 0 | 0 | 157 | 0.165612 |
957f17448a40b5f7a9697897e18e53b84546771d | 1,244 | py | Python | DML.py | WellingtonFSouza1/SGI | 89746bc1d9745931fd9b451e575b92c8197fcc65 | [
"Apache-2.0"
] | null | null | null | DML.py | WellingtonFSouza1/SGI | 89746bc1d9745931fd9b451e575b92c8197fcc65 | [
"Apache-2.0"
] | null | null | null | DML.py | WellingtonFSouza1/SGI | 89746bc1d9745931fd9b451e575b92c8197fcc65 | [
"Apache-2.0"
] | null | null | null | import pymysql
conexao = pymysql.connect(
host='localhost',
user='root',
password='admin1234',
db='ex_01')
cursor = conexao.cursor(pymysql.cursors.DictCursor)
def select(fields, tables, where=None):
global cursor
query = 'SELECT ' + fields + ' FROM ' + tables
if where:
... | 18.848485 | 90 | 0.568328 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 184 | 0.14791 |
9581ac185297ca50496beb710a3edddd006be6af | 6,792 | py | Python | misc_scripts/downsample.py | rajesh-ibm-power/MITObim | 5d617054975a0e30e0f6c6fb88d21862eaae238f | [
"MIT"
] | 81 | 2015-01-21T21:48:20.000Z | 2022-03-22T12:43:50.000Z | misc_scripts/downsample.py | rajesh-ibm-power/MITObim | 5d617054975a0e30e0f6c6fb88d21862eaae238f | [
"MIT"
] | 47 | 2015-02-16T22:53:00.000Z | 2021-12-16T20:38:17.000Z | misc_scripts/downsample.py | rajesh-ibm-power/MITObim | 5d617054975a0e30e0f6c6fb88d21862eaae238f | [
"MIT"
] | 37 | 2015-01-29T07:34:32.000Z | 2022-03-17T07:20:00.000Z | #!/usr/bin/python
"""downsample
Author: Christoph Hahn (christoph.hahn@uni-graz.at)
February 2017
Extract a random subsample of ~ x % reads from fastq data.
The choice is based on a random number generator. For each fastq read, a random number between 1-100 will be generated. If the random number is smaller than t... | 36.12766 | 383 | 0.6197 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,627 | 0.534011 |
9581c71bce4ce0b38517044c9d5a2c496d783a78 | 585 | py | Python | find_nb.py | DemetriusStorm/100daysofcode | ce87a596b565c5740ae3c48adac91cba779b3833 | [
"MIT"
] | null | null | null | find_nb.py | DemetriusStorm/100daysofcode | ce87a596b565c5740ae3c48adac91cba779b3833 | [
"MIT"
] | null | null | null | find_nb.py | DemetriusStorm/100daysofcode | ce87a596b565c5740ae3c48adac91cba779b3833 | [
"MIT"
] | null | null | null | """
Your task is to construct a building which will be a pile of n cubes.
The cube at the bottom will have a volume of n^3, the cube above will have volume of (n-1)^3 and so on until the top
which will have a volume of 1^3.
You are given the total volume m of the building. Being given m can you find the number n of cub... | 45 | 119 | 0.711111 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 558 | 0.953846 |
9582a4c6372ffccedd8c93f53707273fd3fe596d | 4,597 | py | Python | src/__main__.py | BennyWestsyde/FakeNewsDetection | 8b171f2c93d0849e13c9ea6d94b784caf037a3bb | [
"BSD-3-Clause"
] | null | null | null | src/__main__.py | BennyWestsyde/FakeNewsDetection | 8b171f2c93d0849e13c9ea6d94b784caf037a3bb | [
"BSD-3-Clause"
] | 16 | 2021-04-29T14:22:46.000Z | 2021-05-21T04:02:02.000Z | src/__main__.py | BennyWestsyde/FakeNewsDetection | 8b171f2c93d0849e13c9ea6d94b784caf037a3bb | [
"BSD-3-Clause"
] | 2 | 2021-04-09T16:39:45.000Z | 2021-05-02T19:39:32.000Z | """Class to handle iterating through tweets in real time."""
import json
import os
import pandas as pd
# Said this was unused.
# from bluebird import BlueBird
from bluebird.scraper import BlueBird
from sentiment import PoliticalClassification
from train import TrainingML
col_names32 = "created_at,id,id_str,full_tex... | 32.146853 | 450 | 0.591255 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,501 | 0.326517 |
9583bb525f9a10680502ac52b441c849a250aefe | 2,107 | py | Python | cdk-cross-stack-references/app.py | MauriceBrg/aws-blog.de-projects | ce0e86ccdd845c68c41d9190239926756e09c998 | [
"MIT"
] | 36 | 2019-10-01T12:19:49.000Z | 2021-09-11T00:55:43.000Z | cdk-cross-stack-references/app.py | MauriceBrg/aws-blog.de-projects | ce0e86ccdd845c68c41d9190239926756e09c998 | [
"MIT"
] | 2 | 2021-06-02T00:19:43.000Z | 2021-06-02T00:51:48.000Z | cdk-cross-stack-references/app.py | MauriceBrg/aws-blog.de-projects | ce0e86ccdd845c68c41d9190239926756e09c998 | [
"MIT"
] | 29 | 2019-07-23T04:05:15.000Z | 2021-08-12T14:36:57.000Z | #!/usr/bin/env python3
import aws_cdk.aws_iam as iam
import aws_cdk.aws_s3 as s3
from aws_cdk import core
class ExportingStack(core.Stack):
exported_role_a: iam.Role
exported_role_b: iam.Role
def __init__(self, scope: core.Construct, id: str, **kwargs) -> None:
super().__init__(scope, id, **kw... | 25.385542 | 106 | 0.570954 | 1,811 | 0.859516 | 0 | 0 | 0 | 0 | 0 | 0 | 560 | 0.265781 |
9583cbd4d2fe5cf7c96a5c027ce0ed71ff87cf28 | 6,344 | py | Python | test_trustpaylib.py | beezz/trustpaylib | a56d12d6ff97ad02034d85940ec09abbfe9eba76 | [
"BSD-3-Clause"
] | null | null | null | test_trustpaylib.py | beezz/trustpaylib | a56d12d6ff97ad02034d85940ec09abbfe9eba76 | [
"BSD-3-Clause"
] | null | null | null | test_trustpaylib.py | beezz/trustpaylib | a56d12d6ff97ad02034d85940ec09abbfe9eba76 | [
"BSD-3-Clause"
] | 1 | 2016-05-27T07:12:47.000Z | 2016-05-27T07:12:47.000Z | # -*- coding: utf-8 -*-
# vim:fenc=utf-8
import pytest
import trustpaylib
try:
unicode
py3 = False
except NameError:
py3 = True
unicode = lambda s: s
class TestTrustPayCore:
secret_key = "abcd1234"
aid = "9876543210"
pay_request = trustpaylib.build_pay_request(
AID=aid,
... | 29.784038 | 75 | 0.576135 | 6,171 | 0.97273 | 0 | 0 | 0 | 0 | 0 | 0 | 526 | 0.082913 |
9584860203f1962d57d77ed27e2fa1c1d418bbe7 | 606 | py | Python | Day 01/AdventOfCode01.py | KelvinFurtado/Advent-of-Code-2020 | 7aab4d542507222ef6aaef699d16cc1e2936e1d5 | [
"MIT"
] | null | null | null | Day 01/AdventOfCode01.py | KelvinFurtado/Advent-of-Code-2020 | 7aab4d542507222ef6aaef699d16cc1e2936e1d5 | [
"MIT"
] | null | null | null | Day 01/AdventOfCode01.py | KelvinFurtado/Advent-of-Code-2020 | 7aab4d542507222ef6aaef699d16cc1e2936e1d5 | [
"MIT"
] | null | null | null | inputfile = open('inputDay01.txt', 'r')
values = [int(i) for i in inputfile.readlines()]
#PART1
def aoc01(numbers, value):
for x in numbers:
if value - x in numbers:
return x * (value - x)
#PART2
def aoc02(numbers, value):
num1, num2 = None, None
for x in numbers:
n = value - x
... | 25.25 | 48 | 0.531353 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 47 | 0.077558 |
9584cb7682c9b757f9f395cf4af9a536e43da394 | 1,686 | py | Python | src/backend/api/views/auth_views.py | zackramjan/motuz | 892252eb50acbd8135bf9df9872df5e4cfe6277b | [
"MIT"
] | 84 | 2019-05-10T14:56:48.000Z | 2022-03-19T17:07:24.000Z | src/backend/api/views/auth_views.py | zackramjan/motuz | 892252eb50acbd8135bf9df9872df5e4cfe6277b | [
"MIT"
] | 226 | 2019-05-28T21:59:22.000Z | 2022-03-09T10:58:24.000Z | src/backend/api/views/auth_views.py | zackramjan/motuz | 892252eb50acbd8135bf9df9872df5e4cfe6277b | [
"MIT"
] | 16 | 2019-09-27T01:35:49.000Z | 2022-03-08T16:18:50.000Z | import logging
from flask import request
from flask_restplus import Resource, Namespace, fields
from ..managers import auth_manager
from ..managers.auth_manager import token_required
from ..exceptions import HTTP_EXCEPTION
api = Namespace('auth', description='Authentication related operations')
dto = api.model('au... | 29.068966 | 81 | 0.641163 | 1,116 | 0.661922 | 0 | 0 | 1,185 | 0.702847 | 0 | 0 | 272 | 0.161329 |
95850f5ad82092788d3a213273d93bc24cd594e7 | 4,079 | py | Python | src/api/algorithm/abstract.py | moevm/nosql1h19-text-graph | 410f156ad4f232f8aa060d43692ab020610ddfd4 | [
"MIT"
] | null | null | null | src/api/algorithm/abstract.py | moevm/nosql1h19-text-graph | 410f156ad4f232f8aa060d43692ab020610ddfd4 | [
"MIT"
] | null | null | null | src/api/algorithm/abstract.py | moevm/nosql1h19-text-graph | 410f156ad4f232f8aa060d43692ab020610ddfd4 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod, abstractproperty
from typing import Dict
__all__ = ["AbstractAlgorithm"]
class AbstractAlgorithm(ABC):
@abstractmethod
def preprocess(self, text: str) -> Dict:
"""Применяется к каждому фрагменту текста.
:param text: Текст
:type text: str
... | 31.620155 | 79 | 0.61314 | 5,160 | 0.978199 | 0 | 0 | 2,310 | 0.437915 | 0 | 0 | 4,081 | 0.773649 |
95851ced698edaf85c4890ce3e5ba9ddb348e00d | 304 | py | Python | buidl/libsec_build.py | jamesob/buidl-python | 84ef0284c2bff8bb09cb804c6a02f99e78e59dbe | [
"MIT"
] | 45 | 2020-10-23T13:03:41.000Z | 2022-03-27T17:32:43.000Z | buidl/libsec_build.py | jamesob/buidl-python | 84ef0284c2bff8bb09cb804c6a02f99e78e59dbe | [
"MIT"
] | 87 | 2020-10-23T19:59:36.000Z | 2022-03-03T18:05:58.000Z | buidl/libsec_build.py | jamesob/buidl-python | 84ef0284c2bff8bb09cb804c6a02f99e78e59dbe | [
"MIT"
] | 8 | 2020-11-26T14:29:32.000Z | 2022-03-01T23:00:44.000Z | #!/usr/bin/python3
from cffi import FFI
source = open("libsec.h", "r").read()
header = """
#include <secp256k1.h>
#include <secp256k1_extrakeys.h>
#include <secp256k1_schnorrsig.h>
"""
ffi = FFI()
ffi.cdef(source)
ffi.set_source("_libsec", header, libraries=["secp256k1"])
ffi.compile(verbose=True)
| 16.888889 | 58 | 0.703947 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 148 | 0.486842 |
9587650c0783fa597913cbb4c287026be8eb0512 | 938 | py | Python | src/crud-redmine/client/kafka_client.py | LeoNog96/IntegradorRedmine | bb5477caa9088665b3d18e26530609ba831517d9 | [
"MIT"
] | null | null | null | src/crud-redmine/client/kafka_client.py | LeoNog96/IntegradorRedmine | bb5477caa9088665b3d18e26530609ba831517d9 | [
"MIT"
] | null | null | null | src/crud-redmine/client/kafka_client.py | LeoNog96/IntegradorRedmine | bb5477caa9088665b3d18e26530609ba831517d9 | [
"MIT"
] | null | null | null | from kafka import KafkaConsumer, KafkaProducer
import json
class Producer:
producer = None
producer_topic = None
def __init__(self, server, topic):
self.producer = KafkaProducer (
bootstrap_servers=[server],
value_serializer=lambda x: json.dumps(x).encode('utf-8') ... | 24.684211 | 88 | 0.60661 | 876 | 0.933902 | 0 | 0 | 0 | 0 | 0 | 0 | 42 | 0.044776 |
958794f84d8fee2575a58b5c2e83f3a77dc04ee4 | 2,038 | py | Python | remove_empty_csv's.py | asadrazaa1/emails-extraction | bb2b7b9f4caa9f62a81e6d9588c1c652d074dfde | [
"Unlicense"
] | null | null | null | remove_empty_csv's.py | asadrazaa1/emails-extraction | bb2b7b9f4caa9f62a81e6d9588c1c652d074dfde | [
"Unlicense"
] | null | null | null | remove_empty_csv's.py | asadrazaa1/emails-extraction | bb2b7b9f4caa9f62a81e6d9588c1c652d074dfde | [
"Unlicense"
] | null | null | null | import psycopg2
import sys
from nltk.tokenize import sent_tokenize
import re
import csv
import os
# pmid {16300001 - 16400000}
try:
# starting_pmid = 16300001
# intermediate_pmid = 16400000
starting_pmid = 100001
intermediate_pmid = 200000
ending_pmid = 32078260
while 1:
if interme... | 33.966667 | 112 | 0.552993 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 595 | 0.291953 |
9587f1170fd14bbc3fde52488cf4748e36a462f2 | 439 | py | Python | src/core.py | unior-nlp-research-group/Ghigliottina | d78cf54cb7412301dd35ef3f3d6419a0350fe3af | [
"Apache-2.0"
] | 2 | 2021-01-21T11:20:57.000Z | 2021-01-21T17:51:07.000Z | src/core.py | unior-nlp-research-group/Ghigliottina | d78cf54cb7412301dd35ef3f3d6419a0350fe3af | [
"Apache-2.0"
] | null | null | null | src/core.py | unior-nlp-research-group/Ghigliottina | d78cf54cb7412301dd35ef3f3d6419a0350fe3af | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
import utility
###################
## main
###################
if __name__=='__main__':
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-m", "--model", help="the path to the model file")
args = parser.parse_args()
p... | 23.105263 | 79 | 0.603645 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 170 | 0.387244 |
958823c46f3203892c3a9a7227ee987c3b6cf53a | 3,412 | py | Python | volcengine_ml_platform/datasets/image_dataset.py | volc-mlplatform/ml-platform-sdk-python | 2d85e23c10a1f3c008da0f1a8ea59c277c750233 | [
"MIT"
] | 11 | 2021-09-08T09:20:54.000Z | 2022-02-18T06:45:47.000Z | volcengine_ml_platform/datasets/image_dataset.py | volc-mlplatform/ml-platform-sdk-python | 2d85e23c10a1f3c008da0f1a8ea59c277c750233 | [
"MIT"
] | 1 | 2021-09-24T03:21:07.000Z | 2021-09-24T06:32:26.000Z | volcengine_ml_platform/datasets/image_dataset.py | volc-mlplatform/ml-platform-sdk-python | 2d85e23c10a1f3c008da0f1a8ea59c277c750233 | [
"MIT"
] | 4 | 2021-09-23T07:54:06.000Z | 2021-11-27T09:40:55.000Z | import json
from collections.abc import Callable
from typing import Optional
import numpy as np
from PIL import Image
from volcengine_ml_platform.datasets.dataset import _Dataset
from volcengine_ml_platform.io.tos_dataset import TorchTOSDataset
class ImageDataset(_Dataset):
"""
ImageDataset创建函数 ``ImageDatas... | 32.188679 | 84 | 0.586166 | 3,344 | 0.93044 | 0 | 0 | 0 | 0 | 0 | 0 | 1,231 | 0.342515 |
95887e566eb9b0860bede603c8c4d3bf2e059af1 | 5,634 | py | Python | main.py | TrueMLGPro/MultiDownloader | 8ef6cdccbe253fe79cf3cec9ed83fd40c3f834bc | [
"Apache-2.0"
] | 3 | 2021-02-05T09:33:39.000Z | 2021-07-25T18:39:43.000Z | main.py | TrueMLGPro/MultiDownloader | 8ef6cdccbe253fe79cf3cec9ed83fd40c3f834bc | [
"Apache-2.0"
] | null | null | null | main.py | TrueMLGPro/MultiDownloader | 8ef6cdccbe253fe79cf3cec9ed83fd40c3f834bc | [
"Apache-2.0"
] | 1 | 2022-02-28T21:41:12.000Z | 2022-02-28T21:41:12.000Z | # Copyright 2020 TrueMLGPro
# 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, soft... | 39.398601 | 149 | 0.671814 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,583 | 0.458466 |
958a38d4edf87c352270fdf92a3b1727c3d068e0 | 1,129 | py | Python | forge/kubernetes.py | Acidburn0zzz/forge | c53d99f49abe61a2657a1a41232211bb48ee182d | [
"Apache-2.0"
] | 1 | 2017-11-15T15:04:44.000Z | 2017-11-15T15:04:44.000Z | forge/kubernetes.py | Acidburn0zzz/forge | c53d99f49abe61a2657a1a41232211bb48ee182d | [
"Apache-2.0"
] | 2 | 2021-03-20T05:32:38.000Z | 2021-03-26T00:39:11.000Z | forge/kubernetes.py | Acidburn0zzz/forge | c53d99f49abe61a2657a1a41232211bb48ee182d | [
"Apache-2.0"
] | null | null | null | import os, glob
from tasks import task, TaskError, get, sh, SHResult
def is_yaml_empty(dir):
for name in glob.glob("%s/*.yaml" % dir):
with open(name) as f:
if f.read().strip():
return False
return True
class Kubernetes(object):
def __init__(self, namespace=None, conte... | 29.710526 | 75 | 0.558902 | 879 | 0.778565 | 0 | 0 | 634 | 0.561559 | 0 | 0 | 128 | 0.113375 |
958ba96c16c5793bb5abfd2bf23b7c56685312b0 | 615 | py | Python | src/models.py | mchuck/tiny-ssg | 52998288daea9fe592b8e6ce769eca782db591cd | [
"MIT"
] | null | null | null | src/models.py | mchuck/tiny-ssg | 52998288daea9fe592b8e6ce769eca782db591cd | [
"MIT"
] | null | null | null | src/models.py | mchuck/tiny-ssg | 52998288daea9fe592b8e6ce769eca782db591cd | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from typing import List, Dict, Any
@dataclass
class WebsitePage:
title: str
body: str
tags: List[str]
created_at: str
url: str
slug: str
meta: Dict
@dataclass
class WebsiteTag:
name: str
slug: str
pages: List[WebsitePage]
@dataclass
class Web... | 16.184211 | 45 | 0.689431 | 480 | 0.780488 | 0 | 0 | 535 | 0.869919 | 0 | 0 | 18 | 0.029268 |
958c59599470ad36c300e0c6dec5381bb27923b6 | 1,952 | py | Python | demucs/ema.py | sparshpriyadarshi/demucs | 7c7f65401db654d750df2b6f4d5b82a0101500b1 | [
"MIT"
] | 1 | 2022-02-14T05:52:53.000Z | 2022-02-14T05:52:53.000Z | demucs/ema.py | sparshpriyadarshi/demucs | 7c7f65401db654d750df2b6f4d5b82a0101500b1 | [
"MIT"
] | null | null | null | demucs/ema.py | sparshpriyadarshi/demucs | 7c7f65401db654d750df2b6f4d5b82a0101500b1 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
# Inspired from https://github.com/rwightman/pytorch-image-models
from contextlib import contextmanager
import torch
from... | 29.134328 | 73 | 0.585553 | 1,602 | 0.820697 | 82 | 0.042008 | 102 | 0.052254 | 0 | 0 | 515 | 0.263832 |
958d20eb83026863f5c7fe7f0d9e55731a14596b | 250 | py | Python | tests/test_all.py | dpineo/gadann | ff5dce9a8fc6192ba1efd854672f593872116beb | [
"MIT"
] | null | null | null | tests/test_all.py | dpineo/gadann | ff5dce9a8fc6192ba1efd854672f593872116beb | [
"MIT"
] | null | null | null | tests/test_all.py | dpineo/gadann | ff5dce9a8fc6192ba1efd854672f593872116beb | [
"MIT"
] | null | null | null | import os
import fnmatch
import deep_learning
tests = [file for file in os.listdir(os.getcwd()) if fnmatch.fnmatch(file, 'test_*.py')]
tests.remove('test_all.py')
for test in tests:
print '---------- '+test+' ----------'
execfile(test)
| 22.727273 | 89 | 0.632 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 50 | 0.2 |
958e7f740b7a101b6adbafb3854a0ff8c7e6558c | 12,328 | py | Python | gws.py | intelligence-csd-auth-gr/greek-words-evolution | ab1ee717f7567ffa8171e64f835932af7502955d | [
"MIT"
] | 9 | 2020-07-12T13:45:24.000Z | 2021-12-05T16:08:58.000Z | word_embeddings/we.py | emiltj/NLP_exam_2021 | 9342e8dc9ad684927bbfa5eb6c125dd53c14cccb | [
"MIT"
] | 2 | 2021-03-30T14:35:26.000Z | 2022-03-12T00:40:17.000Z | word_embeddings/we.py | emiltj/NLP_exam_2021 | 9342e8dc9ad684927bbfa5eb6c125dd53c14cccb | [
"MIT"
] | 2 | 2021-04-23T13:07:55.000Z | 2021-12-16T14:06:51.000Z | import warnings
import argparse
import os
import logging
import lib.metadata as metadata
import lib.model as model
import lib.text as text
import lib.website as website
warnings.filterwarnings('ignore')
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
####################################... | 56.036364 | 120 | 0.455224 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,614 | 0.536502 |
958e9155b3239d72fa5b7b6e836c3597e9e664a8 | 3,887 | py | Python | OP3/op3/messages.py | gvx/op3 | 888ab5975a3f911fc9ed9afea983928de3110033 | [
"MIT"
] | null | null | null | OP3/op3/messages.py | gvx/op3 | 888ab5975a3f911fc9ed9afea983928de3110033 | [
"MIT"
] | null | null | null | OP3/op3/messages.py | gvx/op3 | 888ab5975a3f911fc9ed9afea983928de3110033 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from collections.abc import MutableSequence
from datetime import datetime
from typing import NamedTuple, Any, Optional, Iterator
from .encoders import ENCODERS, string_encode, default_encoder, datetime_encode, blob_encode
class Element(NamedTuple):
value: Any
tag: str
@... | 30.849206 | 92 | 0.637252 | 3,620 | 0.931309 | 601 | 0.154618 | 524 | 0.134808 | 0 | 0 | 209 | 0.053769 |
958ef26cd63d83883ded41820724c2716c93e70b | 2,716 | py | Python | ssepaperless/Organizer/views.py | michaelkressaty/ssepaperless | d536f9106fd499e664d3c03fb6331b4feb1cc4ca | [
"BSD-3-Clause"
] | null | null | null | ssepaperless/Organizer/views.py | michaelkressaty/ssepaperless | d536f9106fd499e664d3c03fb6331b4feb1cc4ca | [
"BSD-3-Clause"
] | null | null | null | ssepaperless/Organizer/views.py | michaelkressaty/ssepaperless | d536f9106fd499e664d3c03fb6331b4feb1cc4ca | [
"BSD-3-Clause"
] | null | null | null | from django.shortcuts import get_object_or_404, render
from django.http import HttpResponse
from django.template import RequestContext, loader
from Organizer.models import Department
from Organizer.models import Advisor
from Organizer.models import Student
from Organizer.models import Course
from Organizer.models impor... | 48.5 | 111 | 0.796024 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 391 | 0.143962 |
95908c4c021ce144e1c7f298836a5c4a2cc424d8 | 462 | py | Python | project/3/cal.py | Aries-Dawn/Cpp-Program-Design | 9d4fc9a902fff2f76e41314f5d6c52871d30a511 | [
"MIT"
] | null | null | null | project/3/cal.py | Aries-Dawn/Cpp-Program-Design | 9d4fc9a902fff2f76e41314f5d6c52871d30a511 | [
"MIT"
] | null | null | null | project/3/cal.py | Aries-Dawn/Cpp-Program-Design | 9d4fc9a902fff2f76e41314f5d6c52871d30a511 | [
"MIT"
] | null | null | null | import numpy as np
matrixA = np.loadtxt('./mat-A-32.txt')
matrixB = np.loadtxt('./mat-B-32.txt')
checking = np.loadtxt('./out32.txt')
result = np.dot(matrixA, matrixB)
diff = result - checking
print(checking)
print(result)
print(diff)
np.absolute(diff)
print(np.max(diff))
[rows, cols] = diff.shape
with open ('./out20... | 23.1 | 42 | 0.623377 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 79 | 0.170996 |
959230e7e9d9994cf553883c73d07ce0fe30741d | 16,749 | py | Python | 2020/src/day24.py | Sujatha-Nagarajan/AdventOfCode | afce23c74fd0a72caa29c1604a582b21806e794e | [
"CC0-1.0"
] | 1 | 2020-12-05T06:14:37.000Z | 2020-12-05T06:14:37.000Z | 2020/src/day24.py | Sujatha-Nagarajan/AdventOfCode | afce23c74fd0a72caa29c1604a582b21806e794e | [
"CC0-1.0"
] | null | null | null | 2020/src/day24.py | Sujatha-Nagarajan/AdventOfCode | afce23c74fd0a72caa29c1604a582b21806e794e | [
"CC0-1.0"
] | null | null | null | import re
from collections import defaultdict
from util import *
input1="""sesenwnenenewseeswwswswwnenewsewsw
neeenesenwnwwswnenewnwwsewnenwseswesw
seswneswswsenwwnwse
nwnwneseeswswnenewneswwnewseswneseene
swweswneswnenwsewnwneneseenw
eesenwseswswnenwswnwnwsewwnwsene
sewnenenenesenwsewnenwwwse
wenwwweseeeweswwwnwwe
ws... | 31.661626 | 81 | 0.920294 | 0 | 0 | 128 | 0.007642 | 0 | 0 | 0 | 0 | 15,153 | 0.904711 |
9594993f4525fce4f5b648804a7994f70f4ed262 | 4,773 | py | Python | ci/check-documentation.py | FredrikBlomgren/aff3ct | fa616bd923b2dcf03a4cf119cceca51cf810d483 | [
"MIT"
] | 315 | 2016-06-21T13:32:14.000Z | 2022-03-28T09:33:59.000Z | ci/check-documentation.py | a-panella/aff3ct | 61509eb756ae3725b8a67c2d26a5af5ba95186fb | [
"MIT"
] | 153 | 2017-01-17T03:51:06.000Z | 2022-03-24T15:39:26.000Z | ci/check-documentation.py | a-panella/aff3ct | 61509eb756ae3725b8a67c2d26a5af5ba95186fb | [
"MIT"
] | 119 | 2017-01-04T14:31:58.000Z | 2022-03-21T08:34:16.000Z | #!/usr/bin/env python3
import argparse
import sys
import re
import subprocess
import os
import glob
import copy
import aff3ct_help_parser as ahp
# read all the lines from the given file and set them in a list of string lines with striped \n \r
def readFileInTable(filename):
aFile = open(filename, "r")
lines = []
... | 27.431034 | 128 | 0.707521 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,155 | 0.241885 |
9595a509a88acc24d2199e14d5a84b03b3fb5415 | 677 | py | Python | todoster/list_projects.py | SophieAu/todoster | 6f69f7b254683d63f60f934eafa8971e78df7eb2 | [
"MIT"
] | 5 | 2020-08-05T21:02:35.000Z | 2021-11-11T14:31:35.000Z | todoster/list_projects.py | SophieAu/todoster | 6f69f7b254683d63f60f934eafa8971e78df7eb2 | [
"MIT"
] | 1 | 2020-09-24T04:41:20.000Z | 2020-09-28T04:37:50.000Z | todoster/list_projects.py | SophieAu/todoster | 6f69f7b254683d63f60f934eafa8971e78df7eb2 | [
"MIT"
] | 1 | 2021-08-09T19:23:24.000Z | 2021-08-09T19:23:24.000Z | from todoster.file_operations import load_projects
from todoster.output_formatter import format_string
def list_projects(arguments):
projects = load_projects()
if not arguments.show_all_projects:
projects = list(filter(lambda x: x["active"], projects))
print()
project_counter = 1
for proj... | 33.85 | 85 | 0.669129 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 54 | 0.079764 |
95988a5a0c747ad5cc792f45a029f70fc328bc8e | 621 | py | Python | src/game_test.py | TomNo/tictactoe-mcts | 5d5db97f54fe5a3bf7c9afaaa4d74984fdb30ec4 | [
"MIT"
] | null | null | null | src/game_test.py | TomNo/tictactoe-mcts | 5d5db97f54fe5a3bf7c9afaaa4d74984fdb30ec4 | [
"MIT"
] | null | null | null | src/game_test.py | TomNo/tictactoe-mcts | 5d5db97f54fe5a3bf7c9afaaa4d74984fdb30ec4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
__author__ = 'Tomas Novacik'
import unittest2
from game import Game
from board import Board, PlayerType, Move
class GameTest(unittest2.TestCase):
def test_winning_move(self):
game = Game()
game.start()
# set winning status to board
board = Board()
... | 18.264706 | 75 | 0.613527 | 476 | 0.766506 | 0 | 0 | 0 | 0 | 0 | 0 | 70 | 0.112721 |
95993548b5a77661a71dcd96b3ee1f6f35d686ce | 1,911 | py | Python | skills_taxonomy_v2/pipeline/skills_extraction/get_sentence_embeddings_utils.py | india-kerle/skills-taxonomy-v2 | a71366dfea3c35580dbafddba9470f83795805ae | [
"MIT"
] | 3 | 2021-11-21T17:21:12.000Z | 2021-12-10T21:19:57.000Z | skills_taxonomy_v2/pipeline/skills_extraction/get_sentence_embeddings_utils.py | india-kerle/skills-taxonomy-v2 | a71366dfea3c35580dbafddba9470f83795805ae | [
"MIT"
] | 16 | 2021-10-06T11:20:35.000Z | 2022-02-02T11:44:28.000Z | skills_taxonomy_v2/pipeline/skills_extraction/get_sentence_embeddings_utils.py | india-kerle/skills-taxonomy-v2 | a71366dfea3c35580dbafddba9470f83795805ae | [
"MIT"
] | 1 | 2021-10-04T12:27:20.000Z | 2021-10-04T12:27:20.000Z | """
Functions to mask sentences of undesirable words (stopwords, punctuation etc).
Used in get_sentence_embeddings.py to process sentences before finding embeddings.
"""
import re
from skills_taxonomy_v2.pipeline.skills_extraction.cleaning_sentences import (
separate_camel_case,
)
def is_token_word(token, token_... | 29.4 | 85 | 0.553114 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 680 | 0.355835 |
959a854d76fcee93383a4561465ab39d08da02e1 | 1,000 | py | Python | migrations/versions/033809bcaf32_destinations.py | RagtagOpen/carpools | 56b8f6491a2d347b637b345fbad7bc744130ec7f | [
"Apache-2.0"
] | 11 | 2017-08-23T17:41:43.000Z | 2018-10-24T03:00:38.000Z | migrations/versions/033809bcaf32_destinations.py | RagtagOpen/carpools | 56b8f6491a2d347b637b345fbad7bc744130ec7f | [
"Apache-2.0"
] | 480 | 2017-07-14T00:29:11.000Z | 2020-01-06T19:04:51.000Z | migrations/versions/033809bcaf32_destinations.py | RagtagOpen/carpools | 56b8f6491a2d347b637b345fbad7bc744130ec7f | [
"Apache-2.0"
] | 22 | 2017-07-07T00:07:32.000Z | 2020-02-27T19:43:14.000Z | """destinations
Revision ID: 033809bcaf32
Revises: 4a77b8fb792a
Create Date: 2017-08-24 05:56:45.166590
"""
from alembic import op
import sqlalchemy as sa
import geoalchemy2
# revision identifiers, used by Alembic.
revision = '033809bcaf32'
down_revision = '4a77b8fb792a'
branch_labels = None
depends_on = None
def... | 27.027027 | 89 | 0.698 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 436 | 0.436 |