hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 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.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a12c438c7a83754218601ba458d96ccb0a07ee3 | 496 | py | Python | farms/migrations/0004_address_state.py | FlowFX/sturdy-potato | d33c6695f71cf8e6517dbd5a4d80c17df38734a8 | [
"MIT"
] | 12 | 2017-04-22T11:15:01.000Z | 2021-08-10T15:09:12.000Z | farms/migrations/0004_address_state.py | FlowFX/sturdy-potato | d33c6695f71cf8e6517dbd5a4d80c17df38734a8 | [
"MIT"
] | 59 | 2017-03-10T18:23:31.000Z | 2018-02-01T15:16:30.000Z | farms/migrations/0004_address_state.py | FlowFX/sturdy-potato | d33c6695f71cf8e6517dbd5a4d80c17df38734a8 | [
"MIT"
] | 1 | 2020-07-10T09:26:11.000Z | 2020-07-10T09:26:11.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-12 15:37
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('farms', '0003_address_municipality'),
]
operations = [
migrations.AddField(
... | 22.545455 | 63 | 0.612903 |
4a12c4c90bb0643bdc8e066da85866e4583d03e4 | 279 | py | Python | tests/test_examples.py | agonopol/sent-sim | bb1467226a2c9db41f46582f3a3658de95af0b32 | [
"BSD-3-Clause"
] | null | null | null | tests/test_examples.py | agonopol/sent-sim | bb1467226a2c9db41f46582f3a3658de95af0b32 | [
"BSD-3-Clause"
] | null | null | null | tests/test_examples.py | agonopol/sent-sim | bb1467226a2c9db41f46582f3a3658de95af0b32 | [
"BSD-3-Clause"
] | null | null | null | from sentsim import similarity
def test_similirity():
assert 1 == similarity("this is a sentence", "this is a sentence")
assert 1 > similarity("this is a sentence", "this is also a sentence")
assert 0.8 < similarity("this is a sentence", "this is also a sentence")
| 34.875 | 76 | 0.698925 |
4a12c57b83a5a0f87b68db3fc33552eba8fa96da | 8,286 | py | Python | util/run_pro2cmake.py | chentoz/occQt | 9738c26a18ac7757201342a69f95483d435a39fa | [
"MIT"
] | null | null | null | util/run_pro2cmake.py | chentoz/occQt | 9738c26a18ac7757201342a69f95483d435a39fa | [
"MIT"
] | null | null | null | util/run_pro2cmake.py | chentoz/occQt | 9738c26a18ac7757201342a69f95483d435a39fa | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#############################################################################
##
## Copyright (C) 2018 The Qt Company Ltd.
## Contact: https://www.qt.io/licensing/
##
## This file is part of the plugins of the Qt Toolkit.
##
## $QT_BEGIN_LICENSE:GPL-EXCEPT$
## Commercial License Usage
## Licensee... | 33.546559 | 99 | 0.619961 |
4a12c61de2ec97afa270afd248661adbf3ce5f46 | 5,605 | py | Python | ingestion/tests/integration/hive/test_hive_crud.py | inspire99/OpenMetadata | a650aea59a41ab48a9e203af091ae13a1fdf46c2 | [
"Apache-2.0"
] | null | null | null | ingestion/tests/integration/hive/test_hive_crud.py | inspire99/OpenMetadata | a650aea59a41ab48a9e203af091ae13a1fdf46c2 | [
"Apache-2.0"
] | null | null | null | ingestion/tests/integration/hive/test_hive_crud.py | inspire99/OpenMetadata | a650aea59a41ab48a9e203af091ae13a1fdf46c2 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not ... | 32.970588 | 98 | 0.694737 |
4a12c67f40a18535274b517b880d3de3b075acdc | 2,025 | py | Python | talleres_inov_docente/figures/plot_rbf_svm_parameters.py | jfcaballero/Tutorial-sobre-scikit-learn-abreviado | 1e2aa1f9132c277162135a5463068801edab8d15 | [
"CC0-1.0"
] | 311 | 2017-03-01T12:55:03.000Z | 2022-03-05T08:51:48.000Z | talleres_inov_docente/figures/plot_rbf_svm_parameters.py | jfcaballero/Tutorial-sobre-scikit-learn-abreviado | 1e2aa1f9132c277162135a5463068801edab8d15 | [
"CC0-1.0"
] | 21 | 2017-05-04T19:29:22.000Z | 2018-06-19T15:37:21.000Z | talleres_inov_docente/figures/plot_rbf_svm_parameters.py | jfcaballero/Tutorial-sobre-scikit-learn-abreviado | 1e2aa1f9132c277162135a5463068801edab8d15 | [
"CC0-1.0"
] | 249 | 2017-03-02T13:22:44.000Z | 2022-02-14T20:34:45.000Z | import matplotlib.pyplot as plt
import numpy as np
from sklearn.svm import SVC
from sklearn.datasets import make_blobs
from .plot_2d_separator import plot_2d_separator
def make_handcrafted_dataset():
# a carefully hand-designed dataset lol
X, y = make_blobs(centers=2, random_state=4, n_samples=30)
y[np.ar... | 34.913793 | 84 | 0.609877 |
4a12c6ae38003887da6260d273712372532c24b0 | 165 | py | Python | GRADE 9/Python/BraydenViana-Python-Video14.py | i1470s/School-Work | e00843f3506b2ad674dce5e47ce3321002cc23e5 | [
"MIT"
] | null | null | null | GRADE 9/Python/BraydenViana-Python-Video14.py | i1470s/School-Work | e00843f3506b2ad674dce5e47ce3321002cc23e5 | [
"MIT"
] | null | null | null | GRADE 9/Python/BraydenViana-Python-Video14.py | i1470s/School-Work | e00843f3506b2ad674dce5e47ce3321002cc23e5 | [
"MIT"
] | null | null | null | def get_gender(sex='unknown'):
if sex == 'm':
sex = 'male'
elif sex == 'f':
sex = 'female'
print(sex)
get_gender('m')
get_gender('f')
get_gender()
| 15 | 31 | 0.563636 |
4a12c73aedc1375af8edfce9e762b7270b2f5ddd | 2,346 | py | Python | gameplay/connection_handler.py | espirin/svoya | 35168387c737dad5d2acc87b775d4e0a38923f2f | [
"MIT"
] | null | null | null | gameplay/connection_handler.py | espirin/svoya | 35168387c737dad5d2acc87b775d4e0a38923f2f | [
"MIT"
] | null | null | null | gameplay/connection_handler.py | espirin/svoya | 35168387c737dad5d2acc87b775d4e0a38923f2f | [
"MIT"
] | null | null | null | from flask_login import current_user
from flask_socketio import join_room, leave_room
from app import socketio, db
from auth.auth import authenticated_only
from gameplay.state_handler import update_clients
from model import Game, User
@socketio.on('connect_player', namespace='/player')
@authenticated_only
def connec... | 29.325 | 94 | 0.706309 |
4a12ca2edf09677273648a4b8bfd3a6b231e9133 | 2,917 | py | Python | core/main.py | meteosangue/meteosangue | dc5fb27cfd9060b909907a0c68066dc2f3ca1bd3 | [
"MIT"
] | 6 | 2016-09-23T08:41:36.000Z | 2021-12-13T21:03:43.000Z | core/main.py | meteosangue/meteosangue | dc5fb27cfd9060b909907a0c68066dc2f3ca1bd3 | [
"MIT"
] | 17 | 2016-10-15T18:36:19.000Z | 2022-03-11T23:15:57.000Z | core/main.py | meteosangue/meteosangue | dc5fb27cfd9060b909907a0c68066dc2f3ca1bd3 | [
"MIT"
] | 3 | 2016-09-23T08:41:37.000Z | 2020-02-01T03:52:16.000Z | # -*- coding: utf-8 -*-
import os
import time
import tweepy
from django.conf import settings
from django.core.files import File
from django.db.models import Q
from datetime import datetime
from lxml import html
from tempfile import NamedTemporaryFile
from selenium import webdriver
from .exceptions import MeteoSangue... | 31.706522 | 104 | 0.686664 |
4a12ca312a4897f57b2b429725d12b986022e6db | 1,044 | py | Python | authentik/providers/oauth2/migrations/0005_auto_20200920_1240.py | BeryJu/passbook | 350f0d836580f4411524614f361a76c4f27b8a2d | [
"MIT"
] | 15 | 2020-01-05T09:09:57.000Z | 2020-11-28T05:27:39.000Z | authentik/providers/oauth2/migrations/0005_auto_20200920_1240.py | BeryJu/passbook | 350f0d836580f4411524614f361a76c4f27b8a2d | [
"MIT"
] | 302 | 2020-01-21T08:03:59.000Z | 2020-12-04T05:04:57.000Z | authentik/providers/oauth2/migrations/0005_auto_20200920_1240.py | BeryJu/passbook | 350f0d836580f4411524614f361a76c4f27b8a2d | [
"MIT"
] | 3 | 2020-03-04T08:21:59.000Z | 2020-08-01T20:37:18.000Z | # Generated by Django 3.1.1 on 2020-09-20 12:40
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
(
"authentik_providers_oauth2",
"0004_remove_oauth2provider_post_logout_redirect_uris",
),
]
operations = [
mi... | 31.636364 | 81 | 0.518199 |
4a12cbd986762475951d01c43b1db1f34a124497 | 3,039 | py | Python | backend/monitor/services.py | davidpalves/repository-monitor | 0be5fbf1d5d404aa9e4952a0f02a44f1662efa91 | [
"MIT"
] | 1 | 2019-11-26T11:36:20.000Z | 2019-11-26T11:36:20.000Z | backend/monitor/services.py | davidpalves/repository-monitor | 0be5fbf1d5d404aa9e4952a0f02a44f1662efa91 | [
"MIT"
] | 11 | 2021-03-10T00:05:55.000Z | 2022-02-26T20:35:53.000Z | backend/monitor/services.py | davidpierre21/repository-monitor | 0be5fbf1d5d404aa9e4952a0f02a44f1662efa91 | [
"MIT"
] | null | null | null | from datetime import datetime, timedelta
from github import Github, UnknownObjectException, GithubException
from rest_framework.exceptions import ValidationError, NotFound
from django.conf import settings
from .models import Repository, Author, Commit
def create_repository(user, full_repository_name):
github = ... | 31.65625 | 80 | 0.615992 |
4a12cdfed63c288397baca124216afbf0492dff5 | 23,585 | py | Python | indico/core/db/sqlalchemy/protection.py | wasm-network/indico | 6aeebc18acd642a3304f0afb0493dcfbdd7addbb | [
"MIT"
] | null | null | null | indico/core/db/sqlalchemy/protection.py | wasm-network/indico | 6aeebc18acd642a3304f0afb0493dcfbdd7addbb | [
"MIT"
] | null | null | null | indico/core/db/sqlalchemy/protection.py | wasm-network/indico | 6aeebc18acd642a3304f0afb0493dcfbdd7addbb | [
"MIT"
] | null | null | null | # This file is part of Indico.
# Copyright (C) 2002 - 2019 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from __future__ import unicode_literals
from flask import has_request_context, session
from sqlalchemy im... | 46.518738 | 120 | 0.628662 |
4a12ce7c1317cf3c99e50aa1a07f486f7bf85006 | 251 | py | Python | CursoemVideo2/Desafio 7.py | JefAlmeida1/Python | 2a615cf17491739f6a988abff9f4fe7be0ef7b9a | [
"MIT"
] | null | null | null | CursoemVideo2/Desafio 7.py | JefAlmeida1/Python | 2a615cf17491739f6a988abff9f4fe7be0ef7b9a | [
"MIT"
] | null | null | null | CursoemVideo2/Desafio 7.py | JefAlmeida1/Python | 2a615cf17491739f6a988abff9f4fe7be0ef7b9a | [
"MIT"
] | null | null | null | #Desenvolva um programa que leia as duas nota de um aluno, calcule e mostre a sua média.
n1 = float(input('Primeira nota: '))
n2 = float(input('Segunda nota: '))
m = (n1 + n2) / 2
print('O calculo entre as notas {} e {}, a média é {}'.format(n1,n2,m)) | 50.2 | 88 | 0.661355 |
4a12cf1bb52dc4179bc69238aed9731515097a4d | 13,004 | py | Python | pysnmp/HH3C-QINQ-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/HH3C-QINQ-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/HH3C-QINQ-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module HH3C-QINQ-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HH3C-QINQ-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:16:24 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 201... | 122.679245 | 2,087 | 0.77653 |
4a12cfa7ae06760d478e02f11bb7a309df904a8f | 763 | py | Python | taskmanager/src/modules/tasks/application/retrieve/get_task_error_handle.py | alice-biometrics/petisco-task-manager | 2bad52013ab122f8c3e5dce740dcd154883e6940 | [
"MIT"
] | 1 | 2020-04-14T18:12:11.000Z | 2020-04-14T18:12:11.000Z | taskmanager/src/modules/tasks/application/retrieve/get_task_error_handle.py | alice-biometrics/petisco-task-manager | 2bad52013ab122f8c3e5dce740dcd154883e6940 | [
"MIT"
] | 3 | 2020-04-20T10:35:26.000Z | 2020-06-15T07:45:59.000Z | taskmanager/src/modules/tasks/application/retrieve/get_task_error_handle.py | alice-biometrics/petisco-task-manager | 2bad52013ab122f8c3e5dce740dcd154883e6940 | [
"MIT"
] | 1 | 2021-03-12T13:48:01.000Z | 2021-03-12T13:48:01.000Z | from meiga import Result
from petisco.controller.errors.http_error import HttpError
from petisco.domain.value_objects.uuid import InvalidUuidError
from taskmanager.src.modules.tasks.domain.errors import TaskNotFoundError
def get_task_error_handler(result: Result) -> HttpError:
domain_error = result.value
htt... | 38.15 | 82 | 0.756225 |
4a12d0d2777d650394da3bdbd61d7c7f3b18a59f | 8,739 | py | Python | BloodBank.py | imdewan/Blood-Bank-Management-System | 15f0343022bd068baa1135926480b5888b182ccc | [
"MIT"
] | null | null | null | BloodBank.py | imdewan/Blood-Bank-Management-System | 15f0343022bd068baa1135926480b5888b182ccc | [
"MIT"
] | null | null | null | BloodBank.py | imdewan/Blood-Bank-Management-System | 15f0343022bd068baa1135926480b5888b182ccc | [
"MIT"
] | null | null | null | import mysql.connector as mysql
from tkinter import *
from tkinter import messagebox
import json
import os
if not os.path.exists("config_db.json"):
f = open("config_db.json", "w")
file1 = open("config_db.json","r")
db_conf=file1.read()
file1.close()
dbdt=['','','']
if db_conf=="":
print("Let's configure your datab... | 34.003891 | 140 | 0.682687 |
4a12d12a16c95cdee1492b39401ba9f7400fab2f | 30,734 | py | Python | examples/pytorch/question-answering/run_seq2seq_qa.py | techthiyanes/adapter-transformers | 04aeaf63c4c54856d416925258393d9e06866b46 | [
"Apache-2.0"
] | null | null | null | examples/pytorch/question-answering/run_seq2seq_qa.py | techthiyanes/adapter-transformers | 04aeaf63c4c54856d416925258393d9e06866b46 | [
"Apache-2.0"
] | null | null | null | examples/pytorch/question-answering/run_seq2seq_qa.py | techthiyanes/adapter-transformers | 04aeaf63c4c54856d416925258393d9e06866b46 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
# Copyright 2021 The HuggingFace Team All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-... | 44.932749 | 120 | 0.676157 |
4a12d152b952cca441858cf920ad0cddd658aee5 | 75 | py | Python | ultimatetictactoe/game/__init__.py | stoimenoff/ultimate-tic-tac-tie | 1d6980dcf51c020edef5edd2a1772cd96c003fd0 | [
"MIT"
] | 4 | 2016-11-02T19:00:29.000Z | 2019-12-05T10:38:20.000Z | ultimatetictactoe/game/__init__.py | stoimenoff/ultimate-tic-tac-tie | 1d6980dcf51c020edef5edd2a1772cd96c003fd0 | [
"MIT"
] | null | null | null | ultimatetictactoe/game/__init__.py | stoimenoff/ultimate-tic-tac-tie | 1d6980dcf51c020edef5edd2a1772cd96c003fd0 | [
"MIT"
] | 3 | 2016-05-26T17:38:57.000Z | 2019-05-05T17:29:29.000Z | from . import boards
from . import players
__all__ = ['boards', 'players']
| 18.75 | 31 | 0.706667 |
4a12d168427d129a7c7d392b60372872cd0d490d | 1,476 | py | Python | bin/convert_c_spinner.py | onslaught-demogroup/ons_paddo_music_disk | 6a945f918fd1220b325385d14327b5e1ee86295d | [
"MIT"
] | null | null | null | bin/convert_c_spinner.py | onslaught-demogroup/ons_paddo_music_disk | 6a945f918fd1220b325385d14327b5e1ee86295d | [
"MIT"
] | null | null | null | bin/convert_c_spinner.py | onslaught-demogroup/ons_paddo_music_disk | 6a945f918fd1220b325385d14327b5e1ee86295d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
from pathlib import Path
import glob
current: Path = Path(os.path.dirname(os.path.realpath(__file__)))
root: Path = current.parent.absolute()
graphics_source = root.joinpath("assets/spinner")
graphics_target = root.joinpath("src")
graphics_target.mkdir(parents=True, exist_ok=True)
pri... | 36 | 93 | 0.568428 |
4a12d16bbfb2cf61ce84b3f1f47a1f50d7c6d406 | 963 | py | Python | tests/executors/encoders/audio/test_spectral.py | xubiuit/jina | 4ab91693c2d51a35eca3cf6c187034e0568b0ac9 | [
"Apache-2.0"
] | null | null | null | tests/executors/encoders/audio/test_spectral.py | xubiuit/jina | 4ab91693c2d51a35eca3cf6c187034e0568b0ac9 | [
"Apache-2.0"
] | null | null | null | tests/executors/encoders/audio/test_spectral.py | xubiuit/jina | 4ab91693c2d51a35eca3cf6c187034e0568b0ac9 | [
"Apache-2.0"
] | null | null | null | import unittest
import numpy as np
from jina.executors.encoders.audio.spectral import MFCCTimbreEncoder, ChromaPitchEncoder
from tests import JinaTestCase
class MyTestCase(JinaTestCase):
def test_mfcc_encoder(self):
batch_size = 10
n_frames = 5
signal_length = 500 * n_frames
test... | 30.09375 | 88 | 0.692627 |
4a12d1c093fefdb845df081345388d08defed857 | 195 | py | Python | yayinevi/deleteBook.py | emremrt98/Python-Projeleri | 01fb22a9bd1f4cfd6884f2e278e20e04d33ea619 | [
"MIT"
] | null | null | null | yayinevi/deleteBook.py | emremrt98/Python-Projeleri | 01fb22a9bd1f4cfd6884f2e278e20e04d33ea619 | [
"MIT"
] | null | null | null | yayinevi/deleteBook.py | emremrt98/Python-Projeleri | 01fb22a9bd1f4cfd6884f2e278e20e04d33ea619 | [
"MIT"
] | null | null | null | import sqlite3
con = sqlite3.connect("yayinevi.db")
cursor = con.cursor()
def kitapSilme(kitapAdi):
cursor.execute("DELETE FROM kitaplik WHERE Adı = (?)", kitapAdi)
con.commit()
| 17.727273 | 69 | 0.676923 |
4a12d1c919e74db22482c9aed96ed464e163ae90 | 1,432 | py | Python | Support/Fuego/Pythia/pythia-0.5/packages/fuego/fuego/serialization/mechanisms/Entity.py | balos1/PelePhysics | d01190cc7b0eaad4ec96fac573034ccb485f0e9f | [
"BSD-3-Clause-LBNL"
] | 31 | 2018-11-21T01:49:06.000Z | 2022-03-30T03:41:43.000Z | Support/Fuego/Pythia/pythia-0.5/packages/fuego/fuego/serialization/mechanisms/Entity.py | balos1/PelePhysics | d01190cc7b0eaad4ec96fac573034ccb485f0e9f | [
"BSD-3-Clause-LBNL"
] | 123 | 2019-03-12T22:27:29.000Z | 2022-03-29T17:00:04.000Z | Support/Fuego/Pythia/pythia-0.5/packages/fuego/fuego/serialization/mechanisms/Entity.py | sundials-codes/PelePhysics | 5624f83a04f43aa95288be9d8a7bb372a4adefe6 | [
"BSD-3-Clause-LBNL"
] | 32 | 2018-11-05T11:51:59.000Z | 2022-03-29T13:09:32.000Z | #!/usr/bin/env python
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Michael A.G. Aivazis
# California Institute of Technology
# (C) 1998-2003 All Rights Reserved
#
# <LicenseText>
#
# ~~~~~~~~~~~~~~~~... | 23.47541 | 82 | 0.453911 |
4a12d3631b51816ba4dea5dafc791f42c3a51a66 | 3,790 | py | Python | crawler/hunan_zhuzhou_whg.py | zixinzeng-jennifer/public-culture-activity | abe908cb10407e7e4753ef541476e4267d24a1b8 | [
"CC0-1.0"
] | null | null | null | crawler/hunan_zhuzhou_whg.py | zixinzeng-jennifer/public-culture-activity | abe908cb10407e7e4753ef541476e4267d24a1b8 | [
"CC0-1.0"
] | null | null | null | crawler/hunan_zhuzhou_whg.py | zixinzeng-jennifer/public-culture-activity | abe908cb10407e7e4753ef541476e4267d24a1b8 | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
import scrapy
from bs4 import BeautifulSoup
from cultureBigdata.items import CultureNewsItem, CultureBasicItem, CultureEventItem
import re
import time
from urllib.parse import unquote
import os
import codecs
import json
import sys
class ShanxiwhySpider(scrapy.Spider):
name ... | 45.119048 | 633 | 0.595778 |
4a12d4cdd27637cfbb6793d8633f93883a87c202 | 33 | py | Python | ch05construction/species.py | Subhanshuupadhyay/rsd-engineeringcourse | 3e8a440f3d70ece500ef25677c6966b54282a0a7 | [
"CC-BY-3.0"
] | 86 | 2015-02-18T13:44:29.000Z | 2022-03-15T06:43:22.000Z | ch05construction/species.py | Subhanshuupadhyay/rsd-engineeringcourse | 3e8a440f3d70ece500ef25677c6966b54282a0a7 | [
"CC-BY-3.0"
] | 132 | 2015-02-25T13:04:52.000Z | 2022-02-16T10:50:15.000Z | ch05construction/species.py | Subhanshuupadhyay/rsd-engineeringcourse | 3e8a440f3d70ece500ef25677c6966b54282a0a7 | [
"CC-BY-3.0"
] | 84 | 2015-02-18T13:44:32.000Z | 2022-02-20T07:59:29.000Z | class Species(object):
pass
| 11 | 22 | 0.666667 |
4a12d5503e3d8a9013f101590c4281bf9a953076 | 381 | py | Python | kivy_helpers.py | YotamAlon/AudioChef | d06796b789eda945b018e5685e8440a232ceadd3 | [
"MIT"
] | null | null | null | kivy_helpers.py | YotamAlon/AudioChef | d06796b789eda945b018e5685e8440a232ceadd3 | [
"MIT"
] | null | null | null | kivy_helpers.py | YotamAlon/AudioChef | d06796b789eda945b018e5685e8440a232ceadd3 | [
"MIT"
] | null | null | null | def toggle_widget(wid, hide):
if hasattr(wid, 'saved_attrs'):
if not hide:
wid.height, wid.size_hint_y, wid.opacity, wid.disabled = wid.saved_attrs
del wid.saved_attrs
elif hide:
wid.saved_attrs = wid.height, wid.size_hint_y, wid.opacity, wid.disabled
wid.height, ... | 47.625 | 84 | 0.656168 |
4a12d61c672a69c3735a493ef394901afafcfac6 | 1,765 | py | Python | aliyun-python-sdk-r-kvstore/aliyunsdkr_kvstore/request/v20150101/DescribeTempInstanceRequest.py | DataDog/aliyun-openapi-python-sdk | 5cbee29bce6416dd62f61f0c3786b1af6ea0d84f | [
"Apache-2.0"
] | 1 | 2019-12-23T12:36:43.000Z | 2019-12-23T12:36:43.000Z | aliyun-python-sdk-r-kvstore/aliyunsdkr_kvstore/request/v20150101/DescribeTempInstanceRequest.py | liusc27/aliyun-openapi-python-sdk | 5e3db3535dd21de987dc5981e71151327d5a884f | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-r-kvstore/aliyunsdkr_kvstore/request/v20150101/DescribeTempInstanceRequest.py | liusc27/aliyun-openapi-python-sdk | 5e3db3535dd21de987dc5981e71151327d5a884f | [
"Apache-2.0"
] | 1 | 2021-02-23T11:27:54.000Z | 2021-02-23T11:27:54.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 36.770833 | 88 | 0.777337 |
4a12d645dead4d6f6442685fb632be2ed73d92be | 326 | py | Python | rewards/admin.py | zizoubrown/Awards | 53af5e9706bdc18a949d49653a8abbf93fb4122d | [
"Unlicense"
] | null | null | null | rewards/admin.py | zizoubrown/Awards | 53af5e9706bdc18a949d49653a8abbf93fb4122d | [
"Unlicense"
] | null | null | null | rewards/admin.py | zizoubrown/Awards | 53af5e9706bdc18a949d49653a8abbf93fb4122d | [
"Unlicense"
] | null | null | null | from django.contrib import admin
from .models import Profile, Image, Rating
admin.site.site_header = "Awards Admin"
admin.site.site_title = "Awards Admin Area"
admin.site.index_title = "Welcome to Awards admin"
# Register your models here.
admin.site.register(Profile)
admin.site.register(Image)
admin.site.register(R... | 27.166667 | 50 | 0.791411 |
4a12d7b8cf82720905df6659c2d2c7d085815b91 | 78 | py | Python | info/settings/__init__.py | rkorkosz/rinfo | 5e9f8f75e359550eedd23948e29f915df36367df | [
"MIT"
] | null | null | null | info/settings/__init__.py | rkorkosz/rinfo | 5e9f8f75e359550eedd23948e29f915df36367df | [
"MIT"
] | 2 | 2015-09-29T21:46:19.000Z | 2015-09-29T21:46:35.000Z | info/settings/__init__.py | Korkki/rinfo | 5e9f8f75e359550eedd23948e29f915df36367df | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from __future__ import absolute_import | 39 | 39 | 0.910256 |
4a12d86407c384d5d143878c5826615b5f234186 | 4,616 | py | Python | file_repository_sdk/model/resource_manage/filter_strategy_instance_data_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | 5 | 2019-07-31T04:11:05.000Z | 2021-01-07T03:23:20.000Z | file_repository_sdk/model/resource_manage/filter_strategy_instance_data_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | file_repository_sdk/model/resource_manage/filter_strategy_instance_data_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: filter_strategy_instance_data.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
fr... | 47.102041 | 564 | 0.80091 |
4a12d885ebc5dd3fd2445c0116b3d1aeccb325f8 | 8,509 | py | Python | main.py | thejerrytan/CarND-Semantic-Segmentation | 5f8e5b1d1278833f0f46bac686a3a19b37f997ba | [
"MIT"
] | null | null | null | main.py | thejerrytan/CarND-Semantic-Segmentation | 5f8e5b1d1278833f0f46bac686a3a19b37f997ba | [
"MIT"
] | null | null | null | main.py | thejerrytan/CarND-Semantic-Segmentation | 5f8e5b1d1278833f0f46bac686a3a19b37f997ba | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os.path
import tensorflow as tf
import helper
import warnings
from distutils.version import LooseVersion
import project_tests as tests
# Check TensorFlow Version
assert LooseVersion(tf.__version__) >= LooseVersion('1.0'), 'Please use TensorFlow version 1.0 or newer. You are using {}'.fo... | 47.272222 | 272 | 0.736044 |
4a12d902ebd96ef754ff7bf60994e736f1bb8602 | 2,014 | py | Python | main.py | ToxicDeeModder1/Heroku-app.json | 9843b1419bad1f4713dc9680f8a767ddb42bb074 | [
"MIT"
] | null | null | null | main.py | ToxicDeeModder1/Heroku-app.json | 9843b1419bad1f4713dc9680f8a767ddb42bb074 | [
"MIT"
] | null | null | null | main.py | ToxicDeeModder1/Heroku-app.json | 9843b1419bad1f4713dc9680f8a767ddb42bb074 | [
"MIT"
] | null | null | null | # (c) @AbirHasan2005
import os
from configs import Configs
from pyromod import listen
from asyncio import TimeoutError
from core.steps import StartSteps
from pyrogram import Client, filters, idle
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, Message, CallbackQuery
app = Client(
session_na... | 33.566667 | 147 | 0.627607 |
4a12d92141bdca053c5d564f90f4af47e9a22d7b | 15,585 | py | Python | test/onnx/test_onnx_opset.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 7 | 2021-05-29T16:31:51.000Z | 2022-02-21T18:52:25.000Z | test/onnx/test_onnx_opset.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 1 | 2021-06-25T22:00:31.000Z | 2021-06-25T22:00:31.000Z | test/onnx/test_onnx_opset.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 1 | 2021-10-05T07:05:26.000Z | 2021-10-05T07:05:26.000Z | from test_pytorch_common import TestCase, run_tests
import torch
import torch.onnx
from torch.nn import Module
import onnx
import io
from torch.onnx.symbolic_helper import _export_onnx_opset_version
from torch.onnx import ir_version, producer_name, producer_version
def check_onnx_opset_operator(model, ops, opset_... | 41.339523 | 123 | 0.468592 |
4a12d973a2344f639da6c45ae67ad5d167ad1fe0 | 46,939 | py | Python | web3/contract.py | egalano/web3.py | 9e63d1885ad2f56cf2c434f7bb016b5e07a638e0 | [
"MIT"
] | null | null | null | web3/contract.py | egalano/web3.py | 9e63d1885ad2f56cf2c434f7bb016b5e07a638e0 | [
"MIT"
] | null | null | null | web3/contract.py | egalano/web3.py | 9e63d1885ad2f56cf2c434f7bb016b5e07a638e0 | [
"MIT"
] | null | null | null | """Interaction with smart contracts over Web3 connector.
"""
import copy
import itertools
from eth_abi import (
decode_abi,
)
from eth_abi.exceptions import (
DecodingError,
)
from eth_utils import (
add_0x_prefix,
encode_hex,
function_abi_to_4byte_selector,
is_list_like,
is_text,
to_t... | 32.018417 | 100 | 0.607235 |
4a12d986ad14c30e4447d5f6269fb447e142ac1c | 2,300 | py | Python | convert.py | ChristopherRider/cryptography | 0afd1cfe7944fa212683e8d6d80985088e4a71ee | [
"MIT"
] | null | null | null | convert.py | ChristopherRider/cryptography | 0afd1cfe7944fa212683e8d6d80985088e4a71ee | [
"MIT"
] | null | null | null | convert.py | ChristopherRider/cryptography | 0afd1cfe7944fa212683e8d6d80985088e4a71ee | [
"MIT"
] | null | null | null | """This python3 script will recognize hex, binary, and base64 strings and convert them to ascii."""
#Written by Christopher Rider
#Note: base64 strings without padding ('=') that contain only [A-Fa-f0-9] will be recognized as hex.
import codecs
import base64
import re
import binascii
# Get the input
import sys
inpu... | 27.710843 | 101 | 0.633913 |
4a12d98c8d22f53e72256daacb8e5ad5efd4657e | 1,176 | py | Python | visualizer.py | pulkitmehta/bikeIntel | eb286c62addc2c917af2c3e04af3704dc00c6b1a | [
"MIT"
] | null | null | null | visualizer.py | pulkitmehta/bikeIntel | eb286c62addc2c917af2c3e04af3704dc00c6b1a | [
"MIT"
] | null | null | null | visualizer.py | pulkitmehta/bikeIntel | eb286c62addc2c917af2c3e04af3704dc00c6b1a | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt, matplotlib.animation as animation
fig = plt.figure(figsize=(20,3))
plt.title("Rental forecasting | Memory offset = 7 D | Dynamic Adaptability | 2019-01-01 to 2020-05-31")
entries = 240
ax = fig.add_subplot(1,1,1)
f = open('./output/timeline_forec... | 28 | 103 | 0.561224 |
4a12d9ae1271d4454b1cd3d86d5f8b6f674b0e2e | 18,075 | py | Python | ops/base_module.py | ICME2022/R-S-R | 0e938082a0ea381cff7f0348deb65826848c43e4 | [
"Apache-2.0"
] | null | null | null | ops/base_module.py | ICME2022/R-S-R | 0e938082a0ea381cff7f0348deb65826848c43e4 | [
"Apache-2.0"
] | null | null | null | ops/base_module.py | ICME2022/R-S-R | 0e938082a0ea381cff7f0348deb65826848c43e4 | [
"Apache-2.0"
] | null | null | null | # Code for STTNet
from __future__ import print_function, division, absolute_import
import torch
import torch.nn as nn
import torch.nn.functional as F
import math
import torch.utils.model_zoo as model_zoo
__all__ = ['FBResNet', 'fbresnet50', 'fbresnet101']
model_urls = {
'fbresnet50': 'http://data.lip6.fr/c... | 37.893082 | 157 | 0.611065 |
4a12d9b2d0eda8e77d342d718e3dc3283e3ed190 | 303 | py | Python | pyNastran/utils/test/test_log.py | JohannesSeidel/pyNastran | 91ccd2756b201a7a3e4bb81cc6dc53b947d43bbf | [
"BSD-3-Clause"
] | null | null | null | pyNastran/utils/test/test_log.py | JohannesSeidel/pyNastran | 91ccd2756b201a7a3e4bb81cc6dc53b947d43bbf | [
"BSD-3-Clause"
] | 1 | 2021-06-07T16:33:59.000Z | 2021-06-07T16:33:59.000Z | pyNastran/utils/test/test_log.py | JohannesSeidel/pyNastran | 91ccd2756b201a7a3e4bb81cc6dc53b947d43bbf | [
"BSD-3-Clause"
] | 1 | 2021-10-14T03:52:44.000Z | 2021-10-14T03:52:44.000Z | """tests log.py"""
import os
import unittest
from pyNastran.utils.log import make_log
class TestLog(unittest.TestCase):
def test_make_log(self):
"""tests make_log"""
make_log()
os.remove('pyNastran.log')
if __name__ == "__main__": # pragma: no cover
unittest.main()
| 18.9375 | 46 | 0.656766 |
4a12da434328670db2a8b5ce1891a9555295d37b | 180 | py | Python | docs/src/bigger_applications/app/main.py | kabirkhan/fastapi | 9ca72f4ea1fc6f04b7d8d4e2f3c4d7da5f6c322e | [
"MIT"
] | 1 | 2019-05-07T14:55:24.000Z | 2019-05-07T14:55:24.000Z | docs/src/bigger_applications/app/main.py | kabirkhan/fastapi | 9ca72f4ea1fc6f04b7d8d4e2f3c4d7da5f6c322e | [
"MIT"
] | null | null | null | docs/src/bigger_applications/app/main.py | kabirkhan/fastapi | 9ca72f4ea1fc6f04b7d8d4e2f3c4d7da5f6c322e | [
"MIT"
] | null | null | null | from fastapi import FastAPI
from .routers import items, users
app = FastAPI()
app.include_router(users.router)
app.include_router(items.router, prefix="/items", tags=["items"])
| 20 | 65 | 0.761111 |
4a12daf888f3493702d4d62fae55357a929ef421 | 7,741 | py | Python | huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/project_details_and_status_result.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 64 | 2020-06-12T07:05:07.000Z | 2022-03-30T03:32:50.000Z | huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/project_details_and_status_result.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 11 | 2020-07-06T07:56:54.000Z | 2022-01-11T11:14:40.000Z | huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/project_details_and_status_result.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 24 | 2020-06-08T11:42:13.000Z | 2022-03-04T06:44:08.000Z | # coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class ProjectDetailsAndStatusResult:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dic... | 26.152027 | 136 | 0.585583 |
4a12db93d513a3bd1df205326c965d457cb18198 | 52 | py | Python | app/controllers/helpers/__init__.py | taeram/ineffable | fcaf1cc405f9e4dc3346fa91338b75b195325f84 | [
"MIT"
] | 7 | 2015-05-08T21:37:27.000Z | 2019-01-01T22:11:07.000Z | app/controllers/helpers/__init__.py | taeram/ineffable | fcaf1cc405f9e4dc3346fa91338b75b195325f84 | [
"MIT"
] | null | null | null | app/controllers/helpers/__init__.py | taeram/ineffable | fcaf1cc405f9e4dc3346fa91338b75b195325f84 | [
"MIT"
] | null | null | null | __all__ = ["cachebuster", "favicon", "letsencrypt"]
| 26 | 51 | 0.692308 |
4a12dd1af28c98d1d614cb7ea7fb97b0b1b84dee | 25,952 | py | Python | pandas/core/sparse/array.py | buntwo/pandas | 8e6b09ff3a09de58e82da6dcabbfddba61a743d6 | [
"BSD-3-Clause"
] | null | null | null | pandas/core/sparse/array.py | buntwo/pandas | 8e6b09ff3a09de58e82da6dcabbfddba61a743d6 | [
"BSD-3-Clause"
] | null | null | null | pandas/core/sparse/array.py | buntwo/pandas | 8e6b09ff3a09de58e82da6dcabbfddba61a743d6 | [
"BSD-3-Clause"
] | 1 | 2018-10-05T04:56:16.000Z | 2018-10-05T04:56:16.000Z | """
SparseArray data structure
"""
from __future__ import division
# pylint: disable=E1101,E1103,W0231
import numpy as np
import warnings
import pandas as pd
from pandas.core.base import PandasObject
from pandas import compat
from pandas.compat import range
from pandas.compat.numpy import function as nv
from pandas... | 32.07911 | 79 | 0.579609 |
4a12dd4e2ba866630104305dcae0a0a2e769a40a | 18,540 | py | Python | ref_utils/LFDataset.py | IndigoPurple/EFENet | e88234486f19534274a0a20badc251788ac67e31 | [
"MIT"
] | 11 | 2021-10-18T02:14:37.000Z | 2022-02-10T13:17:07.000Z | ref_utils/LFDataset.py | IndigoPurple/EFENet | e88234486f19534274a0a20badc251788ac67e31 | [
"MIT"
] | null | null | null | ref_utils/LFDataset.py | IndigoPurple/EFENet | e88234486f19534274a0a20badc251788ac67e31 | [
"MIT"
] | null | null | null | import sys
import matplotlib.pyplot as plt
import numpy as np
import h5py
from ulti import blend, grayscale, my_imshow, psnr
from Dataset import Dataset
import time
import scipy
import scipy.io
import scipy.misc
import scipy.io as sio
import os
# dataset_test = ChairsSDHomDataset(filename = '/fileserver/haitian/da... | 51.787709 | 247 | 0.61068 |
4a12de7a9778cef173d8c04bfb12379ba8bf6396 | 7,489 | py | Python | Tutorials/Slither/Slither-Source-Code.py | Charles0115/Python-PyGame-Projects | 43ae8527f8e584d1363f1e24a4e455127594ead8 | [
"MIT"
] | 1 | 2020-06-14T12:47:39.000Z | 2020-06-14T12:47:39.000Z | Tutorials/Slither/Slither-Source-Code.py | Charles0115/Python-Pygame-Projects | 43ae8527f8e584d1363f1e24a4e455127594ead8 | [
"MIT"
] | null | null | null | Tutorials/Slither/Slither-Source-Code.py | Charles0115/Python-Pygame-Projects | 43ae8527f8e584d1363f1e24a4e455127594ead8 | [
"MIT"
] | null | null | null | import pygame
import time
import random
pygame.init()
white = (255, 255, 255)
black = (0, 0, 0)
red = (255, 0, 0)
green = (0, 155, 0)
display_width = 800
display_height = 600
gameDisplay = pygame.display.set_mode((display_width, display_height))
pygame.display.set_caption('Slither')
icon = pygame.image.load('apple... | 27.332117 | 127 | 0.528375 |
4a12df7ee6f62c095aa1451c14fc7fbf4d9fafeb | 10,554 | py | Python | evology/research/MCarloLongRuns/archiv/PopulationDynamics.py | aymericvie/evology | 8f00d94dee7208be5a5bdd0375a9d6ced25097f4 | [
"Apache-2.0"
] | null | null | null | evology/research/MCarloLongRuns/archiv/PopulationDynamics.py | aymericvie/evology | 8f00d94dee7208be5a5bdd0375a9d6ced25097f4 | [
"Apache-2.0"
] | 2 | 2022-01-10T02:10:56.000Z | 2022-01-14T03:41:42.000Z | evology/research/MCarloLongRuns/archiv/PopulationDynamics.py | aymericvie/evology | 8f00d94dee7208be5a5bdd0375a9d6ced25097f4 | [
"Apache-2.0"
] | null | null | null | """
This experiment investigates how learning rates and reinvestment rates affect population dynamics.
It takes a fixed initial condition (wealth coordinates), time horizon and population size.
"""
# Imports
import numpy as np
import pandas as pd
import sys
if sys.platform == "darwin":
sys.path.append("/Users/a... | 23.40133 | 99 | 0.538185 |
4a12dfc674fa58ed8fcc00061bd8d36161e9f45f | 994 | py | Python | all_functions/scrapy/tutorial/tutorial/spiders/dmoz_spider.py | Heroku-elasa/-heroku-buildpack-python-ieee-new | 06ec2fda04d9e478ed2506400e460489b0ca91ab | [
"MIT"
] | null | null | null | all_functions/scrapy/tutorial/tutorial/spiders/dmoz_spider.py | Heroku-elasa/-heroku-buildpack-python-ieee-new | 06ec2fda04d9e478ed2506400e460489b0ca91ab | [
"MIT"
] | 15 | 2021-03-18T20:23:25.000Z | 2022-03-11T23:16:16.000Z | all_functions/scrapy/tutorial/tutorial/spiders/dmoz_spider.py | Heroku-elasa/heroku-buildpack-python-ieee-new | 06ec2fda04d9e478ed2506400e460489b0ca91ab | [
"MIT"
] | 1 | 2017-03-04T16:48:55.000Z | 2017-03-04T16:48:55.000Z | import scrapy
class DmozSpider(scrapy.Spider):
name = "dmoz"
allowed_domains = ["dmoz.org"]
start_urls = [
"http://www.dmoz.org/Computers/Programming/Languages/Python/Books/",
"http://www.dmoz.org/Computers/Programming/Languages/Python/Resources/"
]
def parse(self, response):
... | 32.064516 | 79 | 0.561368 |
4a12dfcfbb428328c4ebf3dacaa7f9c9201aa56a | 399 | py | Python | web_project/asgi.py | TIJMacLean/FlyMyPlane | 3e3f069b37482456857146383e3c5d8bbcdfdb0e | [
"Apache-2.0"
] | 1 | 2020-11-19T06:11:25.000Z | 2020-11-19T06:11:25.000Z | web_project/asgi.py | TIJMacLean/FlyMyPlane | 3e3f069b37482456857146383e3c5d8bbcdfdb0e | [
"Apache-2.0"
] | 7 | 2021-04-08T21:31:50.000Z | 2022-01-13T03:05:02.000Z | web_project/asgi.py | AhmadTariqAlflahat/Web-Project-Django | 80d8ba5cd04df9781e94a65122aa703999c1bdb8 | [
"MIT"
] | null | null | null | """
ASGI config for web_project project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_S... | 23.470588 | 78 | 0.789474 |
4a12e13515b4bfe127e3e8efd494388be34de178 | 23,537 | py | Python | imagemounter/volume_system.py | pombredanne/imagemounter | 5d8ba6f2b4cd61b9ad259d5265f6fd7f74a0e82f | [
"MIT"
] | 89 | 2015-05-08T08:29:18.000Z | 2022-03-05T00:03:44.000Z | imagemounter/volume_system.py | personx000/imagemounter | 5d8ba6f2b4cd61b9ad259d5265f6fd7f74a0e82f | [
"MIT"
] | 32 | 2015-04-08T19:59:51.000Z | 2022-03-24T15:06:02.000Z | imagemounter/volume_system.py | personx000/imagemounter | 5d8ba6f2b4cd61b9ad259d5265f6fd7f74a0e82f | [
"MIT"
] | 47 | 2015-03-04T19:04:11.000Z | 2022-02-27T18:22:24.000Z | import inspect
import logging
import os
import subprocess
import sys
from collections import defaultdict
import re
from imagemounter import _util, dependencies
from imagemounter.exceptions import ArgumentError, SubsystemError, ModuleNotFoundError, PrerequisiteFailedError
logger = logging.getLogger(__name__)
class ... | 42.256732 | 121 | 0.572036 |
4a12e18a37322088249560a01d2cf73b3094cf7d | 840 | py | Python | resolucao/numpy/subplot.py | rafaelbes/numericalAnalysis | 31f2b9cd5fb62cee9a649ac0257024de757eede4 | [
"MIT"
] | null | null | null | resolucao/numpy/subplot.py | rafaelbes/numericalAnalysis | 31f2b9cd5fb62cee9a649ac0257024de757eede4 | [
"MIT"
] | null | null | null | resolucao/numpy/subplot.py | rafaelbes/numericalAnalysis | 31f2b9cd5fb62cee9a649ac0257024de757eede4 | [
"MIT"
] | 4 | 2020-12-15T00:31:38.000Z | 2021-09-09T14:52:19.000Z | import matplotlib.pyplot as plt
import numpy as np
figs, axs = plt.subplots(2)
for ax in axs:
ax.axhline(y=0, color='k')
ax.grid(False)
axs[0].axvline(x=2.45, color='k')
axs[0].axvline(x=4.22, color='k')
axs[1].axvline(x=2.45, color='gray', alpha=0.2)
axs[1].axvline(x=4.22, color='gray', alpha=0.2)
x = np.linspac... | 31.111111 | 144 | 0.640476 |
4a12e1da3e6b180e7f0279d711daa0714ba647ac | 1,052 | py | Python | tool_Diameter_decode.py | fertiland/pyprotosim | b329c060f1cd521e264da8416249a02429f432f3 | [
"BSD-2-Clause"
] | 12 | 2015-04-23T14:23:29.000Z | 2021-11-15T11:17:48.000Z | tool_Diameter_decode.py | fertiland/pyprotosim | b329c060f1cd521e264da8416249a02429f432f3 | [
"BSD-2-Clause"
] | 1 | 2021-03-15T15:50:16.000Z | 2021-03-15T15:50:16.000Z | tool_Diameter_decode.py | grmagalhaes/pyprotosim_python3 | 597ddf9f880c5c83465f190bf0e461fcb04e09d9 | [
"BSD-2-Clause"
] | 12 | 2015-01-26T21:11:22.000Z | 2021-07-09T22:24:50.000Z | #!/usr/bin/env python
##################################################################
# Copyright (c) 2012, Sergej Srepfler <sergej.srepfler@gmail.com>
# February 2012 - March 2012
# Version 0.3, Last change on Oct 24, 2012
# This software is distributed under the terms of BSD license.
##########################... | 31.878788 | 84 | 0.587452 |
4a12e280c705a9e203a1ad3248a37c7280fc206c | 575 | py | Python | web/main.py | cl3m3nt666/networkInfo | 3e77a3d5fc603d7c9c44b3ecb42e2a1714ca0dbe | [
"Apache-2.0"
] | null | null | null | web/main.py | cl3m3nt666/networkInfo | 3e77a3d5fc603d7c9c44b3ecb42e2a1714ca0dbe | [
"Apache-2.0"
] | null | null | null | web/main.py | cl3m3nt666/networkInfo | 3e77a3d5fc603d7c9c44b3ecb42e2a1714ca0dbe | [
"Apache-2.0"
] | null | null | null | import bottle
from bottle import get, static_file
import requests
import json
@get("/css/<filepath:re:.*\.css>")
def css(filepath):
return static_file(filepath, root="css/")
@get("/js/<filepath:re:.*\.js>")
def css(filepath):
return static_file(filepath, root="js/")
@bottle.route("/")
@bottle.view("ipinfo.t... | 25 | 81 | 0.650435 |
4a12e32e6eef9b495882b26287f77e8ab7191968 | 2,297 | py | Python | experiments/karla/diplomski-rad/blade/ont/datasets/n20-f-bacterium-racon-hax/finished-experiments/model-n20-ont-f-bac-racon-hax-11.py | lvrcek/consensus-net | 560957f315751822e1ddf8c097eb7b712ceadff3 | [
"MIT"
] | null | null | null | experiments/karla/diplomski-rad/blade/ont/datasets/n20-f-bacterium-racon-hax/finished-experiments/model-n20-ont-f-bac-racon-hax-11.py | lvrcek/consensus-net | 560957f315751822e1ddf8c097eb7b712ceadff3 | [
"MIT"
] | null | null | null | experiments/karla/diplomski-rad/blade/ont/datasets/n20-f-bacterium-racon-hax/finished-experiments/model-n20-ont-f-bac-racon-hax-11.py | lvrcek/consensus-net | 560957f315751822e1ddf8c097eb7b712ceadff3 | [
"MIT"
] | 1 | 2018-12-23T13:50:29.000Z | 2018-12-23T13:50:29.000Z | from comet_ml import Experiment
experiment = Experiment(api_key="oda8KKpxlDgWmJG5KsYrrhmIV", project_name="consensusnet")
import numpy as np
from keras.models import Model
from keras.layers import Dense, Dropout, Activation, Flatten, BatchNormalization, Input
from keras.layers import Conv1D, MaxPooling1D, Conv2D, Max... | 33.289855 | 132 | 0.708315 |
4a12e346254725c0a2fc7c54c9ef99d0d6ea3e88 | 7,090 | py | Python | website/project/tasks.py | RabiaAnne/osf.io | 614d425c03f05113918adfea77e05610d936c9f9 | [
"Apache-2.0"
] | null | null | null | website/project/tasks.py | RabiaAnne/osf.io | 614d425c03f05113918adfea77e05610d936c9f9 | [
"Apache-2.0"
] | null | null | null | website/project/tasks.py | RabiaAnne/osf.io | 614d425c03f05113918adfea77e05610d936c9f9 | [
"Apache-2.0"
] | null | null | null | from django.apps import apps
import logging
from future.moves.urllib.parse import urljoin
import random
import requests
from framework.celery_tasks import app as celery_app
from website import settings, mails
from website.util.share import GraphNode, format_contributor
logger = logging.getLogger(__name__)
@celery... | 39.171271 | 204 | 0.680113 |
4a12e35c9256392f5bb0245a1f0dd62f256371ae | 162 | py | Python | tools/skp/page_sets/__init__.py | mohad12211/skia | 042a53aa094715e031ebad4da072524ace316744 | [
"BSD-3-Clause"
] | 14,668 | 2015-01-01T01:57:10.000Z | 2022-03-31T23:33:32.000Z | tools/skp/page_sets/__init__.py | mohad12211/skia | 042a53aa094715e031ebad4da072524ace316744 | [
"BSD-3-Clause"
] | 250 | 2018-02-02T23:16:57.000Z | 2022-03-21T06:09:53.000Z | tools/skp/page_sets/__init__.py | mohad12211/skia | 042a53aa094715e031ebad4da072524ace316744 | [
"BSD-3-Clause"
] | 5,941 | 2015-01-02T11:32:21.000Z | 2022-03-31T16:35:46.000Z | # Copyright 2019 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.
| 40.5 | 72 | 0.771605 |
4a12e37803ac43369c6153634ad84f67554682bf | 16,335 | py | Python | tools/trainval_net.py | VDIGPKU/A-quadrilateral-scene-text-detector | 7e8356e1588210cca5ab6846acc0265d8b5ee029 | [
"MIT"
] | 1 | 2021-11-05T03:29:28.000Z | 2021-11-05T03:29:28.000Z | tools/trainval_net.py | VDIGPKU/A-quadrilateral-scene-text-detector | 7e8356e1588210cca5ab6846acc0265d8b5ee029 | [
"MIT"
] | null | null | null | tools/trainval_net.py | VDIGPKU/A-quadrilateral-scene-text-detector | 7e8356e1588210cca5ab6846acc0265d8b5ee029 | [
"MIT"
] | null | null | null | # --------------------------------------------------------
# Pytorch multi-GPU Faster R-CNN
# Licensed under The MIT License [see LICENSE for details]
# Written by Jiasen Lu, Jianwei Yang, based on code from Ross Girshick
# --------------------------------------------------------
from __future__ import absolute_import
... | 40.333333 | 101 | 0.57135 |
4a12e5ac592412832211dc42789bdf2e0c8c9870 | 2,248 | py | Python | snn/experiments/run_pacb.py | KaroliShp/pacbayes-opt | fa30b897fd6c3763a4bdb66a9fc9518165841c18 | [
"Apache-2.0"
] | null | null | null | snn/experiments/run_pacb.py | KaroliShp/pacbayes-opt | fa30b897fd6c3763a4bdb66a9fc9518165841c18 | [
"Apache-2.0"
] | null | null | null | snn/experiments/run_pacb.py | KaroliShp/pacbayes-opt | fa30b897fd6c3763a4bdb66a9fc9518165841c18 | [
"Apache-2.0"
] | null | null | null | import os
import sys
sys.path.insert(0, "/snn/")
sys.path.insert(0, "/")
from snn.core import package_path
from snn.core.parse_args import CompleteParser, Interpreter
from snn.core.utils import deserialize
def run_pacb(weights_rand_init, model, test_set, epochs, learning_rate, drop_lr, lr_factor, seed, trainw):
... | 51.090909 | 117 | 0.70952 |
4a12e5df61df72fc53097fa119cfa87b647c36ef | 4,956 | py | Python | src/rvp.py | yochai-safrai/Automatic-RVP | fc975e869bd8c1562056dff94e64434ab375af92 | [
"MIT"
] | null | null | null | src/rvp.py | yochai-safrai/Automatic-RVP | fc975e869bd8c1562056dff94e64434ab375af92 | [
"MIT"
] | null | null | null | src/rvp.py | yochai-safrai/Automatic-RVP | fc975e869bd8c1562056dff94e64434ab375af92 | [
"MIT"
] | null | null | null | import sys
import concurrent.futures
import os
import numpy as np
import pandas as pd
from itertools import repeat
from stabilization import stabilization, verify_data, StabilizationFail, StabilizationSuccess
from pade import pade, save_results
from clustering import clustering
def run_pade(data_in, start, finish, di... | 39.648 | 138 | 0.770178 |
4a12e64f5ba5b8652bb486e1c24b0d68ad2ca46c | 28,116 | py | Python | trac/config.py | wiraqutra/photrackjp | e120cba2a5d5d30f99ad084c6521e61f09694ee6 | [
"BSD-3-Clause"
] | null | null | null | trac/config.py | wiraqutra/photrackjp | e120cba2a5d5d30f99ad084c6521e61f09694ee6 | [
"BSD-3-Clause"
] | null | null | null | trac/config.py | wiraqutra/photrackjp | e120cba2a5d5d30f99ad084c6521e61f09694ee6 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2005-2009 Edgewall Software
# Copyright (C) 2005-2007 Christopher Lenz <cmlenz@gmx.de>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at... | 38.620879 | 82 | 0.577358 |
4a12e6641e642560f9a8c724ee05ea437c67f5b8 | 32,584 | py | Python | tools/idf_monitor.py | ebertn/esp-idf-nes | 9dc7e9a258fd378d36408a1348253b373974b431 | [
"Apache-2.0"
] | 2 | 2020-06-23T08:05:58.000Z | 2020-06-24T01:25:51.000Z | tools/idf_monitor.py | ebertn/esp-idf-nes | 9dc7e9a258fd378d36408a1348253b373974b431 | [
"Apache-2.0"
] | 2 | 2022-03-29T05:16:50.000Z | 2022-03-29T05:16:50.000Z | vendors/espressif/esp-idf/tools/idf_monitor.py | ictk-solution-dev/amazon-freertos | cc76512292ddfb70bba3030dbcb740ef3c6ead8b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# esp-idf serial output monitor tool. Does some helpful things:
# - Looks up hex addresses in ELF file with addr2line
# - Reset ESP32 via serial RTS line (Ctrl-T Ctrl-R)
# - Run "make (or idf.py) flash" (Ctrl-T Ctrl-F)
# - Run "make (or idf.py) app-flash" (Ctrl-T Ctrl-A)
# - If gdbstub ou... | 40.679151 | 133 | 0.570894 |
4a12e773efb93bc0f672c84e283ef896ff6b103d | 598 | py | Python | lutin_dollar-generate-form.py | atria-soft/dollar | 63ecc46b10dcfb9e9949bee0765abdb693cbfa3b | [
"Apache-2.0"
] | null | null | null | lutin_dollar-generate-form.py | atria-soft/dollar | 63ecc46b10dcfb9e9949bee0765abdb693cbfa3b | [
"Apache-2.0"
] | null | null | null | lutin_dollar-generate-form.py | atria-soft/dollar | 63ecc46b10dcfb9e9949bee0765abdb693cbfa3b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import realog.debug as debug
import lutin.tools as tools
def get_type():
return "BINARY"
def get_sub_type():
return "TOOL"
def get_desc():
return "Dollar generator of all needed form to have the best text recognition"
def get_licence():
return "APACHE-2"
def get_compagny_type():
return "com... | 16.162162 | 79 | 0.704013 |
4a12e7cc1b654f19cdb5b12868c5b4ccfd304e15 | 5,785 | py | Python | huaweicloud-sdk-as/huaweicloudsdkas/v1/model/list_scaling_policy_execute_logs_response.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2021-11-03T07:54:50.000Z | 2021-11-03T07:54:50.000Z | huaweicloud-sdk-as/huaweicloudsdkas/v1/model/list_scaling_policy_execute_logs_response.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-as/huaweicloudsdkas/v1/model/list_scaling_policy_execute_logs_response.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import pprint
import re
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
class ListScalingPolicyExecuteLogsResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
att... | 30.130208 | 119 | 0.628349 |
4a12e843974c3693781889e1549b5aedf1fcc0ed | 1,483 | py | Python | train_mn.py | Erdene-Ochir0417/DialoGPT | ed7af892c6ecc63beba33010cda4e28b9b0d1aa9 | [
"MIT"
] | null | null | null | train_mn.py | Erdene-Ochir0417/DialoGPT | ed7af892c6ecc63beba33010cda4e28b9b0d1aa9 | [
"MIT"
] | null | null | null | train_mn.py | Erdene-Ochir0417/DialoGPT | ed7af892c6ecc63beba33010cda4e28b9b0d1aa9 | [
"MIT"
] | null | null | null | import subprocess as sp
import os
import sys
PROJECT_FOLDER = "."
MODEL_FOLDER = "./models"
PYTHON_EXE = 'python'
target_folder = "./models/small"
MAX_LEN = 128
data_path = './data/train.tsv'
data_db = f'{data_path[:-4]}.{MAX_LEN}len.db'
train_cmd = 'LSP_train_mn.py'
args = [
'--model_name_or_path', target_folder,
... | 34.488372 | 113 | 0.594066 |
4a12e856f8b1c30408d46bfcfc59e71c78596be0 | 470 | py | Python | vsco-parser.py | gebeto/python | 09c00741d66a171740d15f61c6051bdde828a979 | [
"MIT"
] | 1 | 2021-12-07T01:10:21.000Z | 2021-12-07T01:10:21.000Z | vsco-parser.py | gebeto/python | 09c00741d66a171740d15f61c6051bdde828a979 | [
"MIT"
] | null | null | null | vsco-parser.py | gebeto/python | 09c00741d66a171740d15f61c6051bdde828a979 | [
"MIT"
] | null | null | null | import requests
filters = []
url = "https://camstore.vsco.co/2.1/camstore/ios?app_id=77357429-48A7-4E5A-A2AF-5D8C6175EFFC&app_version=v4.5.6%20%282040%29&device_model=iPhone%205s&email=bboyheadman%40gmail.com&os_version=9.2"
resp = requests.get(url).json()
for each in resp["products"]:
try:
for eacheach in each["pr... | 31.333333 | 195 | 0.714894 |
4a12e98f18c18e6d091e8186fc446780d9f594b0 | 8,905 | py | Python | pdf2word/test.py | hoslo/ocr | 4f78ae7013beb2cab8fb9391ba25ba5e6e78967c | [
"Apache-2.0"
] | 4 | 2019-05-27T10:23:55.000Z | 2020-01-19T10:03:14.000Z | pdf2word/test.py | dun933/ocr | 4f78ae7013beb2cab8fb9391ba25ba5e6e78967c | [
"Apache-2.0"
] | null | null | null | pdf2word/test.py | dun933/ocr | 4f78ae7013beb2cab8fb9391ba25ba5e6e78967c | [
"Apache-2.0"
] | 3 | 2019-08-16T18:24:02.000Z | 2020-05-15T06:35:45.000Z | import os
# from extract_table_1 import extract_table
from pdf2word.pdf_table import generate_table, extract_table
os.environ['CUDA_VISIBLE_DEVICES'] = '-1'
import cv2
import fitz
import pickle
import numpy as np
from io import open
from PIL import Image
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInte... | 34.382239 | 121 | 0.545536 |
4a12eb79f9fff950147c61c2aa182e1fc7f00ff8 | 34,679 | py | Python | KLDD_alpha/layout/layout.py | shihchiehlin1224/Kuo-Lin-Dynamical-Diffraction | 386ad440c0ca6e2bfedc17b2517ce4b95af73c22 | [
"Zlib"
] | 2 | 2019-06-26T07:21:08.000Z | 2019-06-26T07:44:39.000Z | KLDD_alpha/layout/layout.py | tandent1985/Kuo-Lin-Dynamical-Diffraction | 386ad440c0ca6e2bfedc17b2517ce4b95af73c22 | [
"Zlib"
] | null | null | null | KLDD_alpha/layout/layout.py | tandent1985/Kuo-Lin-Dynamical-Diffraction | 386ad440c0ca6e2bfedc17b2517ce4b95af73c22 | [
"Zlib"
] | 1 | 2019-11-01T21:31:45.000Z | 2019-11-01T21:31:45.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'KLDD_layout_n.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
Ma... | 60.947276 | 462 | 0.715592 |
4a12ebaf33afaa389a0ca7c124325c9687bc0570 | 37,501 | py | Python | venv/lib/python3.8/site-packages/pip/_vendor/msgpack/fallback.py | realxwx/leetcode-solve | 3a7d7d8e92a5fd5fecc347d141a1c532b92e763e | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.8/site-packages/pip/_vendor/msgpack/fallback.py | realxwx/leetcode-solve | 3a7d7d8e92a5fd5fecc347d141a1c532b92e763e | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.8/site-packages/pip/_vendor/msgpack/fallback.py | realxwx/leetcode-solve | 3a7d7d8e92a5fd5fecc347d141a1c532b92e763e | [
"Apache-2.0"
] | null | null | null | """Fallback pure Python implementation of msgpack"""
# Copyright (c) 2020
# Author: xiaoweixiang
import sys
import struct
import warnings
if sys.version_info[0] == 2:
PY2 = True
int_types = (int, long)
def dict_iteritems(d):
return d.iteritems()
else:
PY2 = False
int_types = int
un... | 36.373424 | 109 | 0.556945 |
4a12ec8adb9be275c8125142b0816a0265ea749b | 6,868 | py | Python | mmseg/datasets/builder.py | hanqiu-hq/mmsegmentation | 29cfcd145c4878480f83ba89249eaca6f8856d92 | [
"Apache-2.0"
] | 11 | 2022-02-04T01:09:45.000Z | 2022-03-08T05:49:16.000Z | mmseg/datasets/builder.py | hanqiu-hq/mmsegmentation | 29cfcd145c4878480f83ba89249eaca6f8856d92 | [
"Apache-2.0"
] | 1 | 2022-01-07T15:03:23.000Z | 2022-01-12T14:39:09.000Z | mmseg/datasets/builder.py | hanqiu-hq/mmsegmentation | 29cfcd145c4878480f83ba89249eaca6f8856d92 | [
"Apache-2.0"
] | 1 | 2022-01-25T05:13:37.000Z | 2022-01-25T05:13:37.000Z | # Copyright (c) OpenMMLab. All rights reserved.
import copy
import platform
import random
from functools import partial
import numpy as np
import torch
from mmcv.parallel import collate
from mmcv.runner import get_dist_info
from mmcv.utils import Registry, build_from_cfg, digit_version
from torch.utils.data import Dat... | 36.338624 | 79 | 0.634974 |
4a12ee1dd3b5a3fb803e200124183bbd491703fc | 90,204 | py | Python | ThirdParty/Twisted/twisted/internet/interfaces.py | jasper-yeh/VtkDotNet | 84b56f781cb511694e4380cebfb245bbefe2560b | [
"BSD-3-Clause"
] | 3 | 2020-06-20T23:31:06.000Z | 2021-01-11T02:17:16.000Z | ThirdParty/Twisted/twisted/internet/interfaces.py | jasper-yeh/VtkDotNet | 84b56f781cb511694e4380cebfb245bbefe2560b | [
"BSD-3-Clause"
] | null | null | null | ThirdParty/Twisted/twisted/internet/interfaces.py | jasper-yeh/VtkDotNet | 84b56f781cb511694e4380cebfb245bbefe2560b | [
"BSD-3-Clause"
] | 1 | 2019-08-30T08:41:21.000Z | 2019-08-30T08:41:21.000Z | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Interface documentation.
Maintainer: Itamar Shtull-Trauring
"""
from __future__ import division, absolute_import
from zope.interface import Interface, Attribute
from twisted.python import deprecate
from twisted.python.versions import Versi... | 33.483296 | 97 | 0.630116 |
4a12eea9db939e3ddcee6e8980de25d79a2d0459 | 754 | py | Python | scripts/airflow/dags/replicator_transfer_flow.py | CityofToronto/bdit_move_etl | ca3aa7c4d543ddd304a19a3620a570d123e5817b | [
"MIT"
] | null | null | null | scripts/airflow/dags/replicator_transfer_flow.py | CityofToronto/bdit_move_etl | ca3aa7c4d543ddd304a19a3620a570d123e5817b | [
"MIT"
] | 2 | 2021-10-01T14:37:47.000Z | 2022-03-11T17:11:27.000Z | scripts/airflow/dags/replicator_transfer_flow.py | CityofToronto/bdit_move_etl | ca3aa7c4d543ddd304a19a3620a570d123e5817b | [
"MIT"
] | null | null | null | """
replicator_transfer_flow
Completes replication of FLOW data by loading it from `/data/replicator/flashcrow-FLOW`
into the database.
This is intended to run after `replicator` copies FLOW data from the City intranet to
`/data/replicator/flashcrow-FLOW`.
"""
# pylint: disable=pointless-statement
from datetime impor... | 29 | 87 | 0.801061 |
4a12eecff400acda2815e2e1df395d7e9ee3d0f8 | 747 | py | Python | tests/test_installation.py | abhishek-kumar-code/redfishtool_nsfcac | 928edbf2c9c3ebfd6cb4722a2a77b1e63372211c | [
"MIT"
] | 8,477 | 2016-05-19T08:57:19.000Z | 2020-08-12T11:08:08.000Z | tests/test_installation.py | abhishek-kumar-code/redfishtool_nsfcac | 928edbf2c9c3ebfd6cb4722a2a77b1e63372211c | [
"MIT"
] | 130 | 2016-05-19T13:38:05.000Z | 2020-08-12T07:39:26.000Z | tests/test_installation.py | abhishek-kumar-code/redfishtool_nsfcac | 928edbf2c9c3ebfd6cb4722a2a77b1e63372211c | [
"MIT"
] | 360 | 2016-05-19T14:36:20.000Z | 2020-07-30T21:55:56.000Z | """Test if http-prompt is installed correctly."""
import subprocess
import pytest
from subprocess import PIPE
from .utils import get_http_prompt_path
from http_prompt import __version__
def run_http_prompt(args):
"""Run http-prompt from terminal."""
bin_path = get_http_prompt_path()
p = subprocess.Pop... | 22.636364 | 68 | 0.702811 |
4a12effb4ca6657563f4a701ddf5158e9ce1ac92 | 2,532 | py | Python | sabnzbd/utils/upload.py | pl77/sabnzbd | 7e87a0c759944966ce7318134d8ed89b569ae73f | [
"0BSD",
"PSF-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause"
] | null | null | null | sabnzbd/utils/upload.py | pl77/sabnzbd | 7e87a0c759944966ce7318134d8ed89b569ae73f | [
"0BSD",
"PSF-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause"
] | null | null | null | sabnzbd/utils/upload.py | pl77/sabnzbd | 7e87a0c759944966ce7318134d8ed89b569ae73f | [
"0BSD",
"PSF-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python3 -OO
# Copyright 2009-2019 The SABnzbd-Team <team@sabnzbd.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any late... | 37.235294 | 84 | 0.67733 |
4a12f004ba24f22ba767fdb7ec3aadadda6e26a1 | 3,276 | py | Python | examples/daal4py/decision_forest_regression_hist_batch.py | a-vasenin/scikit-learn-intelex | b81f81098a7f9302c6a052a5d22ecd372682844d | [
"Apache-2.0"
] | null | null | null | examples/daal4py/decision_forest_regression_hist_batch.py | a-vasenin/scikit-learn-intelex | b81f81098a7f9302c6a052a5d22ecd372682844d | [
"Apache-2.0"
] | null | null | null | examples/daal4py/decision_forest_regression_hist_batch.py | a-vasenin/scikit-learn-intelex | b81f81098a7f9302c6a052a5d22ecd372682844d | [
"Apache-2.0"
] | null | null | null | #===============================================================================
# Copyright 2021-2022 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.apa... | 39.46988 | 90 | 0.682845 |
4a12f07122f944eaeb388cf89750e0805cf37043 | 547 | py | Python | modelbased-rl/MBPO/ED2-MBPO/setup.py | TJU-DRL-LAB/ai-optimizer | f558cc524c66460913989519779873b371bf78bc | [
"MIT"
] | null | null | null | modelbased-rl/MBPO/ED2-MBPO/setup.py | TJU-DRL-LAB/ai-optimizer | f558cc524c66460913989519779873b371bf78bc | [
"MIT"
] | null | null | null | modelbased-rl/MBPO/ED2-MBPO/setup.py | TJU-DRL-LAB/ai-optimizer | f558cc524c66460913989519779873b371bf78bc | [
"MIT"
] | null | null | null | from distutils.core import setup
from setuptools import find_packages
setup(
name='ed2-mbpo',
packages=find_packages(),
version='0.0.1',
description='ED2-Model-based policy optimization',
long_description=open('README.md').read(),
author='XXX',
author_email='XXX',
url='XXX',
entry_p... | 23.782609 | 61 | 0.634369 |
4a12f14233500b169b73d29dd7ca8f78ba2e8242 | 4,796 | py | Python | AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_hash.py | CEOALT1/RefindPlusUDK | 116b957ad735f96fbb6d80a0ba582046960ba164 | [
"BSD-2-Clause"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_hash.py | CEOALT1/RefindPlusUDK | 116b957ad735f96fbb6d80a0ba582046960ba164 | [
"BSD-2-Clause"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_hash.py | CEOALT1/RefindPlusUDK | 116b957ad735f96fbb6d80a0ba582046960ba164 | [
"BSD-2-Clause"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | # test the invariant that
# iff a==b then hash(a)==hash(b)
#
# Also test that hash implementations are inherited as expected
import unittest
from test import test_support
from collections import Hashable
class HashEqualityTestCase(unittest.TestCase):
def same_hash(self, *objlist):
# Hash ... | 33.075862 | 70 | 0.590909 |
4a12f17ba3aa8f24c96b74caa5c34a1af5dd0eef | 742 | py | Python | vote/migrations/0002_auto_20180323_0639.py | RohanDukare/OnlineVoting | e1c355fab0fdd21cc63c4be9e16fc55731479f17 | [
"MIT"
] | 7 | 2019-05-17T06:12:57.000Z | 2021-02-07T03:48:57.000Z | vote/migrations/0002_auto_20180323_0639.py | RohanDukare/OnlineVoting | e1c355fab0fdd21cc63c4be9e16fc55731479f17 | [
"MIT"
] | null | null | null | vote/migrations/0002_auto_20180323_0639.py | RohanDukare/OnlineVoting | e1c355fab0fdd21cc63c4be9e16fc55731479f17 | [
"MIT"
] | 5 | 2019-05-17T06:13:10.000Z | 2021-02-07T03:49:21.000Z | # Generated by Django 2.0.3 on 2018-03-23 01:09
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('Registration', '0002_auto_20180323_0628'),
('vote', '0001_initial'),
]
operations = [
migrations.Ad... | 26.5 | 121 | 0.601078 |
4a12f26f8d02b74fb1d2a059cf1b1315bae5ec73 | 892 | py | Python | examples/pressure_calc.py | NathanERa/atoMEC | 309eb632b48c638ff30cc7c82fea2f46463480a9 | [
"BSD-3-Clause"
] | null | null | null | examples/pressure_calc.py | NathanERa/atoMEC | 309eb632b48c638ff30cc7c82fea2f46463480a9 | [
"BSD-3-Clause"
] | null | null | null | examples/pressure_calc.py | NathanERa/atoMEC | 309eb632b48c638ff30cc7c82fea2f46463480a9 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
"""
Computes the pressure using finite-differences for Beryllium
"""
from atoMEC import Atom, models, config
# use all cores
config.numcores = -1
atom_species = "Be" # helium
r_s = 2.35 # Wigner-Seitz radius of room-temp Be
temperature = 25 # temperature in eV
# initialize the atom object
... | 27.875 | 76 | 0.751121 |
4a12f3260e322d58c07691508863df971a6a7d5c | 141 | py | Python | dd_1/Part 1/Section 09 - Modules, Packages and Namespaces/08 - structuring_package_imports/common/validators/boolean.py | Rebell-Leader/bg | 616a40286fe1d34db2916762c477676ed8067cdb | [
"Apache-2.0"
] | 3,266 | 2017-08-06T16:51:46.000Z | 2022-03-30T07:34:24.000Z | python-tuts/0-beginner/8-Modules_Packages_Namespaces/08 - Pkg Imports/common/validators/boolean.py | Kemal321/Artificial-Intelligence-Deep-Learning-Machine-Learning-Tutorials | 0e7bad7ac30f4ceda3a78cd49f76bd6035982972 | [
"Apache-2.0"
] | 150 | 2017-08-28T14:59:36.000Z | 2022-03-11T23:21:35.000Z | python-tuts/0-beginner/8-Modules_Packages_Namespaces/08 - Pkg Imports/common/validators/boolean.py | Kemal321/Artificial-Intelligence-Deep-Learning-Machine-Learning-Tutorials | 0e7bad7ac30f4ceda3a78cd49f76bd6035982972 | [
"Apache-2.0"
] | 1,449 | 2017-08-06T17:40:59.000Z | 2022-03-31T12:03:24.000Z | # boolean.py
__all__ = ['is_boolean']
def is_boolean(arg):
pass
def boolean_helper_1():
pass
def boolean_helper_2():
pass
| 8.8125 | 24 | 0.652482 |
4a12f3ad6a0ae8ea56ed8961aae41e1e7e9bf1f0 | 3,590 | py | Python | src/practice-useless/contour.py | yogendra-yatnalkar/Diabetic_Retinopathy_Detection | 61220d9548a49e919ee4e0317eec9f7b874b3802 | [
"MIT"
] | 9 | 2020-05-23T16:54:07.000Z | 2022-02-17T17:48:04.000Z | src/practice-useless/contour.py | yogendra-yatnalkar/Diabetic_Retinopathy_Detection | 61220d9548a49e919ee4e0317eec9f7b874b3802 | [
"MIT"
] | 13 | 2020-09-25T22:13:11.000Z | 2022-03-12T00:31:01.000Z | src/practice-useless/contour.py | yogendra-yatnalkar/Diabetic_Retinopathy_Detection | 61220d9548a49e919ee4e0317eec9f7b874b3802 | [
"MIT"
] | 2 | 2021-05-01T05:57:24.000Z | 2022-03-16T08:16:04.000Z | # Listing all the imports
import cv2
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import os
import time
import imutils
import math
# image_name = input("Enter the name of image to be processed : ")
image = cv2.imread('4.png')
image = imutils.resize(image, height = 520, width = 400)
# imag... | 26.992481 | 126 | 0.652368 |
4a12f3fefbc6804255ff56e8a6b115a08af63eae | 3,113 | py | Python | Loan-Defaulters/code.py | nicsquality/ga-learner-dsmp-repo | eb7bd8fae2525dd00d2caae4b87cd2f6e165c148 | [
"MIT"
] | null | null | null | Loan-Defaulters/code.py | nicsquality/ga-learner-dsmp-repo | eb7bd8fae2525dd00d2caae4b87cd2f6e165c148 | [
"MIT"
] | null | null | null | Loan-Defaulters/code.py | nicsquality/ga-learner-dsmp-repo | eb7bd8fae2525dd00d2caae4b87cd2f6e165c148 | [
"MIT"
] | null | null | null | # --------------
#Importing header files
import pandas as pd
from sklearn.model_selection import train_test_split
# Code starts here
data = pd.read_csv(path)
X = data.drop(columns = ['customer.id', 'paid.back.loan'])
y = data.iloc[:, -1]
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.3, ra... | 21.176871 | 175 | 0.697398 |
4a12f41c2dde811ec5b4e7de095295c9e25463c1 | 1,338 | py | Python | dfvfs/volume/gpt_volume_system.py | DianaYejiKang/dfVFS_ubi | a2d5c0ca2d475336d338a2af5cddcac46e703ca2 | [
"Apache-2.0"
] | 7 | 2015-02-28T17:46:25.000Z | 2022-01-18T22:56:53.000Z | dfvfs/volume/gpt_volume_system.py | DianaYejiKang/dfVFS_ubi | a2d5c0ca2d475336d338a2af5cddcac46e703ca2 | [
"Apache-2.0"
] | null | null | null | dfvfs/volume/gpt_volume_system.py | DianaYejiKang/dfVFS_ubi | a2d5c0ca2d475336d338a2af5cddcac46e703ca2 | [
"Apache-2.0"
] | 2 | 2019-08-28T23:47:08.000Z | 2021-07-23T07:15:11.000Z | # -*- coding: utf-8 -*-
"""The GUID Partition Table (GPT) volume system."""
from dfvfs.lib import definitions
from dfvfs.volume import volume_system
class GPTVolume(volume_system.Volume):
"""Volume that uses pyvsgpt."""
def __init__(self, file_entry):
"""Initializes a GPT volume.
Args:
file_entry... | 28.468085 | 63 | 0.735426 |
4a12f43a7c6b00e491ed9ab507efeba111376dfb | 3,914 | py | Python | analysis/explore_data.py | rhwhite/eventTracking | a9498cf56a4d82259c47555b7e5fae2f7c8a0b16 | [
"MIT"
] | 1 | 2017-11-28T02:35:01.000Z | 2017-11-28T02:35:01.000Z | analysis/explore_data.py | rhwhite/eventTracking | a9498cf56a4d82259c47555b7e5fae2f7c8a0b16 | [
"MIT"
] | null | null | null | analysis/explore_data.py | rhwhite/eventTracking | a9498cf56a4d82259c47555b7e5fae2f7c8a0b16 | [
"MIT"
] | 2 | 2019-07-02T02:42:00.000Z | 2020-07-28T05:56:45.000Z | """
This script opens up precipitation event data files with python debugging set up so that the data
files can be explored in real time
Author: Rachel White, rachel.white@cantab.net
"""
import os, errno
import numpy as np
import netCDF4
from netCDF4 import Dataset
import datetime as dt
import re
import sys
import Ng... | 30.818898 | 158 | 0.71487 |
4a12f5b40447be6c58321441688334735856a028 | 15,920 | py | Python | nnvm/python/nnvm/compiler/build_module.py | CortexFoundation/tvm-cvm | d8941dc60a51dd27a6d2accc1eff2eced3b3640d | [
"Apache-2.0"
] | 6 | 2019-07-04T09:42:53.000Z | 2021-12-28T13:19:48.000Z | nnvm/python/nnvm/compiler/build_module.py | CortexFoundation/tvm-cvm | d8941dc60a51dd27a6d2accc1eff2eced3b3640d | [
"Apache-2.0"
] | 4 | 2019-06-27T08:05:18.000Z | 2021-09-09T18:59:11.000Z | nnvm/python/nnvm/compiler/build_module.py | CortexFoundation/tvm-cvm | d8941dc60a51dd27a6d2accc1eff2eced3b3640d | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 33.445378 | 96 | 0.640829 |
4a12f632772c1cb2a20b821c956fe9f410cc552c | 2,999 | py | Python | .history/classes/Handler_20171106214758.py | reecebenson/DADSA-Tennis-PartA | d0763f819b300fcd0ce27041f5bc4ef0519c00bf | [
"MIT"
] | null | null | null | .history/classes/Handler_20171106214758.py | reecebenson/DADSA-Tennis-PartA | d0763f819b300fcd0ce27041f5bc4ef0519c00bf | [
"MIT"
] | null | null | null | .history/classes/Handler_20171106214758.py | reecebenson/DADSA-Tennis-PartA | d0763f819b300fcd0ce27041f5bc4ef0519c00bf | [
"MIT"
] | null | null | null | # DADSA - Assignment 1
# Reece Benson
import json
from classes import Player as Player
from classes import Season as Season
from classes import Tournament as Tournament
from classes import Round as Round
from classes import Match as Match
class Handler():
# Define the variables we will be using
app = None
... | 35.702381 | 93 | 0.57986 |
4a12f6efcc245c94ed2cfb420684e305beb07bf0 | 871 | py | Python | ut_engine/preprocessed/getdata.py | justpic/ut_ali | 5173011c735cdbd4b1cb9becad3b69675993225a | [
"MIT"
] | 1 | 2021-07-08T01:30:07.000Z | 2021-07-08T01:30:07.000Z | ut_engine/preprocessed/getdata.py | justpic/ut_ali | 5173011c735cdbd4b1cb9becad3b69675993225a | [
"MIT"
] | null | null | null | ut_engine/preprocessed/getdata.py | justpic/ut_ali | 5173011c735cdbd4b1cb9becad3b69675993225a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
import csv
reader=csv.reader(open('t_alibaba_data.csv'))
data=[]
reader.next()
for usrid,brandid,dtype,date in reader:
datestr=date.decode('gb2312')
print datestr
splitdate=datestr.split(u'\u6708')
print int(splitdate[0])
data.append((usrid,brandid,dtype,date... | 26.393939 | 72 | 0.67853 |
4a12f7d2711fee362e3882a6c43fbadd9648348e | 3,287 | py | Python | sentiment.py | GitHubEmploy/StockSentiment | 2202a23c0efc1bc23164857b1103f2f67173abd3 | [
"BSD-3-Clause"
] | 3 | 2020-12-26T08:46:12.000Z | 2021-02-03T01:55:05.000Z | sentiment.py | GitHubEmploy/StockSentiment | 2202a23c0efc1bc23164857b1103f2f67173abd3 | [
"BSD-3-Clause"
] | null | null | null | sentiment.py | GitHubEmploy/StockSentiment | 2202a23c0efc1bc23164857b1103f2f67173abd3 | [
"BSD-3-Clause"
] | 1 | 2021-05-26T03:26:11.000Z | 2021-05-26T03:26:11.000Z | #IMPORTING DEPENDENCIES
print('Importing Flair/Torch...')
import flair
import torch
from flair.data import Sentence
print('Importing WSS(s)...')
from newsapi import NewsApiClient
import alpaca_trade_api as tradeapi
#DONE IMPORTING DEPENDENCIES
#SET RUN DEVICE AS CPU
flair.device = torch.device('cpu')
#STATING POLYGO... | 34.968085 | 106 | 0.658655 |
4a12f8f6eaf8024ccbc158cd8f29d22aaa043b7d | 462 | py | Python | mayan/apps/rest_api/urls.py | garrans/mayan-edms | e95e90cc47447a1ae72629271652824aa9868572 | [
"Apache-2.0"
] | 1 | 2020-07-15T02:56:02.000Z | 2020-07-15T02:56:02.000Z | mayan/apps/rest_api/urls.py | kyper999/mayan-edms | ca7b8301a1f68548e8e718d42a728a500d67286e | [
"Apache-2.0"
] | null | null | null | mayan/apps/rest_api/urls.py | kyper999/mayan-edms | ca7b8301a1f68548e8e718d42a728a500d67286e | [
"Apache-2.0"
] | 2 | 2020-02-24T21:02:31.000Z | 2021-01-05T23:52:01.000Z | from __future__ import unicode_literals
from django.conf.urls import patterns, url
from .views import APIBase, APIAppView, BrowseableObtainAuthToken
urlpatterns = patterns(
'',
)
api_urls = patterns(
'',
url(r'^$', APIBase.as_view(), name='api_root'),
url(r'^api/(?P<path>.*)/?$', APIAppView.as_view... | 22 | 71 | 0.660173 |
4a12fa539b985c7de1b25f22e30c8e1582a544c3 | 978 | py | Python | 2020/8/8.py | jeremy-quicklearner/advent-of-code | a87541fda41326b47498bc7e5134515a8793d896 | [
"MIT"
] | null | null | null | 2020/8/8.py | jeremy-quicklearner/advent-of-code | a87541fda41326b47498bc7e5134515a8793d896 | [
"MIT"
] | null | null | null | 2020/8/8.py | jeremy-quicklearner/advent-of-code | a87541fda41326b47498bc7e5134515a8793d896 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
with open('cs.txt') as fh:
lines = fh.readlines()
def run(prog):
visited = {}
acc = 0
pc = 0
while pc not in visited:
if pc == len(prog):
print('Terminates with acc ' + str(acc))
return True
visited[pc] = 1
opcode, arg = prog[pc... | 19.176471 | 52 | 0.45501 |
4a12fa9937f780170972260008bc5cd65719cb77 | 777 | py | Python | launcher/__main__.py | mfahdaz/TVB-NEST | c16e18f41ff07b33482a55f4a033b8c698051c9a | [
"Apache-2.0"
] | 2 | 2020-10-21T11:45:19.000Z | 2020-12-01T09:32:53.000Z | launcher/__main__.py | mfahdaz/TVB-NEST | c16e18f41ff07b33482a55f4a033b8c698051c9a | [
"Apache-2.0"
] | 10 | 2020-11-17T09:33:19.000Z | 2022-01-11T17:00:40.000Z | launcher/__main__.py | mfahdaz/TVB-NEST | c16e18f41ff07b33482a55f4a033b8c698051c9a | [
"Apache-2.0"
] | 9 | 2020-11-17T08:52:51.000Z | 2021-12-10T12:25:04.000Z | # ------------------------------------------------------------------------------
# Copyright 2020 Forschungszentrum Jülich GmbH and Aix-Marseille Université
# "Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements; and to You under the Apache License, Version 2.0. "
#
# F... | 37 | 81 | 0.604891 |
4a12fbf4a7b596147ea8820cf23da1c8d1c50e88 | 14,002 | py | Python | cirq-core/cirq/sim/state_vector.py | tw3akslow/Cirq | 0209c6514ba3334b3c82ec2422c59240d1f3af50 | [
"Apache-2.0"
] | 1 | 2021-07-20T16:23:45.000Z | 2021-07-20T16:23:45.000Z | cirq-core/cirq/sim/state_vector.py | xeedmm/Cirq | dc013726c9472d39bc2a3909208e188fb535e081 | [
"Apache-2.0"
] | null | null | null | cirq-core/cirq/sim/state_vector.py | xeedmm/Cirq | dc013726c9472d39bc2a3909208e188fb535e081 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The Cirq Developers
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 40.120344 | 97 | 0.626482 |
4a12fbf7809aadc3c133fa7c51c40de0042c48e3 | 562 | py | Python | Hansen API Server 2.0/photos/Hansen Photo Geter.py | YuzeLuo/Picture-API-Server | d0f1e06673e07646d877c40e0c45d7ba4d2a4536 | [
"CC0-1.0"
] | 1 | 2021-08-28T07:50:39.000Z | 2021-08-28T07:50:39.000Z | Hansen API Server 2.0/photos/Hansen Photo Geter.py | YuzeLuo/Picture-API-Server | d0f1e06673e07646d877c40e0c45d7ba4d2a4536 | [
"CC0-1.0"
] | 3 | 2021-08-28T07:35:48.000Z | 2021-08-28T07:45:04.000Z | Hansen API Server 2.0/photos/Hansen Photo Geter.py | YuzeLuo/Picture-API-Server | d0f1e06673e07646d877c40e0c45d7ba4d2a4536 | [
"CC0-1.0"
] | null | null | null | import requests
from random import randint as rd
a=0
n=int(input("Enter the number:"))
api_list=["http://www.dmoe.cc/random.php","https://api.ixiaowai.cn/api/api.php","https://api.ixiaowai.cn/mcapi/mcapi.php","https://acg.yanwz.cn/wallpaper/api.php","https://acg.yanwz.cn/api.php"]
for i in range(n):
try:
... | 28.1 | 195 | 0.587189 |
4a12fcf3d6aa849b67c15c08a2ced1dfaa6ea018 | 9,265 | py | Python | parlai/tasks/bot_adversarial_dialogue/agents.py | zl930216/ParlAI | abf0ad6d1779af0f8ce0b5aed00d2bab71416684 | [
"MIT"
] | 1 | 2021-04-25T10:02:11.000Z | 2021-04-25T10:02:11.000Z | parlai/tasks/bot_adversarial_dialogue/agents.py | zl930216/ParlAI | abf0ad6d1779af0f8ce0b5aed00d2bab71416684 | [
"MIT"
] | 1 | 2020-11-12T02:20:02.000Z | 2020-11-12T02:20:02.000Z | parlai/tasks/bot_adversarial_dialogue/agents.py | zl930216/ParlAI | abf0ad6d1779af0f8ce0b5aed00d2bab71416684 | [
"MIT"
] | 1 | 2020-09-05T20:25:13.000Z | 2020-09-05T20:25:13.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.
from typing import Optional
from parlai.core.params import ParlaiParser
import os
from parlai.core.opt import Opt
from ... | 37.510121 | 106 | 0.549164 |
4a12fd97e2a5df5663f365352e066bc876fd2cc4 | 10,921 | py | Python | sdk/python/pulumi_azure_native/search/v20200801/shared_private_link_resource.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/search/v20200801/shared_private_link_resource.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/search/v20200801/shared_private_link_resource.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 52.253589 | 445 | 0.699753 |
4a12fde1c26e34b1249cc0c03b62129b102c170e | 2,692 | py | Python | homeassistant/components/blueprint/errors.py | rchl/core | 974e099e2a9527d38445531c6d9bc1461ba4c36f | [
"Apache-2.0"
] | 1 | 2020-02-02T05:56:10.000Z | 2020-02-02T05:56:10.000Z | homeassistant/components/blueprint/errors.py | rchl/core | 974e099e2a9527d38445531c6d9bc1461ba4c36f | [
"Apache-2.0"
] | 56 | 2020-08-03T07:30:54.000Z | 2022-03-31T06:02:04.000Z | homeassistant/components/blueprint/errors.py | rchl/core | 974e099e2a9527d38445531c6d9bc1461ba4c36f | [
"Apache-2.0"
] | null | null | null | """Blueprint errors."""
from typing import Any, Iterable
import voluptuous as vol
from voluptuous.humanize import humanize_error
from homeassistant.exceptions import HomeAssistantError
class BlueprintException(HomeAssistantError):
"""Base exception for blueprint errors."""
def __init__(self, domain: str, m... | 30.247191 | 84 | 0.656761 |
4a12fe10da51e846c7ea8a4a958c6ec66c840fd9 | 228 | py | Python | 0x05-python-exceptions/100-safe_print_integer_err.py | JRodriguez9510/holbertonschool-higher_level_programming-2 | 50e788cc0b03de308ed9bc90007dd19edb2efed5 | [
"MIT"
] | 1 | 2021-01-27T03:13:32.000Z | 2021-01-27T03:13:32.000Z | 0x05-python-exceptions/100-safe_print_integer_err.py | JRodriguez9510/holbertonschool-higher_level_programming-2 | 50e788cc0b03de308ed9bc90007dd19edb2efed5 | [
"MIT"
] | null | null | null | 0x05-python-exceptions/100-safe_print_integer_err.py | JRodriguez9510/holbertonschool-higher_level_programming-2 | 50e788cc0b03de308ed9bc90007dd19edb2efed5 | [
"MIT"
] | 2 | 2021-01-09T04:45:30.000Z | 2021-07-13T04:23:47.000Z | #!/usr/bin/python3
import sys
def safe_print_integer_err(value):
try:
print("{:d}".format(value))
return True
except Exception as e:
print("Exception:", e, file=sys.stderr)
return False
| 19 | 47 | 0.609649 |
4a12fe42fe8cea9434b1976e4c9a0465e43fe733 | 166 | py | Python | tests/model_control/detailed/transf_Logit/model_control_one_enabled_Logit_MovingMedian_Seasonal_MonthOfYear_AR.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | tests/model_control/detailed/transf_Logit/model_control_one_enabled_Logit_MovingMedian_Seasonal_MonthOfYear_AR.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | 1 | 2019-11-30T23:39:38.000Z | 2019-12-01T04:34:35.000Z | tests/model_control/detailed/transf_Logit/model_control_one_enabled_Logit_MovingMedian_Seasonal_MonthOfYear_AR.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['Logit'] , ['MovingMedian'] , ['Seasonal_MonthOfYear'] , ['AR'] ); | 41.5 | 88 | 0.759036 |
4a12fe4e27fe9228ac65eb1e6923c1fc96e811ed | 1,721 | py | Python | tests/conftest.py | ThomasLoke/pennylane-lightning | 2eac157abb47413d761a3c89f16b8089833952b9 | [
"Apache-2.0"
] | null | null | null | tests/conftest.py | ThomasLoke/pennylane-lightning | 2eac157abb47413d761a3c89f16b8089833952b9 | [
"Apache-2.0"
] | null | null | null | tests/conftest.py | ThomasLoke/pennylane-lightning | 2eac157abb47413d761a3c89f16b8089833952b9 | [
"Apache-2.0"
] | 1 | 2021-02-25T19:35:20.000Z | 2021-02-25T19:35:20.000Z | # Copyright 2020 Xanadu Quantum Technologies 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 agre... | 27.758065 | 97 | 0.706566 |
4a12fe7d25af0e276a31994422d0107caa450ecf | 1,006 | py | Python | lif_template.py | achilleas-k/brian-scripts | 4d2d8c9a53e7202b60c78716e8b1a9d521293c54 | [
"Apache-2.0"
] | null | null | null | lif_template.py | achilleas-k/brian-scripts | 4d2d8c9a53e7202b60c78716e8b1a9d521293c54 | [
"Apache-2.0"
] | null | null | null | lif_template.py | achilleas-k/brian-scripts | 4d2d8c9a53e7202b60c78716e8b1a9d521293c54 | [
"Apache-2.0"
] | null | null | null | from brian import *
duration = 1*second
N_sims = 1
lif_eq = ['dV/dt = (V_rest-V)/tau_mem : volt']
V_rest = 0*mV
V_reset = 0*mV
V_th = 13*mV
t_refr = 2*ms
tau_mem = 10*msecond
N_in = 10
f_in = 50*Hz
DV_s = 2.5*mV
def inputRate(t):
if t < 500*ms:
return 50*Hz
elif 500*ms <= t < 1000*ms:
return ... | 20.530612 | 66 | 0.66004 |
4a12febd8711353e8f953127360b5c2437beff1e | 943 | py | Python | homeassistant/components/tcp/binary_sensor.py | pancho-villa/home-assistant | ab17b22239452671f14067571f22aadb9688a3de | [
"Apache-2.0"
] | null | null | null | homeassistant/components/tcp/binary_sensor.py | pancho-villa/home-assistant | ab17b22239452671f14067571f22aadb9688a3de | [
"Apache-2.0"
] | null | null | null | homeassistant/components/tcp/binary_sensor.py | pancho-villa/home-assistant | ab17b22239452671f14067571f22aadb9688a3de | [
"Apache-2.0"
] | null | null | null | """
Provides a binary sensor which gets its values from a TCP socket.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/binary_sensor.tcp/
"""
import logging
from homeassistant.components.binary_sensor import BinarySensorDevice
from homeassistant.component... | 29.46875 | 74 | 0.749735 |
4a12ffdc5d3a46f853b15c9b77dd2791d1a2a49f | 650 | py | Python | NumberGuesser.py | WillLio/Minor-Projects | c3ed29f33b71b789fae5f3f72851276c28b83157 | [
"MIT"
] | null | null | null | NumberGuesser.py | WillLio/Minor-Projects | c3ed29f33b71b789fae5f3f72851276c28b83157 | [
"MIT"
] | null | null | null | NumberGuesser.py | WillLio/Minor-Projects | c3ed29f33b71b789fae5f3f72851276c28b83157 | [
"MIT"
] | null | null | null | import random
def randomg(min, max):
r, g = random.randrange(min, max+1), None
while g != r:
print()
g = int(input("Your guess: "))
print()
if g>max or g<min:
print("That is not even in the range.")
elif g>r:
print("Too high, try a lower number.")
elif g<r:
print("Too low, try a hig... | 32.5 | 83 | 0.613846 |
4a1301ac76edab4b7ebde140d5188a9965ce8899 | 5,885 | py | Python | official/vision/beta/projects/volumetric_models/configs/semantic_segmentation_3d.py | NasTul/models | 4fabd84c5c5e2b34a1b95431788f7801de036421 | [
"Apache-2.0"
] | 3 | 2022-03-05T10:46:52.000Z | 2022-03-22T06:00:05.000Z | official/vision/beta/projects/volumetric_models/configs/semantic_segmentation_3d.py | NasTul/models | 4fabd84c5c5e2b34a1b95431788f7801de036421 | [
"Apache-2.0"
] | 4 | 2021-07-17T23:59:03.000Z | 2021-07-21T10:18:14.000Z | official/vision/beta/projects/volumetric_models/configs/semantic_segmentation_3d.py | NasTul/models | 4fabd84c5c5e2b34a1b95431788f7801de036421 | [
"Apache-2.0"
] | 2 | 2021-08-17T22:07:17.000Z | 2021-12-25T12:25:47.000Z | # Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 35.666667 | 80 | 0.690229 |
4a13021ae90f3548c2662672f26fefa5ea87b1fa | 9,162 | py | Python | main.py | phubbard/entropy | bfe619d1bb64e45f3aa30bc1adbbdf4e203723da | [
"Apache-2.0"
] | null | null | null | main.py | phubbard/entropy | bfe619d1bb64e45f3aa30bc1adbbdf4e203723da | [
"Apache-2.0"
] | null | null | null | main.py | phubbard/entropy | bfe619d1bb64e45f3aa30bc1adbbdf4e203723da | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
@author Paul Hubbard
@date 5/7/14
@file main.py
@brief Starting new project for home energy monitoring, using Graphite plus MQTT.
"""
import json
import datetime
import calendar
import time
from ConfigParser import SafeConfigParser
from xml.etree import ElementTree as ET
import logging as l... | 41.457014 | 238 | 0.579568 |
4a1302629932aaf88f7e6e46552bbd387d4517d2 | 437 | py | Python | examples/widgets/label_with_markup.py | Galland/kivy | 95a6bf279883d706f645e4629c16d5ee1038f0ec | [
"MIT"
] | 13,889 | 2015-01-01T06:43:41.000Z | 2022-03-31T17:37:56.000Z | examples/widgets/label_with_markup.py | Galland/kivy | 95a6bf279883d706f645e4629c16d5ee1038f0ec | [
"MIT"
] | 4,570 | 2015-01-01T17:58:52.000Z | 2022-03-31T18:42:16.000Z | examples/widgets/label_with_markup.py | Galland/kivy | 95a6bf279883d706f645e4629c16d5ee1038f0ec | [
"MIT"
] | 3,786 | 2015-01-01T09:20:45.000Z | 2022-03-30T21:15:05.000Z | from kivy.app import App
from kivy.lang import Builder
root = Builder.load_string('''
Label:
text:
('[b]Hello[/b] [color=ff0099]World[/color]\\n'
'[color=ff0099]Hello[/color] [b]World[/b]\\n'
'[b]Hello[/b] [color=ff0099]World[/color]')
markup: True
font_size: '64pt'
''')
class Lab... | 19.863636 | 54 | 0.608696 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.