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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
795d18dd97b03617ff1781f1b67705297cacdf83 | 4,852 | py | Python | GetStarted/03_finding_images.py | mllzl/earthengine-py-notebooks | cade6a81dd4dbbfb1b9b37aaf6955de42226cfc5 | [
"MIT"
] | 1 | 2020-03-26T04:21:15.000Z | 2020-03-26T04:21:15.000Z | GetStarted/03_finding_images.py | mllzl/earthengine-py-notebooks | cade6a81dd4dbbfb1b9b37aaf6955de42226cfc5 | [
"MIT"
] | null | null | null | GetStarted/03_finding_images.py | mllzl/earthengine-py-notebooks | cade6a81dd4dbbfb1b9b37aaf6955de42226cfc5 | [
"MIT"
] | null | null | null | # %%
"""
<table class="ee-notebook-buttons" align="left">
<td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/GetStarted/03_finding_images.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td>
<td><a target=... | 49.010101 | 1,021 | 0.739077 |
795d1914514d98c0ab7016352470643304365384 | 85 | py | Python | transcrypt/development/automated_tests/hello/testlet1.py | JMCanning78/Transcrypt | 8a8dabe831240414fdf1d5027fa2b0d71ab45d05 | [
"Apache-2.0"
] | 1 | 2017-08-11T01:51:51.000Z | 2017-08-11T01:51:51.000Z | transcrypt/development/automated_tests/hello/testlet1.py | JMCanning78/Transcrypt | 8a8dabe831240414fdf1d5027fa2b0d71ab45d05 | [
"Apache-2.0"
] | 2 | 2021-03-11T07:09:19.000Z | 2021-05-12T11:26:23.000Z | transcrypt/development/automated_tests/hello/testlet1.py | JMCanning78/Transcrypt | 8a8dabe831240414fdf1d5027fa2b0d71ab45d05 | [
"Apache-2.0"
] | 1 | 2021-02-07T00:22:12.000Z | 2021-02-07T00:22:12.000Z | def run (autoTester):
autoTester.check ('goodbye')
autoTester.check ('moon')
| 21.25 | 32 | 0.670588 |
795d195cce2d2980e07a0dc16d73f6128a23d18f | 5,123 | py | Python | test/functional/feature_versionbits_warning.py | The-Bitcoin-Phantom/The-bitcoin-Phantom | c914b51924932f07026eb6ba057c6e375e4dcdac | [
"MIT"
] | null | null | null | test/functional/feature_versionbits_warning.py | The-Bitcoin-Phantom/The-bitcoin-Phantom | c914b51924932f07026eb6ba057c6e375e4dcdac | [
"MIT"
] | null | null | null | test/functional/feature_versionbits_warning.py | The-Bitcoin-Phantom/The-bitcoin-Phantom | c914b51924932f07026eb6ba057c6e375e4dcdac | [
"MIT"
] | 1 | 2020-11-04T06:59:19.000Z | 2020-11-04T06:59:19.000Z | #!/usr/bin/env python3
# Copyright (c) 2016-2019 The bitphantom Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test version bits warning system.
Generate chains with block versions that appear to be signalling ... | 48.790476 | 139 | 0.721647 |
795d19ca288b52868ad3ff844374b607413860b7 | 16,703 | py | Python | ax/core/parameter.py | stevemandala/Ax | 8e289a154e3a2ed237bf27ddb90e09963c0d6a97 | [
"MIT"
] | null | null | null | ax/core/parameter.py | stevemandala/Ax | 8e289a154e3a2ed237bf27ddb90e09963c0d6a97 | [
"MIT"
] | null | null | null | ax/core/parameter.py | stevemandala/Ax | 8e289a154e3a2ed237bf27ddb90e09963c0d6a97 | [
"MIT"
] | null | null | null | #!/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 abc import ABCMeta, abstractmethod, abstractproperty
from enum import Enum
from typing import Dict, List, Optional... | 31.694497 | 88 | 0.607556 |
795d19e54a8d88cadbc52a6a58b376d33cb674c8 | 15,982 | py | Python | clearml/automation/auto_scaler.py | mmiller-max/clearml | fd2d6c6f5d46cad3e406e88eeb4d805455b5b3d8 | [
"Apache-2.0"
] | null | null | null | clearml/automation/auto_scaler.py | mmiller-max/clearml | fd2d6c6f5d46cad3e406e88eeb4d805455b5b3d8 | [
"Apache-2.0"
] | null | null | null | clearml/automation/auto_scaler.py | mmiller-max/clearml | fd2d6c6f5d46cad3e406e88eeb4d805455b5b3d8 | [
"Apache-2.0"
] | null | null | null | import re
from collections import defaultdict, deque
from enum import Enum
from itertools import chain
from threading import Event
from time import sleep, time
import attr
from attr.validators import instance_of
from .cloud_driver import CloudDriver
from .. import Task
from ..backend_api import Session
from ..backend... | 41.190722 | 119 | 0.608122 |
795d1ac0dbb8cc96387f3512ee6bebc386f4529c | 697 | py | Python | tests/unit/test_analog.py | atac-bham/pychapter10 | 292f15162d4a637144ab0e64ed7215a4ab4f37df | [
"BSD-3-Clause"
] | 7 | 2021-04-27T12:14:42.000Z | 2021-11-17T08:31:19.000Z | tests/unit/test_analog.py | atac-bham/pychapter10 | 292f15162d4a637144ab0e64ed7215a4ab4f37df | [
"BSD-3-Clause"
] | 26 | 2020-07-20T21:28:57.000Z | 2022-02-17T13:36:03.000Z | tests/unit/test_analog.py | atac-bham/pychapter10 | 292f15162d4a637144ab0e64ed7215a4ab4f37df | [
"BSD-3-Clause"
] | null | null | null |
import pytest
from chapter10 import C10, analog
from fixtures import ANALOG
@pytest.fixture
def packet():
for packet in C10(ANALOG):
if isinstance(packet, analog.AnalogF1):
return packet
def test_csdw(packet):
assert packet.mode == 0
assert packet.length == 8
assert packet.subc... | 19.361111 | 61 | 0.659971 |
795d1b514e7ce6f710b3c0dc4218d18b92aa7d55 | 2,424 | py | Python | LSTM_better_models/rnn_20timesteps_1lstmlayers.py | KaustabhGanguly/Recurrent-Neural-Networks-to-predict-Google-Stock-Price | 0991dad8bbd1c5364a8850ef6e9fd70f23dce30d | [
"MIT"
] | 13 | 2018-11-26T18:34:19.000Z | 2021-03-02T19:39:40.000Z | Deep_Learning_A_Z/Volume 1 - Supervised Deep Learning/Part 3 - Recurrent Neural Networks (RNN)/Section 13 - Evaluating, Improving and Tuning the RNN/Homework_Challenge/rnn_20timesteps_1lstmlayers.py | s10singh97/Deep_Learning | 56891dcab862f9bd512edd8d134c0d800800ad52 | [
"Apache-2.0"
] | null | null | null | Deep_Learning_A_Z/Volume 1 - Supervised Deep Learning/Part 3 - Recurrent Neural Networks (RNN)/Section 13 - Evaluating, Improving and Tuning the RNN/Homework_Challenge/rnn_20timesteps_1lstmlayers.py | s10singh97/Deep_Learning | 56891dcab862f9bd512edd8d134c0d800800ad52 | [
"Apache-2.0"
] | 12 | 2018-09-05T21:30:55.000Z | 2021-10-30T13:58:59.000Z | # Recurrent Neural Network
# Part 1 - Data Preprocessing
# Importing the libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Importing the training set
dataset_train = pd.read_csv('Google_Stock_Price_Train.csv')
training_set = dataset_train.iloc[:,1:2].values
# Feature Scaling
from sk... | 31.894737 | 87 | 0.764851 |
795d1cf95518f022c8e2fed0289da3f052a767c9 | 12,319 | py | Python | cyder/cydns/tests/test_views.py | murrown/cyder | c1c78d4c48fb8f571527fbbe3bf95d98d77fbac4 | [
"BSD-3-Clause"
] | null | null | null | cyder/cydns/tests/test_views.py | murrown/cyder | c1c78d4c48fb8f571527fbbe3bf95d98d77fbac4 | [
"BSD-3-Clause"
] | null | null | null | cyder/cydns/tests/test_views.py | murrown/cyder | c1c78d4c48fb8f571527fbbe3bf95d98d77fbac4 | [
"BSD-3-Clause"
] | null | null | null | from django.test.client import Client
from nose.tools import eq_
from cyder.base.tests import TestCase
from cyder.base.tests.test_views_base import GenericViewTests, format_response
from cyder.core.ctnr.models import Ctnr
from cyder.cydns.address_record.models import AddressRecord
from cyder.cydns.cname.models import... | 31.42602 | 79 | 0.594366 |
795d1f4d6c9a8a77f728ddeccde38c2a4fe23595 | 1,051 | py | Python | migrations/versions/3abe9b7e0a20_posts_table_added.py | gwoak/gw-microblog | 55413172a6a8a12665eb2b8889cda27f76b544e8 | [
"MIT"
] | null | null | null | migrations/versions/3abe9b7e0a20_posts_table_added.py | gwoak/gw-microblog | 55413172a6a8a12665eb2b8889cda27f76b544e8 | [
"MIT"
] | null | null | null | migrations/versions/3abe9b7e0a20_posts_table_added.py | gwoak/gw-microblog | 55413172a6a8a12665eb2b8889cda27f76b544e8 | [
"MIT"
] | null | null | null | """posts table added
Revision ID: 3abe9b7e0a20
Revises: 6c6be1ace116
Create Date: 2021-08-27 14:56:01.631893
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '3abe9b7e0a20'
down_revision = '6c6be1ace116'
branch_labels = None
depends_on = None
def upgrade():
... | 27.657895 | 83 | 0.674596 |
795d1f4fb151dc811a8933ce280846fbf971bd9a | 5,139 | py | Python | tests/test_registry.py | yoshrote/boss | e82ae1e66cb0c56949c4222299437cf6c14d635d | [
"MIT"
] | null | null | null | tests/test_registry.py | yoshrote/boss | e82ae1e66cb0c56949c4222299437cf6c14d635d | [
"MIT"
] | null | null | null | tests/test_registry.py | yoshrote/boss | e82ae1e66cb0c56949c4222299437cf6c14d635d | [
"MIT"
] | 1 | 2018-09-07T10:59:46.000Z | 2018-09-07T10:59:46.000Z | import json
import unittest
from datetime import datetime
import mock
from boss.config import Configurator
from boss.registry import initialize_registry, MemoryRegistry, SQLRegistry
from boss.utils import stringify_datetime
class DummyTask(object):
def __init__(self, name):
self.name = name
class Reg... | 33.809211 | 87 | 0.610041 |
795d20b2d1dd9cb55060af81a48e4f30cc4cedb1 | 1,843 | py | Python | rubberband/handlers/fe/upload.py | ambros-gleixner/rubberband | 72dd935dbc4bed93860fdcaa0cbe752bcbd6e395 | [
"MIT"
] | 4 | 2018-03-25T15:01:20.000Z | 2020-06-22T14:34:01.000Z | rubberband/handlers/fe/upload.py | ambros-gleixner/rubberband | 72dd935dbc4bed93860fdcaa0cbe752bcbd6e395 | [
"MIT"
] | 41 | 2016-12-19T21:17:41.000Z | 2021-12-13T19:50:34.000Z | rubberband/handlers/fe/upload.py | ambros-gleixner/rubberband | 72dd935dbc4bed93860fdcaa0cbe752bcbd6e395 | [
"MIT"
] | 1 | 2017-10-06T13:52:57.000Z | 2017-10-06T13:52:57.000Z | """Contains UploadView."""
from rubberband.utils import ResultClient, write_file
from rubberband.utils.importer import bundle_files
from .base import BaseHandler
class UploadView(BaseHandler):
"""Request handler handling the upload form."""
def get(self):
"""
Answer to GET requests.
... | 31.775862 | 91 | 0.591427 |
795d20f96ac9b83070b7eaaea10c4f388b5d5c00 | 92,286 | py | Python | django/contrib/admin/options.py | imjvdn/scratch-game-1 | 5dffd79f17e0b66d3d2e57262749311aca28e850 | [
"PSF-2.0",
"BSD-3-Clause"
] | 15 | 2020-06-04T05:22:47.000Z | 2021-07-06T01:37:57.000Z | django/contrib/admin/options.py | imjvdn/scratch-game-1 | 5dffd79f17e0b66d3d2e57262749311aca28e850 | [
"PSF-2.0",
"BSD-3-Clause"
] | 51 | 2019-10-08T01:53:02.000Z | 2021-06-04T22:02:21.000Z | django/contrib/admin/options.py | imjvdn/scratch-game-1 | 5dffd79f17e0b66d3d2e57262749311aca28e850 | [
"PSF-2.0",
"BSD-3-Clause"
] | 8 | 2020-04-11T08:30:44.000Z | 2020-05-30T03:26:13.000Z | import copy
import json
import operator
import re
from functools import partial, reduce, update_wrapper
from urllib.parse import quote as urlquote
from django import forms
from django.conf import settings
from django.contrib import messages
from django.contrib.admin import helpers, widgets
from django.contrib.admin.ch... | 42.274851 | 118 | 0.61771 |
795d20fa0ef25ea90af3b3e0e8377aa0f4b8bff2 | 448 | py | Python | Python/rating_problems.py | mimseyedi/Kattis | a99ea2112544e89cc466feb7d81ffe6eb017f7e2 | [
"MIT"
] | null | null | null | Python/rating_problems.py | mimseyedi/Kattis | a99ea2112544e89cc466feb7d81ffe6eb017f7e2 | [
"MIT"
] | null | null | null | Python/rating_problems.py | mimseyedi/Kattis | a99ea2112544e89cc466feb7d81ffe6eb017f7e2 | [
"MIT"
] | null | null | null | judges, pJudges = map(int, input().split())
invisPoint = judges - pJudges
maxList = list()
minList = list()
for i in range(pJudges):
point = int(input())
maxList.append(point)
minList.append(point)
if invisPoint != 0:
for j in range(invisPoint):
maxList.append(3)
minList.append(-3)
ma... | 17.92 | 43 | 0.613839 |
795d220fd17bd7754605e2b13d16386844876e10 | 8,933 | py | Python | FileHeaders.py | an-prata/TimeBasedVerification | 6b1599d935533bbfd2e665f85eb1fd5c7ca11c4b | [
"MIT"
] | 2 | 2022-02-12T19:40:37.000Z | 2022-02-12T19:40:39.000Z | FileHeaders.py | an-prata/TimeBasedVerification | 6b1599d935533bbfd2e665f85eb1fd5c7ca11c4b | [
"MIT"
] | 1 | 2022-02-04T19:39:35.000Z | 2022-02-04T23:55:04.000Z | FileHeaders.py | an-prata/TimeBasedVerification | 6b1599d935533bbfd2e665f85eb1fd5c7ca11c4b | [
"MIT"
] | null | null | null | # (c) Evan Overman (https://github.com/an-prata)
# FileHeaders (https://github.com/an-prata/FileHeaders)
# Licensed under the MIT License
import os
import sys
import argparse
HEADER_START_TAG = '>>>HEADER_START<<<'
HEADER_END_TAG = '>>>HEADER_END<<<'
FOOTER_START_TAG = '>>>FOOTER_START<<<'
FOOTER_END_TAG = '>>>... | 36.913223 | 150 | 0.719691 |
795d222611124837611341662096b467efb8fc5e | 394 | py | Python | backend/users/migrations/0002_auto_20220123_1007.py | crowdbotics-apps/techtest-33095 | a9a42ab1c5eb390190d4e7980a578f7fb5c9bbd1 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/users/migrations/0002_auto_20220123_1007.py | crowdbotics-apps/techtest-33095 | a9a42ab1c5eb390190d4e7980a578f7fb5c9bbd1 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/users/migrations/0002_auto_20220123_1007.py | crowdbotics-apps/techtest-33095 | a9a42ab1c5eb390190d4e7980a578f7fb5c9bbd1 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | # Generated by Django 2.2.26 on 2022-01-23 10:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='user',
name='name',
field=... | 20.736842 | 74 | 0.591371 |
795d224aca6fa30181d044786fdc075460e9e2cc | 727 | py | Python | Algo and DSA/LeetCode-Solutions-master/Python/reverse-bits.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 3,269 | 2018-10-12T01:29:40.000Z | 2022-03-31T17:58:41.000Z | Algo and DSA/LeetCode-Solutions-master/Python/reverse-bits.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 53 | 2018-12-16T22:54:20.000Z | 2022-02-25T08:31:20.000Z | Algo and DSA/LeetCode-Solutions-master/Python/reverse-bits.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 1,236 | 2018-10-12T02:51:40.000Z | 2022-03-30T13:30:37.000Z | # Time : O(32)
# Space: O(1)
class Solution(object):
# @param n, an integer
# @return an integer
def reverseBits(self, n):
n = (n >> 16) | (n << 16)
n = ((n & 0xff00ff00) >> 8) | ((n & 0x00ff00ff) << 8)
n = ((n & 0xf0f0f0f0) >> 4) | ((n & 0x0f0f0f0f) << 4)
n = ((n & 0xcccccc... | 25.068966 | 61 | 0.459422 |
795d22750dc5daa6e9f92b86ce4d6f0cab58f221 | 6,803 | py | Python | main.py | zidik/AnimalView | 2dfaa34645247fd9e0e5d4ed33ac911d7c0870da | [
"MIT"
] | null | null | null | main.py | zidik/AnimalView | 2dfaa34645247fd9e0e5d4ed33ac911d7c0870da | [
"MIT"
] | null | null | null | main.py | zidik/AnimalView | 2dfaa34645247fd9e0e5d4ed33ac911d7c0870da | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Created on 21.09.2013
@author: Mark
'''
import time
import numpy as np
import cv2
DEBUG = True
class OpenCVWindow(object):
"""
Klass mis hõlmab endas ühe OpenCV nimelise akna avamist, sulgemist ning sellel pildi näitamist
"""
def __init__(self, name, fullscreen = False... | 38.219101 | 159 | 0.599 |
795d227bc7e49fcc65e082570c597d4a306cab05 | 8,197 | py | Python | functions/duplicator.py | UNCOMN-Open-Source/cheyenne | 5e8cdf156148bd160d1d353eac329b0eec7dc5f7 | [
"MIT"
] | 5 | 2021-10-29T20:10:12.000Z | 2022-03-22T18:05:53.000Z | functions/duplicator.py | UNCOMN-Open-Source/cheyenne | 5e8cdf156148bd160d1d353eac329b0eec7dc5f7 | [
"MIT"
] | null | null | null | functions/duplicator.py | UNCOMN-Open-Source/cheyenne | 5e8cdf156148bd160d1d353eac329b0eec7dc5f7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
'''
#
# Duplicator function - receives events from the Ingest function (via SQS) and copies objects into the Cheyenne Vault.
#
# Project Cheyenne
#
# @author Damian Bushong <dbushong@uncomn.com>
# @copyright (c) 2021 UNCOMN LLC.
# @license MIT License
#
'''
from datetime import datetime, timezon... | 39.033333 | 132 | 0.601318 |
795d24df69579bacd0bcadfba68a656087b5a85d | 5,033 | py | Python | src/api/handlers/job.py | agu3rra/InfraBox | a814e83bfc4d31292b578b2a54b27d70eafc787f | [
"Apache-2.0"
] | 265 | 2018-04-20T21:09:06.000Z | 2022-02-20T19:58:02.000Z | src/api/handlers/job.py | agu3rra/InfraBox | a814e83bfc4d31292b578b2a54b27d70eafc787f | [
"Apache-2.0"
] | 295 | 2018-04-23T08:53:18.000Z | 2022-03-25T07:05:11.000Z | src/api/handlers/job.py | agu3rra/InfraBox | a814e83bfc4d31292b578b2a54b27d70eafc787f | [
"Apache-2.0"
] | 75 | 2018-05-14T07:56:35.000Z | 2022-03-26T09:37:29.000Z | #pylint: disable=unused-argument
from flask import g, jsonify, abort, send_file
from flask_restx import Resource, fields
from pyinfraboxutils.ibflask import check_job_belongs_to_project
from pyinfraboxutils.ibrestplus import api
from pyinfraboxutils.storage import storage
ns = api.namespace('Jobs',
... | 30.689024 | 86 | 0.536857 |
795d24e24ab792201ed495a140af063a71fb4511 | 15,143 | py | Python | syreExport/syre_AnsysMaxwell/sim_xdeg_AM_customI.py | SyR-e/syre_public | 4f0e30aac2ee75817b5b46865af43f9f2fd54a48 | [
"Apache-2.0"
] | 2 | 2021-02-19T02:38:14.000Z | 2021-10-16T07:40:11.000Z | syreExport/syre_AnsysMaxwell/sim_xdeg_AM_customI.py | SyR-e/syre_public | 4f0e30aac2ee75817b5b46865af43f9f2fd54a48 | [
"Apache-2.0"
] | null | null | null | syreExport/syre_AnsysMaxwell/sim_xdeg_AM_customI.py | SyR-e/syre_public | 4f0e30aac2ee75817b5b46865af43f9f2fd54a48 | [
"Apache-2.0"
] | 2 | 2021-02-19T02:37:56.000Z | 2021-10-16T07:40:14.000Z | import pickle
import sys
import os
import os.path
import math
currentFolder = os.path.dirname(os.path.realpath(__file__))
filepath = r'%s/temp/temp.pkl'%(currentFolder)
with open(filepath,'rb') as exportdata:
simdata = pickle.load(exportdata)
sys.path.append(r"C:/Program Files/AnsysEM/AnsysEM20.1/Win64")
sys.pat... | 34.182844 | 206 | 0.637985 |
795d271cf4e3dee3f1d2a5d34d7f781f5513e220 | 7,103 | py | Python | nebu/flaptor/indextank/rpc/Suggestor.py | linkedin/indextank-service | 880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e | [
"Apache-2.0"
] | 26 | 2015-06-15T11:21:09.000Z | 2020-12-27T19:42:14.000Z | nebu/flaptor/indextank/rpc/Suggestor.py | LinkedInAttic/indextank-service | 880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e | [
"Apache-2.0"
] | 1 | 2020-09-15T19:34:38.000Z | 2020-09-15T19:34:38.000Z | nebu/flaptor/indextank/rpc/Suggestor.py | LinkedInAttic/indextank-service | 880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e | [
"Apache-2.0"
] | 12 | 2015-03-17T17:14:19.000Z | 2019-12-21T13:26:23.000Z | #
# Autogenerated by Thrift
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
from thrift.Thrift import *
from ttypes import *
from thrift.Thrift import TProcessor
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol, TProtocol
try:
from thrift.protocol import fast... | 29.719665 | 188 | 0.669576 |
795d279697de5a0c3520fbee6ed851ac17172bd1 | 758 | py | Python | graphs_trees/graph_bfs/test_bfs.py | filippovitale/interactive-coding-challenges | 8380a7aa98618c3cc9c0271c30bd320937d431ad | [
"Apache-2.0"
] | null | null | null | graphs_trees/graph_bfs/test_bfs.py | filippovitale/interactive-coding-challenges | 8380a7aa98618c3cc9c0271c30bd320937d431ad | [
"Apache-2.0"
] | null | null | null | graphs_trees/graph_bfs/test_bfs.py | filippovitale/interactive-coding-challenges | 8380a7aa98618c3cc9c0271c30bd320937d431ad | [
"Apache-2.0"
] | 1 | 2019-12-13T12:57:44.000Z | 2019-12-13T12:57:44.000Z | from nose.tools import assert_equal
class TestBfs(object):
def __init__(self):
self.results = Results()
def test_bfs(self):
nodes = []
graph = Graph()
for id in range(0, 6):
nodes.append(graph.add_node(id))
graph.add_edge(0, 1, 5)
graph.add_edge(0,... | 22.294118 | 61 | 0.546174 |
795d283524365353f20d6f6d4f5b3c1475219222 | 1,756 | py | Python | server/datasource/tests/integration/test_import_rates.py | yizhang7210/Acre | c98cf8a4fdfb223a1958e8e61df759f889a1b13f | [
"MIT"
] | 2 | 2017-11-27T21:55:21.000Z | 2017-12-30T03:34:40.000Z | server/datasource/tests/integration/test_import_rates.py | yizhang7210/Acre | c98cf8a4fdfb223a1958e8e61df759f889a1b13f | [
"MIT"
] | 30 | 2017-09-06T12:00:08.000Z | 2018-06-20T22:47:46.000Z | server/datasource/tests/integration/test_import_rates.py | yizhang7210/Acre | c98cf8a4fdfb223a1958e8e61df759f889a1b13f | [
"MIT"
] | 1 | 2021-04-05T13:59:37.000Z | 2021-04-05T13:59:37.000Z | # pylint: disable=missing-docstring
from datetime import datetime
from decimal import Decimal
from unittest.mock import patch
import pytz
from core.models import instruments
from datasource import rates
from datasource.models import candles
from django.test import TestCase
SIX_PLACES = Decimal('0.000001')
class Rat... | 33.769231 | 74 | 0.702164 |
795d2869c521b5b74eca7682a8fcfc5ed7768991 | 18,116 | py | Python | reframe/frontend/executors/__init__.py | Lumi-supercomputer/reframe | f1e46807663db0b4f7e6b1252c4fcda6fbcc3270 | [
"BSD-3-Clause"
] | null | null | null | reframe/frontend/executors/__init__.py | Lumi-supercomputer/reframe | f1e46807663db0b4f7e6b1252c4fcda6fbcc3270 | [
"BSD-3-Clause"
] | 3 | 2022-03-11T09:51:33.000Z | 2022-03-31T08:20:19.000Z | reframe/frontend/executors/__init__.py | Lumi-supercomputer/reframe | f1e46807663db0b4f7e6b1252c4fcda6fbcc3270 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016-2022 Swiss National Supercomputing Centre (CSCS/ETH Zurich)
# ReFrame Project Developers. See the top-level LICENSE file for details.
#
# SPDX-License-Identifier: BSD-3-Clause
import abc
import copy
import os
import signal
import sys
import time
import weakref
import reframe.core.logging as logging
i... | 31.451389 | 79 | 0.595054 |
795d28c3c9323e99ab6a5fa6a55eb2de82b05bd4 | 11,667 | py | Python | src/utils/libs/python/seiscomp/xmlparser.py | damb/seiscomp3 | 560a8f7ae43737ae7826fb1ffca76a9f601cf9dc | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 94 | 2015-02-04T13:57:34.000Z | 2021-11-01T15:10:06.000Z | src/utils/libs/python/seiscomp/xmlparser.py | damb/seiscomp3 | 560a8f7ae43737ae7826fb1ffca76a9f601cf9dc | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 233 | 2015-01-28T15:16:46.000Z | 2021-08-23T11:31:37.000Z | src/utils/libs/python/seiscomp/xmlparser.py | salichon/seiscomp3 | 4f7715f9ff9a35e7912c379ebf10446d0bceaeb2 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 95 | 2015-02-13T15:53:30.000Z | 2021-11-02T14:54:54.000Z | #*****************************************************************************
# xmlparser.py
#
# SeisComP XML parser
#
# (c) 2005 Andres Heinloo, GFZ Potsdam
#
# 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 Softw... | 30.94695 | 80 | 0.5147 |
795d296d243d6581748e1e8651a8dfa46f59fa4f | 5,931 | py | Python | joker/simulator/full_node_simulator.py | PuNkYsHuNgRy/joker-blockchain | e49d6b9aa46e6097e216561bd7563b50519aae13 | [
"Apache-2.0"
] | 4 | 2022-03-04T06:08:15.000Z | 2022-03-17T19:14:22.000Z | joker/simulator/full_node_simulator.py | zcomputerwiz/joker-blockchain | 72cf94708acd49e0cbcc63c74d5ddb1e1045b8a5 | [
"Apache-2.0"
] | 1 | 2022-03-29T13:20:11.000Z | 2022-03-29T13:20:11.000Z | joker/simulator/full_node_simulator.py | zcomputerwiz/joker-blockchain | 72cf94708acd49e0cbcc63c74d5ddb1e1045b8a5 | [
"Apache-2.0"
] | 3 | 2022-03-10T22:26:44.000Z | 2022-03-15T08:46:15.000Z | from typing import List, Optional
from joker.consensus.block_record import BlockRecord
from joker.full_node.full_node_api import FullNodeAPI
from joker.protocols.full_node_protocol import RespondBlock
from joker.simulator.simulator_protocol import FarmNewBlockProtocol, ReorgProtocol
from joker.types.full_block import ... | 42.978261 | 110 | 0.651998 |
795d2ae497600fd783e2182f142da20ef5f0a9e3 | 632 | py | Python | sphinx/source/docs/user_guide/examples/data_filtering_index_filter.py | goncaloperes/bokeh | b857d2d17d7c19779bb0a7be2601d8238fb1d5e9 | [
"BSD-3-Clause"
] | 1 | 2021-10-30T00:32:00.000Z | 2021-10-30T00:32:00.000Z | sphinx/source/docs/user_guide/examples/data_filtering_index_filter.py | Deng-Fankang/bokeh | 894731860c53b7c9ddd0057dee85cf064278dc0e | [
"BSD-3-Clause"
] | 12 | 2020-08-26T20:19:29.000Z | 2020-08-26T20:19:52.000Z | sphinx/source/docs/user_guide/examples/data_filtering_index_filter.py | Deng-Fankang/bokeh | 894731860c53b7c9ddd0057dee85cf064278dc0e | [
"BSD-3-Clause"
] | 2 | 2021-01-12T18:22:24.000Z | 2021-10-30T00:32:02.000Z | from bokeh.layouts import gridplot
from bokeh.models import CDSView, ColumnDataSource, IndexFilter
from bokeh.plotting import figure, show
source = ColumnDataSource(data=dict(x=[1, 2, 3, 4, 5], y=[1, 2, 3, 4, 5]))
view = CDSView(source=source, filters=[IndexFilter([0, 2, 4])])
tools = ["box_select", "hover", "reset"]... | 39.5 | 85 | 0.71519 |
795d2b46a23d216bc8e22d8e5487e1f9065e5fa1 | 70,270 | py | Python | test/test_utils.py | RobinD42/yt-dlc | aae273ded871caac1995381033a5b7ecaf4a526b | [
"Unlicense"
] | null | null | null | test/test_utils.py | RobinD42/yt-dlc | aae273ded871caac1995381033a5b7ecaf4a526b | [
"Unlicense"
] | null | null | null | test/test_utils.py | RobinD42/yt-dlc | aae273ded871caac1995381033a5b7ecaf4a526b | [
"Unlicense"
] | 1 | 2021-09-10T18:22:00.000Z | 2021-09-10T18:22:00.000Z | #!/usr/bin/env python
# coding: utf-8
from __future__ import unicode_literals
# Allow direct execution
import os
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
# Various small unit tests
import io
import json
import xml.etree.ElementTree
from yt_dlp.utils... | 46.598143 | 382 | 0.604838 |
795d2bbf3edf8a57bc6a09df1648b72c86a537e4 | 12,245 | py | Python | kle_scraper/scraper.py | hajimen/kle_scraper | b1e3325c59a9704314c08aacfba8e3978d1f2b94 | [
"MIT"
] | null | null | null | kle_scraper/scraper.py | hajimen/kle_scraper | b1e3325c59a9704314c08aacfba8e3978d1f2b94 | [
"MIT"
] | null | null | null | kle_scraper/scraper.py | hajimen/kle_scraper | b1e3325c59a9704314c08aacfba8e3978d1f2b94 | [
"MIT"
] | null | null | null | import os
import pathlib
import typing as ty
import tempfile
import atexit
import time
from PIL import Image, ImageChops
from cefpython3 import cefpython as cef
import pykle_serial as kle_serial
# web
from http.server import ThreadingHTTPServer, SimpleHTTPRequestHandler
import threading
from dataclasses import datacla... | 36.552239 | 123 | 0.65439 |
795d2c2251ac57fc9d994321a126453485f0402f | 2,088 | py | Python | scripts/interleave_pairs.py | lexnederbragt/denovo-assembly-tutorial | 3b532d32ea2a1b83e4105b188c0e4e4c93555104 | [
"CC-BY-3.0"
] | 10 | 2016-11-17T17:05:54.000Z | 2021-01-16T12:36:13.000Z | scripts/interleave_pairs.py | lexnederbragt/denovo-assembly-tutorial | 3b532d32ea2a1b83e4105b188c0e4e4c93555104 | [
"CC-BY-3.0"
] | null | null | null | scripts/interleave_pairs.py | lexnederbragt/denovo-assembly-tutorial | 3b532d32ea2a1b83e4105b188c0e4e4c93555104 | [
"CC-BY-3.0"
] | 8 | 2016-03-01T09:58:31.000Z | 2021-12-01T04:58:50.000Z | #!/usr/bin/env python
# based on this SeqAnswers thread
# http://seqanswers.com/forums/showthread.php?t=6140
# original written by Peter Cock
from Bio import SeqIO #Biopython 1.54 or later needed
import sys
#######################################################
#
# Change the following settings to suit your needs... | 28.60274 | 96 | 0.684387 |
795d2ca1d05c354b8d109a91b1ca2ca85e0900af | 2,298 | py | Python | envs.py | tegg89/rl-teacher-Pytorch | 98484e913ec509d3588f6aaa8571fb32ba573cb6 | [
"MIT"
] | 4 | 2019-02-08T05:43:36.000Z | 2020-02-13T19:50:51.000Z | envs.py | tegg89/rl-teacher-Pytorch | 98484e913ec509d3588f6aaa8571fb32ba573cb6 | [
"MIT"
] | null | null | null | envs.py | tegg89/rl-teacher-Pytorch | 98484e913ec509d3588f6aaa8571fb32ba573cb6 | [
"MIT"
] | null | null | null | import cv2
import gym
import numpy as np
from gym.spaces.box import Box
# Taken from https://github.com/openai/universe-starter-agent
def create_atari_env(env_id):
env = gym.make(env_id)
env = AtariRescale42x42(env)
env = NormalizedEnv(flip=False, env=env)
# env = HumanWrapper(env)
return env
de... | 31.479452 | 79 | 0.633159 |
795d2dc479a4b4bd08bf08875100bb73b10c6ffa | 127 | py | Python | RaspberryPiCode/MotionSensor/pirtest2.py | dingqingy/minicloud | 37489ba00a53c4ff33716181080061381bc74b30 | [
"MIT"
] | 2 | 2018-08-01T17:27:03.000Z | 2019-10-04T00:35:53.000Z | RaspberryPiCode/MotionSensor/pirtest2.py | dingqingy/minicloud | 37489ba00a53c4ff33716181080061381bc74b30 | [
"MIT"
] | null | null | null | RaspberryPiCode/MotionSensor/pirtest2.py | dingqingy/minicloud | 37489ba00a53c4ff33716181080061381bc74b30 | [
"MIT"
] | 3 | 2018-02-10T05:44:10.000Z | 2019-06-04T18:12:10.000Z | from gpiozero import MotionSensor
pir = MotionSensor(4)
while True:
pir.wait_for_motion()
print("Motion detected!")
| 14.111111 | 33 | 0.724409 |
795d2ea09e73a7d66845b9882192e9312e609034 | 4,113 | py | Python | mjolnir.py | xsheidhedax/MJOLNIR | 28f79fd04d6b5298b20c0d6f979fd269edc5677a | [
"MIT"
] | 9 | 2021-09-06T00:37:57.000Z | 2022-02-19T20:37:45.000Z | mjolnir.py | xsheidhedax/MJOLNIR | 28f79fd04d6b5298b20c0d6f979fd269edc5677a | [
"MIT"
] | null | null | null | mjolnir.py | xsheidhedax/MJOLNIR | 28f79fd04d6b5298b20c0d6f979fd269edc5677a | [
"MIT"
] | null | null | null | ##############----START\LIBS------#######################
import tldextract
from googlesearch import search
from urllib.request import urlopen
from urllib.error import HTTPError, URLError
import socket
from socket import error as SocketError
from termcolor import colored
import os
import datetime
###############----pro... | 39.171429 | 117 | 0.424265 |
795d2ec8a2402028339235772c596f01d3005b4a | 2,012 | py | Python | 2017/23/part_1/code.py | maitesin/advent | a08e3f2c9b7868cba364579270efc3719692ca1b | [
"BSD-2-Clause"
] | 1 | 2017-12-06T15:36:15.000Z | 2017-12-06T15:36:15.000Z | 2017/23/part_1/code.py | maitesin/advent | a08e3f2c9b7868cba364579270efc3719692ca1b | [
"BSD-2-Clause"
] | null | null | null | 2017/23/part_1/code.py | maitesin/advent | a08e3f2c9b7868cba364579270efc3719692ca1b | [
"BSD-2-Clause"
] | null | null | null | import sys
class Registers(object):
def __init__(self):
self.regs = {}
def read(self, k):
return self.regs.get(k, 0)
def write(self, k, v):
self.regs[k] = v
class Instruction(object):
def __init__(self, input):
self.type = input[:3]
self.x, self.y = input[4:].... | 27.944444 | 61 | 0.481113 |
795d2ef8462a2d0595e77b663535f8d97cc932c0 | 13,182 | py | Python | ipdbx/__main__.py | giladbarnea/ipdb3 | 29e2e67d8aca9b35d96d29f43163b5ba9e84746d | [
"MIT",
"BSD-3-Clause"
] | 1 | 2021-03-25T00:40:10.000Z | 2021-03-25T00:40:10.000Z | ipdbx/__main__.py | giladbarnea/ipdb3 | 29e2e67d8aca9b35d96d29f43163b5ba9e84746d | [
"MIT",
"BSD-3-Clause"
] | null | null | null | ipdbx/__main__.py | giladbarnea/ipdb3 | 29e2e67d8aca9b35d96d29f43163b5ba9e84746d | [
"MIT",
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2011-2016 Godefroid Chapelle and ipdb development team
#
# This file is part of ipdb-extended.
# GNU package 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 ... | 33.287879 | 130 | 0.647777 |
795d303ea412d6c18e7c571addab9a94b73e6df6 | 1,516 | py | Python | main.py | kproshakov/SudokuCV | 8c29f4f1ac32513e7bd7d194d1fefb249c5d7921 | [
"MIT"
] | null | null | null | main.py | kproshakov/SudokuCV | 8c29f4f1ac32513e7bd7d194d1fefb249c5d7921 | [
"MIT"
] | null | null | null | main.py | kproshakov/SudokuCV | 8c29f4f1ac32513e7bd7d194d1fefb249c5d7921 | [
"MIT"
] | null | null | null | from SudokuCV import SudokuCV
import cv2
from tkinter import *
from tkinter import filedialog
from PIL import Image, ImageTk
class GUI(Frame):
def __init__(self, master=None):
Frame.__init__(self, master)
w,h = 400, 500
master.minsize(width=w, height=h)
master.maxsize(width=w, h... | 24.852459 | 83 | 0.631266 |
795d3084b41329dbca7cdf159a5f188d0425eae1 | 328 | py | Python | code/backend/appointments/licence_plates.py | rollethu/noe | ef668929496069b9519b4670e8cf19a6531f5b24 | [
"MIT"
] | 16 | 2020-06-18T07:44:02.000Z | 2022-01-28T14:48:00.000Z | code/backend/appointments/licence_plates.py | dorinapall/noe | 6d5682ab00a2cdc5cb419ecab57804c9f70d7b3a | [
"MIT"
] | 5 | 2020-06-17T08:54:03.000Z | 2022-01-27T21:40:02.000Z | code/backend/appointments/licence_plates.py | dorinapall/noe | 6d5682ab00a2cdc5cb419ecab57804c9f70d7b3a | [
"MIT"
] | 4 | 2020-06-18T09:35:22.000Z | 2021-05-10T21:47:24.000Z | import re
import unidecode
def get_normalized_licence_plate(licence_plate):
normalized_licence_plate = licence_plate.upper()
normalized_licence_plate = unidecode.unidecode(normalized_licence_plate)
normalized_licence_plate = re.sub("[^a-zA-Z0-9]", "", normalized_licence_plate)
return normalized_licenc... | 32.8 | 83 | 0.804878 |
795d30af28f2d2f49ee502ef2e17a045f42f29a3 | 22,229 | py | Python | xarray/core/parallel.py | lusewell/xarray | da99a5664df4f5013c2f6b0e758394bec5e0bc80 | [
"CC-BY-4.0",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2021-05-09T20:55:23.000Z | 2021-05-09T20:55:23.000Z | xarray/core/parallel.py | lusewell/xarray | da99a5664df4f5013c2f6b0e758394bec5e0bc80 | [
"CC-BY-4.0",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"BSD-3-Clause"
] | 15 | 2020-07-15T14:20:59.000Z | 2022-02-14T04:05:13.000Z | xarray/core/parallel.py | lusewell/xarray | da99a5664df4f5013c2f6b0e758394bec5e0bc80 | [
"CC-BY-4.0",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2022-03-08T11:31:54.000Z | 2022-03-08T11:31:54.000Z | try:
import dask
import dask.array
from dask.array.utils import meta_from_array
from dask.highlevelgraph import HighLevelGraph
except ImportError:
pass
import collections
import itertools
import operator
from typing import (
Any,
Callable,
DefaultDict,
Dict,
Hashable,
Itera... | 37.676271 | 122 | 0.619416 |
795d30d160c26a7bac2bc81ad83c75d33762b3f6 | 1,891 | py | Python | flfm/tests/test_sockets.py | m-flak/flfm | e73943dc014e9af87a5c170d17dee15e1c6609bd | [
"Apache-2.0"
] | 5 | 2019-10-24T05:40:26.000Z | 2021-01-06T01:41:08.000Z | flfm/tests/test_sockets.py | m-flak/flfm | e73943dc014e9af87a5c170d17dee15e1c6609bd | [
"Apache-2.0"
] | null | null | null | flfm/tests/test_sockets.py | m-flak/flfm | e73943dc014e9af87a5c170d17dee15e1c6609bd | [
"Apache-2.0"
] | null | null | null | import os
import json
from flask import current_app, request
from flask_testing import TestCase
from flask_socketio import SocketIOTestClient, send
from flfm import create_app, socketio
from .config import Config
class SocketIOClientContext(SocketIOTestClient):
def __init__(self, app, socketio, **kwargs):
... | 33.767857 | 80 | 0.659968 |
795d3180a2779fae3b00e85cee76e117a1e446d7 | 4,780 | py | Python | Result/SmallSPL/mine_pump.py | zahrakhoshmanesh/FIDUS | 98e4953267781ac3875a9f28d820c22a84e413c5 | [
"MIT"
] | null | null | null | Result/SmallSPL/mine_pump.py | zahrakhoshmanesh/FIDUS | 98e4953267781ac3875a9f28d820c22a84e413c5 | [
"MIT"
] | null | null | null | Result/SmallSPL/mine_pump.py | zahrakhoshmanesh/FIDUS | 98e4953267781ac3875a9f28d820c22a84e413c5 | [
"MIT"
] | null | null | null | """
Created on Thu Dec 13 12:37:47 2018
pairwise similarity matrix for jaccard and hamming metric
Name of Software Product Line: Mine Pump
Number Of Features : 7
@author: Zahra Khoshmanesh
"""
"""
pair of feature interaction in Mine Pump SPL
highWaterSensor+ methaneAlarm
highWaterSensor+ methaneQuery
hig... | 37.054264 | 657 | 0.708787 |
795d32053cbb786ae8a145bc72324bda14ed4828 | 2,587 | py | Python | config/settings/local.py | shuttlekim/shutgram | 37b667b2727a71e1eabecf8c9f29056a4d2713c2 | [
"MIT"
] | null | null | null | config/settings/local.py | shuttlekim/shutgram | 37b667b2727a71e1eabecf8c9f29056a4d2713c2 | [
"MIT"
] | 12 | 2020-06-05T18:44:47.000Z | 2022-03-03T22:37:11.000Z | config/settings/local.py | shuttlekim/shutgram | 37b667b2727a71e1eabecf8c9f29056a4d2713c2 | [
"MIT"
] | null | null | null | from .base import * # noqa
from .base import env
# GENERAL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#debug
DEBUG = True
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
SECRET_KEY = env('DJANGO_SECRET_KEY', de... | 39.8 | 113 | 0.581368 |
795d324db085e8f9d04dd79fa580eb7fb3056617 | 2,098 | py | Python | ludwig/datasets/yelp_review_polarity/__init__.py | hfurkanbozkurt/ludwig | bfcbd52237c73702764e733ede4351e0146394bd | [
"Apache-2.0"
] | 970 | 2020-12-17T15:09:20.000Z | 2022-03-31T22:58:03.000Z | ludwig/datasets/yelp_review_polarity/__init__.py | hfurkanbozkurt/ludwig | bfcbd52237c73702764e733ede4351e0146394bd | [
"Apache-2.0"
] | 503 | 2020-12-16T21:44:40.000Z | 2022-03-31T18:21:52.000Z | ludwig/datasets/yelp_review_polarity/__init__.py | hfurkanbozkurt/ludwig | bfcbd52237c73702764e733ede4351e0146394bd | [
"Apache-2.0"
] | 145 | 2020-12-18T07:38:30.000Z | 2022-03-29T19:05:08.000Z | #! /usr/bin/env python
# Copyright (c) 2019 Uber 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 a... | 41.137255 | 102 | 0.71592 |
795d32b4068bf31786595cfc09a5aae9a7dc6446 | 2,675 | py | Python | PyBank/main.py | V-Villagomez/Python_Challenge | 0eac7c8061156160fd56be502c6acbec7e1ab98f | [
"Apache-2.0"
] | null | null | null | PyBank/main.py | V-Villagomez/Python_Challenge | 0eac7c8061156160fd56be502c6acbec7e1ab98f | [
"Apache-2.0"
] | null | null | null | PyBank/main.py | V-Villagomez/Python_Challenge | 0eac7c8061156160fd56be502c6acbec7e1ab98f | [
"Apache-2.0"
] | null | null | null | # import csv file
import csv
# import to create paths with os = operating systems
# import pathlib
import os
import pathlib
csvpath = pathlib.Path('Resources/budget_data.csv')
with open(csvpath) as csvfile:
# CSV reader specifies delimiter and variable that holds contents
csvreader = csv.reader(csvfile, deli... | 30.05618 | 79 | 0.659813 |
795d32ce94449e62e28af8ae81b8f5ea6c5a4fb8 | 2,456 | py | Python | octavia/tests/functional/api/v1/test_load_balancer_statistics.py | zjchao/octavia | e07031fa78604568c6e2112cb4cb147661bc57d7 | [
"Apache-2.0"
] | 1 | 2019-01-11T06:18:38.000Z | 2019-01-11T06:18:38.000Z | octavia/tests/functional/api/v1/test_load_balancer_statistics.py | zjchao/octavia | e07031fa78604568c6e2112cb4cb147661bc57d7 | [
"Apache-2.0"
] | 10 | 2020-09-18T12:17:59.000Z | 2022-03-14T15:45:38.000Z | octavia/tests/functional/api/v1/test_load_balancer_statistics.py | zjchao/octavia | e07031fa78604568c6e2112cb4cb147661bc57d7 | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.000Z | # Copyright 2016 IBM
#
# 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 i... | 42.344828 | 78 | 0.598534 |
795d32e4c9f72177447cee2071729c87a184c615 | 11,758 | py | Python | salt/cli/caller.py | litnialex/salt | ed773dcacedebb01a0d34b5e8e66e57bdf2e2d0f | [
"Apache-2.0"
] | 3 | 2015-08-30T04:23:47.000Z | 2018-07-15T00:35:23.000Z | salt/cli/caller.py | litnialex/salt | ed773dcacedebb01a0d34b5e8e66e57bdf2e2d0f | [
"Apache-2.0"
] | null | null | null | salt/cli/caller.py | litnialex/salt | ed773dcacedebb01a0d34b5e8e66e57bdf2e2d0f | [
"Apache-2.0"
] | 1 | 2016-10-28T03:58:05.000Z | 2016-10-28T03:58:05.000Z | """
The caller module is used as a front-end to manage direct calls to the salt
minion modules.
"""
import logging
import os
import sys
import traceback
import salt
import salt.defaults.exitcodes
import salt.loader
import salt.minion
import salt.output
import salt.payload
import salt.transport
import salt.transport.... | 35.415663 | 88 | 0.520071 |
795d33c22fffb70abb19323ba445f9001c5508f0 | 1,520 | py | Python | first/code.py | Niliket/greyatom-python-for-data-science | 9f9f7c4d1688dae9f726b70f632dac4fe68c28ee | [
"MIT"
] | null | null | null | first/code.py | Niliket/greyatom-python-for-data-science | 9f9f7c4d1688dae9f726b70f632dac4fe68c28ee | [
"MIT"
] | null | null | null | first/code.py | Niliket/greyatom-python-for-data-science | 9f9f7c4d1688dae9f726b70f632dac4fe68c28ee | [
"MIT"
] | null | null | null | # --------------
# Code starts here
# Create the lists
class_1 = ['Geoffrey Hinton','Andrew Ng','Sebastian Raschka','Yoshua Bengio']
class_2 = ['Hilary Mason','Carla Gentry','Corinna Cortes']
# Concatenate both the strings
new_class = class_1+class_2
print(new_class)
# Append the list
new_class.append('Pet... | 24.918033 | 156 | 0.708553 |
795d340cf9e334ccbede85fe84054210a13d9ce4 | 22,287 | py | Python | hydra/_internal/hydra.py | briankosw/hydra | 836687d59517de0e9aba27bb230bc1eb16f0098c | [
"MIT"
] | 1 | 2021-03-16T15:22:51.000Z | 2021-03-16T15:22:51.000Z | hydra/_internal/hydra.py | briankosw/hydra | 836687d59517de0e9aba27bb230bc1eb16f0098c | [
"MIT"
] | 1 | 2021-06-17T03:18:57.000Z | 2021-06-17T08:10:34.000Z | hydra/_internal/hydra.py | briankosw/hydra | 836687d59517de0e9aba27bb230bc1eb16f0098c | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import copy
import logging
import string
import sys
import warnings
from argparse import ArgumentParser
from collections import defaultdict
from typing import Any, Callable, DefaultDict, List, Optional, Sequence, Type, Union
from omegaconf import C... | 35.152997 | 113 | 0.587338 |
795d348ef86d127fb82437a875db426399bee18b | 82,828 | py | Python | numpy/distutils/misc_util.py | shawlu95/numpy | 984e6a91f5b6a8e4f901fc1d17a287473914ecbb | [
"BSD-3-Clause"
] | 1 | 2021-03-07T16:07:59.000Z | 2021-03-07T16:07:59.000Z | numpy/distutils/misc_util.py | shawlu95/numpy | 984e6a91f5b6a8e4f901fc1d17a287473914ecbb | [
"BSD-3-Clause"
] | 2 | 2019-06-27T22:38:29.000Z | 2019-06-28T22:21:14.000Z | numpy/distutils/misc_util.py | shawlu95/numpy | 984e6a91f5b6a8e4f901fc1d17a287473914ecbb | [
"BSD-3-Clause"
] | null | null | null | from __future__ import division, absolute_import, print_function
import os
import re
import sys
import copy
import glob
import atexit
import tempfile
import subprocess
import shutil
import multiprocessing
import textwrap
import distutils
from distutils.errors import DistutilsError
try:
from threading import local... | 35.640275 | 102 | 0.562539 |
795d34b3fa0b1e82e61321a0d5897004c0dbaf5b | 421 | py | Python | venv/Scripts/pip-script.py | Orionisxoxo/Integracja_aplikacji_2 | 8e93ed476ab215bfb489ac5ac6128dec161c56b8 | [
"Apache-2.0"
] | null | null | null | venv/Scripts/pip-script.py | Orionisxoxo/Integracja_aplikacji_2 | 8e93ed476ab215bfb489ac5ac6128dec161c56b8 | [
"Apache-2.0"
] | null | null | null | venv/Scripts/pip-script.py | Orionisxoxo/Integracja_aplikacji_2 | 8e93ed476ab215bfb489ac5ac6128dec161c56b8 | [
"Apache-2.0"
] | null | null | null | #!C:\Users\Student\PycharmProjects\gitlab-monolith\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip'
__requires__ = 'pip==10.0.1'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', ... | 32.384615 | 74 | 0.674584 |
795d353b40d60a61e41befebb89a9dd26721a396 | 10,662 | py | Python | batchflow/pipeline_executor.py | analysiscenter/dataset | 50a0607442bd2eb675c8f6a8d7bc5e9dbabe36c0 | [
"Apache-2.0"
] | 101 | 2017-06-05T07:33:54.000Z | 2018-10-28T04:55:23.000Z | batchflow/pipeline_executor.py | analysiscenter/dataset | 50a0607442bd2eb675c8f6a8d7bc5e9dbabe36c0 | [
"Apache-2.0"
] | 23 | 2017-11-08T20:01:58.000Z | 2018-07-15T09:08:02.000Z | batchflow/pipeline_executor.py | analysiscenter/dataset | 50a0607442bd2eb675c8f6a8d7bc5e9dbabe36c0 | [
"Apache-2.0"
] | 23 | 2017-06-06T05:13:37.000Z | 2018-11-01T14:33:38.000Z | """ Contains pipeline executor class """
import os
import warnings
import traceback
import concurrent.futures as cf
import queue as q
from .exceptions import SkipBatchException, EmptyBatchSequence, StopPipeline
from .notifier import Notifier
from .utils_random import make_seed_sequence
warnings.filterwarnings("alway... | 40.233962 | 117 | 0.582536 |
795d367168e7861d1ad88f09908e54eb77ad7767 | 23,906 | py | Python | test/functional/test_framework/test_framework.py | e-n-0/breekcoin | b0e76f6152e4bb281b8faa581dc34350493b9c42 | [
"MIT"
] | null | null | null | test/functional/test_framework/test_framework.py | e-n-0/breekcoin | b0e76f6152e4bb281b8faa581dc34350493b9c42 | [
"MIT"
] | null | null | null | test/functional/test_framework/test_framework.py | e-n-0/breekcoin | b0e76f6152e4bb281b8faa581dc34350493b9c42 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Base class for RPC testing."""
import configparser
from enum import Enum
import logging
import argpars... | 41.648084 | 312 | 0.622438 |
795d36cc861d08eb86131edfad0a9e0f621c68ce | 5,297 | py | Python | src/train_ff.py | fofferhorn/SC2ML | 436e9b9883c78505cfecaaf1fe1abe9ec630dd88 | [
"MIT"
] | null | null | null | src/train_ff.py | fofferhorn/SC2ML | 436e9b9883c78505cfecaaf1fe1abe9ec630dd88 | [
"MIT"
] | null | null | null | src/train_ff.py | fofferhorn/SC2ML | 436e9b9883c78505cfecaaf1fe1abe9ec630dd88 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function
# TensorFlow and tf.keras
import tensorflow as tf
from tensorflow.keras import metrics, optimizers, layers, losses, models, callbacks, utils, regularizers
from tensorflow.keras import backend as K
# Helper libraries
import numpy as np
import matplotlib... | 32.900621 | 155 | 0.601473 |
795d3705dd65ad0ef7374f85369d76832085a6ce | 4,019 | py | Python | movie_recommendations/userbased_filtering.py | sizhec-joy/CSE583-Movie | 9ce9dc540040359b4e05382bfb6b5b9b3056a789 | [
"MIT"
] | null | null | null | movie_recommendations/userbased_filtering.py | sizhec-joy/CSE583-Movie | 9ce9dc540040359b4e05382bfb6b5b9b3056a789 | [
"MIT"
] | 7 | 2019-12-02T17:25:41.000Z | 2019-12-10T01:04:16.000Z | movie_recommendations/userbased_filtering.py | sizhec-joy/CSE583-Movie | 9ce9dc540040359b4e05382bfb6b5b9b3056a789 | [
"MIT"
] | 2 | 2019-12-04T00:11:11.000Z | 2019-12-04T00:14:43.000Z | import pickle
import os.path
import ast
import pandas as pd
from surprise import Reader, Dataset, SVD, model_selection
Run = False
if __name__ == "__main__":
Run = True
print("process file cop")
if not os.path.isfile('movies-dataset/source/collaborative_result.csv'):
Run = True
print('process file co... | 29.77037 | 98 | 0.650908 |
795d37330c9e34184804bfbd01a5f193bbddbb19 | 1,092 | py | Python | setup.py | SauravMaheshkar/flax-package-template | 48b5a98e1fec6106c653e9992545926fa2eb2860 | [
"MIT"
] | null | null | null | setup.py | SauravMaheshkar/flax-package-template | 48b5a98e1fec6106c653e9992545926fa2eb2860 | [
"MIT"
] | null | null | null | setup.py | SauravMaheshkar/flax-package-template | 48b5a98e1fec6106c653e9992545926fa2eb2860 | [
"MIT"
] | null | null | null | import io
import os
import re
from setuptools import find_packages, setup
# From https://github.com/n2cholas/jax-resnet
def read(*names, **kwargs):
with io.open(
os.path.join(os.path.dirname(__file__), *names),
encoding=kwargs.get("encoding", "utf8"),
) as fp:
return fp.read()
def f... | 23.234043 | 88 | 0.624542 |
795d3789618a85aaad60977706e399b0af5bb9ed | 3,351 | py | Python | baselines/ppo2/runner.py | danzvara/baselines | d3ad1c61a86f40351ae1e9fc8f3768bea8163555 | [
"MIT"
] | null | null | null | baselines/ppo2/runner.py | danzvara/baselines | d3ad1c61a86f40351ae1e9fc8f3768bea8163555 | [
"MIT"
] | null | null | null | baselines/ppo2/runner.py | danzvara/baselines | d3ad1c61a86f40351ae1e9fc8f3768bea8163555 | [
"MIT"
] | null | null | null | import numpy as np
from baselines import logger
from baselines.common.runners import AbstractEnvRunner
import time
class Runner(AbstractEnvRunner):
"""
We use this object to make a mini batch of experiences
__init__:
- Initialize the runner
run():
- Make a mini batch
"""
def __init__(s... | 40.865854 | 109 | 0.612653 |
795d39eba7d39816688297b0fb1f3f00c1d0fad4 | 6,076 | py | Python | preprocess_city2.py | AlamiMejjati/neurips18_hierchical_image_manipulation | ce42ed88e3edca7eb43970ec6a28ebf3a8b13b9e | [
"MIT"
] | null | null | null | preprocess_city2.py | AlamiMejjati/neurips18_hierchical_image_manipulation | ce42ed88e3edca7eb43970ec6a28ebf3a8b13b9e | [
"MIT"
] | null | null | null | preprocess_city2.py | AlamiMejjati/neurips18_hierchical_image_manipulation | ce42ed88e3edca7eb43970ec6a28ebf3a8b13b9e | [
"MIT"
] | null | null | null | import os
import glob
from shutil import copy2
from scipy import ndimage
from PIL import Image
import json
import numpy as np
import argparse
import shutil
from skimage import io
from tqdm import tqdm
from itertools import product
class NpEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(ob... | 37.73913 | 194 | 0.601547 |
795d3a53b2e79ab508dbb493a12ec6d31f001b70 | 5,405 | py | Python | Python Scripting/Python - POC-3/DvdOperations.py | vaibhavkrishna-bhosle/Trendnxt-Projects | 6c8a31be2f05ec79cfc5086ee09adff161b836ad | [
"MIT"
] | null | null | null | Python Scripting/Python - POC-3/DvdOperations.py | vaibhavkrishna-bhosle/Trendnxt-Projects | 6c8a31be2f05ec79cfc5086ee09adff161b836ad | [
"MIT"
] | null | null | null | Python Scripting/Python - POC-3/DvdOperations.py | vaibhavkrishna-bhosle/Trendnxt-Projects | 6c8a31be2f05ec79cfc5086ee09adff161b836ad | [
"MIT"
] | null | null | null | import mysql.connector
from mysql.connector.errors import ProgrammingError
from mysql.connector import Error
database = "db4"
class DvdStore():
@classmethod
def AddDvd(self):
try:
title = input("enter title of the dvd : ")
star_name = input("enter star name of the dvd : ")
... | 33.78125 | 107 | 0.439778 |
795d3aaaa07009ed1b106006c8a7206553bdb0e9 | 370 | py | Python | class1-intro-to-python/app.py | spu-bigdataanalytics/materials | d95be1cf1d656a49527823df9c4d1fa302a95cc1 | [
"MIT"
] | null | null | null | class1-intro-to-python/app.py | spu-bigdataanalytics/materials | d95be1cf1d656a49527823df9c4d1fa302a95cc1 | [
"MIT"
] | 4 | 2020-03-24T18:03:37.000Z | 2021-08-23T20:31:59.000Z | class1-intro-to-python/app.py | spu-bigdataanalytics-193/materials | d95be1cf1d656a49527823df9c4d1fa302a95cc1 | [
"MIT"
] | null | null | null | # standard importing
import my_module
# specific imports
import my_package
from my_package.sub_module import car1, greeting
if __name__ == "__main__":
# using module
a = my_module.divide(10, 2)
b = my_module.multipy(20, 3)
# from package
brand = car1['brand']
text = greeting('Metin')
#... | 16.086957 | 48 | 0.662162 |
795d3ed4e2322fdd3472993b13bf11d35fce81ad | 6,539 | py | Python | tree/fft1.py | xi-studio/DiscreteNN | 85468da14bddfe4cbe2e07071454cdbc52ef915f | [
"MIT"
] | 1 | 2019-08-15T09:43:21.000Z | 2019-08-15T09:43:21.000Z | tree/fft1.py | xi-studio/DiscreteNN | 85468da14bddfe4cbe2e07071454cdbc52ef915f | [
"MIT"
] | null | null | null | tree/fft1.py | xi-studio/DiscreteNN | 85468da14bddfe4cbe2e07071454cdbc52ef915f | [
"MIT"
] | null | null | null | from __future__ import print_function
import argparse
import torch
import torch.utils.data
from torch import nn, optim
from torch.nn import functional as F
from torchvision import datasets, transforms
from torchvision.utils import save_image
import numpy as np
parser = argparse.ArgumentParser(description='VAE MNIST ... | 29.191964 | 83 | 0.545496 |
795d3f5c2be5b8ea2a36cbba7c01edf96dfb9d1c | 231 | py | Python | 84.capture_string_errors.py | gptakhil/Python_Practice_Beginner | ebff3da1204dfed6762bce0cfc6b0ea562212548 | [
"MIT"
] | 2 | 2020-10-13T08:16:56.000Z | 2020-10-14T10:05:16.000Z | 84.capture_string_errors.py | gptakhil/Python_Practice_Beginner | ebff3da1204dfed6762bce0cfc6b0ea562212548 | [
"MIT"
] | null | null | null | 84.capture_string_errors.py | gptakhil/Python_Practice_Beginner | ebff3da1204dfed6762bce0cfc6b0ea562212548 | [
"MIT"
] | 2 | 2020-10-13T08:17:04.000Z | 2020-10-17T11:19:33.000Z | x = input("Insert numbers only: ")
while type(x) != float:
try:
x = float(x)
except ValueError:
print("Error! Please insert only numbsers...")
x = input("Insert numbers only: ")
print(x/2)
| 21 | 54 | 0.554113 |
795d3fef7e52e42b93630f399a66fb2c55a02df2 | 1,306 | py | Python | src/Python/Unittests/test_vector_type.py | rzoller/OpenMesh | f84bca0b26c61eab5f9335b2191962ca8545c5f6 | [
"BSD-3-Clause"
] | 19 | 2020-08-13T05:15:09.000Z | 2022-03-31T14:51:29.000Z | src/Python/Unittests/test_vector_type.py | ccopsey/OpenMesh | 93e6e626c3f282bf4275521c33cd8da1ca559c7d | [
"BSD-3-Clause"
] | 2 | 2020-09-08T07:03:04.000Z | 2021-08-04T05:43:27.000Z | src/Python/Unittests/test_vector_type.py | ccopsey/OpenMesh | 93e6e626c3f282bf4275521c33cd8da1ca559c7d | [
"BSD-3-Clause"
] | 10 | 2020-08-06T02:37:46.000Z | 2021-07-01T09:12:06.000Z | import unittest
import openmesh
class VectorTest(unittest.TestCase):
def test_compute_triangle_surface_with_cross_product(self):
# vec1
# y
# |
# |
# |
# x------>x vec2
vec1 = openmesh.Vec3d(0.0, 1.0, 0.0)
vec2 = openmesh.Vec3d(1.0, 0.0... | 27.787234 | 67 | 0.568913 |
795d408f15990d4c911ecf8cc5918687b1380450 | 2,840 | py | Python | mmocr/models/textrecog/losses/ctc_loss.py | constanreedjohn/mmocr | 8f638f11fff56c5f4969a350c88ab013849b7fd4 | [
"Apache-2.0"
] | null | null | null | mmocr/models/textrecog/losses/ctc_loss.py | constanreedjohn/mmocr | 8f638f11fff56c5f4969a350c88ab013849b7fd4 | [
"Apache-2.0"
] | null | null | null | mmocr/models/textrecog/losses/ctc_loss.py | constanreedjohn/mmocr | 8f638f11fff56c5f4969a350c88ab013849b7fd4 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
import math
import torch
import torch.nn as nn
from mmocr.models.builder import LOSSES
@LOSSES.register_module()
class CTCLoss(nn.Module):
"""Implementation of loss module for CTC-loss based text recognition.
Args:
flatten (bool): If True, use flatten... | 35.5 | 79 | 0.603873 |
795d40a012adef73e86ffcc6d8a9ac6124c84840 | 4,180 | py | Python | discovery-infra/install_cluster.py | avishayt/assisted-test-infra | 9bb74bff17515c4e0842b03b293de7d163079409 | [
"Apache-2.0"
] | null | null | null | discovery-infra/install_cluster.py | avishayt/assisted-test-infra | 9bb74bff17515c4e0842b03b293de7d163079409 | [
"Apache-2.0"
] | null | null | null | discovery-infra/install_cluster.py | avishayt/assisted-test-infra | 9bb74bff17515c4e0842b03b293de7d163079409 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import argparse
import bm_inventory_api
import consts
import utils
import waiting
from logger import log
# Verify folder to download kubeconfig exists. If will be needed in other places move to utils
def _verify_kube_download_folder(kubeconfig_path):
if not utils.folde... | 32.153846 | 94 | 0.701675 |
795d41358b20cebf9d4077ba0261b1cb0b42f6e1 | 2,041 | py | Python | src/falcon_management/manager.py | chris-cmsoft/falcon-management | 4299f450cfc2513e3bd4aa63677d26e287fbe61b | [
"MIT"
] | 1 | 2019-03-11T14:22:46.000Z | 2019-03-11T14:22:46.000Z | src/falcon_management/manager.py | chris-cmsoft/falcon-management | 4299f450cfc2513e3bd4aa63677d26e287fbe61b | [
"MIT"
] | null | null | null | src/falcon_management/manager.py | chris-cmsoft/falcon-management | 4299f450cfc2513e3bd4aa63677d26e287fbe61b | [
"MIT"
] | null | null | null | import sys
from .exceptions import \
NoCommandSpecified, \
CommandNotFound, \
CommandFailed
from .logger import error
class CommandManager():
def __init__(self, commands: dict = None):
if not commands:
commands = dict()
self.commands = commands
def execute(self):
... | 28.347222 | 72 | 0.561489 |
795d41b12eb400e02c93f1b3d9b6b15cd8f05e2d | 1,864 | py | Python | Udemy/Secao5/aula126/aula126.py | rafaelgama/Curso_Python | 908231de9de4a17f5aa829f2671fd88de9261eda | [
"MIT"
] | 1 | 2020-05-07T20:21:15.000Z | 2020-05-07T20:21:15.000Z | Udemy/Secao5/aula126/aula126.py | rafaelgama/Curso_Python | 908231de9de4a17f5aa829f2671fd88de9261eda | [
"MIT"
] | null | null | null | Udemy/Secao5/aula126/aula126.py | rafaelgama/Curso_Python | 908231de9de4a17f5aa829f2671fd88de9261eda | [
"MIT"
] | null | null | null | # OS, SYS, FNMATCH - Convertendo vídeos com Python + FFMPEG
# https://ffmpeg.org/ffmpeg.html - Documentação.
# https://ffmpeg.zeranoe.com/builds/
import os
import fnmatch
import sys
if sys.platform == 'win32':
comando_ffmpeg = r'D:\GitHub\Curso_Python\Udemy\Secao5\aula126\ffmpeg\ffmpeg.exe'
codec_video = '-c:v ... | 31.066667 | 85 | 0.642167 |
795d41bf978a176a04db28307f4d52eb1d63385c | 14,695 | py | Python | covid_19/runners/forced_autoencoder.py | ShreeshaN/COVID_19 | 02bf2559801491bed53f839c20fe931f4f1ccff6 | [
"MIT"
] | null | null | null | covid_19/runners/forced_autoencoder.py | ShreeshaN/COVID_19 | 02bf2559801491bed53f839c20fe931f4f1ccff6 | [
"MIT"
] | null | null | null | covid_19/runners/forced_autoencoder.py | ShreeshaN/COVID_19 | 02bf2559801491bed53f839c20fe931f4f1ccff6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@created on: 3/1/21,
@author: Shreesha N,
@version: v0.0.1
@system name: badgod
Description:
..todo::
"""
import json
import random
import time
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
from covid_19.networks.conv_ae import ConvAutoEncoder
from co... | 49.312081 | 131 | 0.599456 |
795d434aba1de70f18d206d361fd6b593014f2e7 | 1,495 | py | Python | 51.py | wilbertgeng/LeetCode_exercise | f00c08e0d28ffa88d61d4262c6d1f49f1fa91ebc | [
"MIT"
] | null | null | null | 51.py | wilbertgeng/LeetCode_exercise | f00c08e0d28ffa88d61d4262c6d1f49f1fa91ebc | [
"MIT"
] | null | null | null | 51.py | wilbertgeng/LeetCode_exercise | f00c08e0d28ffa88d61d4262c6d1f49f1fa91ebc | [
"MIT"
] | null | null | null | """51. N-Queens"""
class Solution(object):
def solveNQueens(self, n):
"""
:type n: int
:rtype: List[List[str]]
"""
## Practice:
res = []
nums = [-1]*n
self.dfs(nums, 0, [], res)
return res
def dfs(self, nums, index, path, res):
if... | 27.181818 | 81 | 0.458194 |
795d436c3b954fa9ef55e92b3df3d1138ed053fe | 1,190 | py | Python | Lib/test/test_importlib/source/test_path_hook.py | shawwn/cpython | 0ff8a3b374286d2218fc18f47556a5ace202dad3 | [
"0BSD"
] | 52,316 | 2015-01-01T15:56:25.000Z | 2022-03-31T23:19:01.000Z | Lib/test/test_importlib/source/test_path_hook.py | shawwn/cpython | 0ff8a3b374286d2218fc18f47556a5ace202dad3 | [
"0BSD"
] | 25,286 | 2015-03-03T23:18:02.000Z | 2022-03-31T23:17:27.000Z | Lib/test/test_importlib/source/test_path_hook.py | shawwn/cpython | 0ff8a3b374286d2218fc18f47556a5ace202dad3 | [
"0BSD"
] | 31,623 | 2015-01-01T13:29:37.000Z | 2022-03-31T19:55:06.000Z | from .. import util
machinery = util.import_importlib('importlib.machinery')
import unittest
class PathHookTest:
"""Test the path hook for source."""
def path_hook(self):
return self.machinery.FileFinder.path_hook((self.machinery.SourceFileLoader,
self.machinery.SOURCE_SUFFIXES))
... | 28.333333 | 84 | 0.645378 |
795d441cc5537e9294ee35954424cd8ca3a8b4d9 | 882 | py | Python | test/match.py | mjpieters/intervaltree | 6a731f2ce9f658cd6b8da2f7e23e96642643be54 | [
"Apache-2.0"
] | 1 | 2018-09-26T07:07:05.000Z | 2018-09-26T07:07:05.000Z | test/match.py | mjpieters/intervaltree | 6a731f2ce9f658cd6b8da2f7e23e96642643be54 | [
"Apache-2.0"
] | null | null | null | test/match.py | mjpieters/intervaltree | 6a731f2ce9f658cd6b8da2f7e23e96642643be54 | [
"Apache-2.0"
] | null | null | null | """
intervaltree: A mutable, self-balancing interval tree for Python 2 and 3.
Queries may be by point, by range overlap, or by range envelopment.
Test module: IntervalTree, test utilities
Copyright 2013-2017 Chaim-Leib Halbert
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file ... | 31.5 | 73 | 0.785714 |
795d446aa1174c392ee6def3b5b9a10f0254e06e | 36,723 | py | Python | sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_custom_domains_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_custom_domains_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_custom_domains_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 51.577247 | 245 | 0.665795 |
795d4803d839d204063168c97890e52f92c20607 | 303 | py | Python | arithmetic_03/test/test_even_multiple_of_3.py | njoroge33/py_learn | 6ad55f37789045bc5c03f3dd668cf1ea497f4e84 | [
"MIT"
] | null | null | null | arithmetic_03/test/test_even_multiple_of_3.py | njoroge33/py_learn | 6ad55f37789045bc5c03f3dd668cf1ea497f4e84 | [
"MIT"
] | 2 | 2019-04-15T06:29:55.000Z | 2019-04-19T17:34:32.000Z | arithmetic_03/test/test_even_multiple_of_3.py | njoroge33/py_learn | 6ad55f37789045bc5c03f3dd668cf1ea497f4e84 | [
"MIT"
] | 1 | 2019-11-19T04:51:18.000Z | 2019-11-19T04:51:18.000Z | import pytest
from ..even_multiple_of_3 import even_multiple_of_3
@pytest.mark.parametrize('number, expected', [
(300, True),
(240, True),
(15, False),
(51, False)
])
def test_even_multiple_of_3(number, expected):
actual = even_multiple_of_3(number)
assert actual == expected
| 20.2 | 51 | 0.69637 |
795d48d30ea07508afa6482be2425676b50ec7ec | 985 | py | Python | forums-flask/app/dummy_data.py | amohamme/ForumsWorkshop | 825b059710bb7d94f9ff861fd8bcbdf056a43967 | [
"MIT"
] | null | null | null | forums-flask/app/dummy_data.py | amohamme/ForumsWorkshop | 825b059710bb7d94f9ff861fd8bcbdf056a43967 | [
"MIT"
] | 1 | 2018-02-09T13:18:11.000Z | 2018-02-09T19:30:39.000Z | forums-flask/app/dummy_data.py | amohamme/ForumWorkshop | 825b059710bb7d94f9ff861fd8bcbdf056a43967 | [
"MIT"
] | null | null | null | from app import models
dummy_members = [
models.member("Mohammed", 20),
models.member("Mohammed", 22),
models.member("Abdo", 25),
]
dummy_posts = [
models.post("Agriculture", "Agriculture is amazing", dummy_members[0].id),
models.post("Engineering", "I love engineering", dummy_members[0].id),
... | 33.965517 | 78 | 0.685279 |
795d49bd9f930f73cb767ceb931e596ada9b7319 | 1,988 | py | Python | becpy/physics/trapped_hartree_fock.py | BEC-Trento/becpy | 9094052cc856fe1b533d933a42a86398fc77591c | [
"MIT"
] | null | null | null | becpy/physics/trapped_hartree_fock.py | BEC-Trento/becpy | 9094052cc856fe1b533d933a42a86398fc77591c | [
"MIT"
] | null | null | null | becpy/physics/trapped_hartree_fock.py | BEC-Trento/becpy | 9094052cc856fe1b533d933a42a86398fc77591c | [
"MIT"
] | 1 | 2022-03-23T22:20:56.000Z | 2022-03-23T22:20:56.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Created: 08-2020 - Carmelo Mordini <carmelo> <carmelo.mordini@unitn.it>
"""
Functions and formulas for HF theory of a trapped Bose gas
Refs:
[1] Pitaevskii, Stringari, Bose-Einstein condensation and superfluidity, 2nd ed. Chap 13
[2] S. Giorgini, L. P. Pitaevskii, and ... | 25.487179 | 88 | 0.590543 |
795d49e87479ba36190cd3830af59a52f58b6520 | 397 | py | Python | socialbook/asgi.py | LoisaKitakaya/socialbook | 4b7e992bef3674fb4d0974c27a72cc12b3f992e1 | [
"MIT"
] | null | null | null | socialbook/asgi.py | LoisaKitakaya/socialbook | 4b7e992bef3674fb4d0974c27a72cc12b3f992e1 | [
"MIT"
] | null | null | null | socialbook/asgi.py | LoisaKitakaya/socialbook | 4b7e992bef3674fb4d0974c27a72cc12b3f992e1 | [
"MIT"
] | null | null | null | """
ASGI config for socialbook 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.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SE... | 23.352941 | 78 | 0.788413 |
795d4a9551d0e4aee96eb6aee4b5e90d8d6dfc12 | 321 | py | Python | hypernetworks/core/HTConfig.py | rdchar/HypernetworkTheory | d18696c5ac8db3c8633d4441b8932b9a4c1efbd4 | [
"MIT"
] | null | null | null | hypernetworks/core/HTConfig.py | rdchar/HypernetworkTheory | d18696c5ac8db3c8633d4441b8932b9a4c1efbd4 | [
"MIT"
] | null | null | null | hypernetworks/core/HTConfig.py | rdchar/HypernetworkTheory | d18696c5ac8db3c8633d4441b8932b9a4c1efbd4 | [
"MIT"
] | null | null | null | # This file will provide a common set of config
hs_expand_R = True
# TODO needs more work to replace current Hs.
# Will probably need to check part_of relations.
# Currently the replacement makes a mess!
hs_replace_same_vertex = False
# TODO add load yaml to set these config parameters.
hs_default_N = True... | 26.75 | 53 | 0.757009 |
795d4a97d54f38994b258631b264f3e264c4d67f | 24,440 | py | Python | agent_zoo/RoboschoolInvertedPendulum_v0_2017may.py | Mihir-Mavalankar/DeepRL_SymmetricAntGait | 6f1e14f53b2b1369dbc218ac888dfbd2ecbe9ffa | [
"MIT"
] | null | null | null | agent_zoo/RoboschoolInvertedPendulum_v0_2017may.py | Mihir-Mavalankar/DeepRL_SymmetricAntGait | 6f1e14f53b2b1369dbc218ac888dfbd2ecbe9ffa | [
"MIT"
] | null | null | null | agent_zoo/RoboschoolInvertedPendulum_v0_2017may.py | Mihir-Mavalankar/DeepRL_SymmetricAntGait | 6f1e14f53b2b1369dbc218ac888dfbd2ecbe9ffa | [
"MIT"
] | null | null | null | import gym, roboschool
import numpy as np
def relu(x):
return np.maximum(x, 0)
class SmallReactivePolicy:
"Simple multi-layer perceptron policy, no internal state"
def __init__(self, observation_space, action_space):
assert weights_dense1_w.shape == (observation_space.shape[0], 64)
assert ... | 148.121212 | 606 | 0.550941 |
795d4b10839527c11d19e61ecc8f9f0311cd86d3 | 2,342 | py | Python | zenml/core/pipelines/utils.py | birdiesanders/zenml | fca11c17ccf941aa14920ef4eab470b94b26ccbe | [
"Apache-2.0"
] | 1 | 2021-05-04T17:11:23.000Z | 2021-05-04T17:11:23.000Z | zenml/core/pipelines/utils.py | birdiesanders/zenml | fca11c17ccf941aa14920ef4eab470b94b26ccbe | [
"Apache-2.0"
] | null | null | null | zenml/core/pipelines/utils.py | birdiesanders/zenml | fca11c17ccf941aa14920ef4eab470b94b26ccbe | [
"Apache-2.0"
] | 1 | 2020-12-27T08:16:42.000Z | 2020-12-27T08:16:42.000Z | # Copyright (c) maiot GmbH 2020. 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... | 28.216867 | 77 | 0.65585 |
795d4b73b45d89a9154db78bb7b3208669235083 | 811 | py | Python | buildbuild/api/tests/test_api_team_detail.py | buildbuild/buildbuild | ebf9e8abf7d5e018c6c5a8fc640d5cc0caaa43ac | [
"BSD-3-Clause"
] | 5 | 2015-07-22T08:13:45.000Z | 2018-12-10T05:21:41.000Z | buildbuild/api/tests/test_api_team_detail.py | buildbuild/buildbuild | ebf9e8abf7d5e018c6c5a8fc640d5cc0caaa43ac | [
"BSD-3-Clause"
] | 2 | 2020-06-05T18:39:48.000Z | 2021-06-10T20:36:06.000Z | buildbuild/api/tests/test_api_team_detail.py | buildbuild/buildbuild | ebf9e8abf7d5e018c6c5a8fc640d5cc0caaa43ac | [
"BSD-3-Clause"
] | 1 | 2015-07-22T08:13:49.000Z | 2015-07-22T08:13:49.000Z | from django.test import TestCase
from django.test.client import Client
from teams.models import Team
class TestAPITeamDetail(TestCase):
def setUp(self):
self.team = Team.objects.create_team(
name="test_teamname"
)
self.client = Client()
self.response = self.client.get(... | 33.791667 | 77 | 0.721332 |
795d4b7a9801768874e0d5f7fc8fed65b408bcbf | 76 | py | Python | bi_lstm_crf/__init__.py | sheeptako/bi-lstm-crf | 5a8a4f15d085b716ef654f6ca0eba03e579c1009 | [
"MIT"
] | 1 | 2019-12-04T05:41:37.000Z | 2019-12-04T05:41:37.000Z | bi_lstm_crf/__init__.py | sheeptako/bi-lstm-crf | 5a8a4f15d085b716ef654f6ca0eba03e579c1009 | [
"MIT"
] | null | null | null | bi_lstm_crf/__init__.py | sheeptako/bi-lstm-crf | 5a8a4f15d085b716ef654f6ca0eba03e579c1009 | [
"MIT"
] | null | null | null | from .model import CRF, BiRnnCrf
__version__ = '0.1.1'
__license__ = 'MIT'
| 15.2 | 32 | 0.710526 |
795d4c085f4c1748b7be4c32784dcc649f7cb2d9 | 103 | py | Python | src/gemini3d/tests/config/__init__.py | qwsae10/pygemini | adc6b2401ac9fc8b7cb1fc8870322f730a3383a3 | [
"Apache-2.0"
] | 4 | 2020-12-08T15:59:31.000Z | 2021-09-22T02:49:11.000Z | src/gemini3d/tests/config/__init__.py | gemini3d/PyGemini | ef5be10eb6b25814e40698b05c684dbe65b9fbd9 | [
"Apache-2.0"
] | 8 | 2021-02-11T19:32:41.000Z | 2022-03-13T19:55:29.000Z | src/gemini3d/tests/config/__init__.py | gemini3d/PyGemini | ef5be10eb6b25814e40698b05c684dbe65b9fbd9 | [
"Apache-2.0"
] | 1 | 2021-07-19T23:31:47.000Z | 2021-07-19T23:31:47.000Z | # Keep this file to allow the following:
#
# importlib.resources.<func>(f"{__package__}.config, ...)
| 25.75 | 59 | 0.68932 |
795d4eff64899f91b669d5c04606b9237564912f | 2,281 | py | Python | easyquotation/sina.py | zhengle2008/easyquotation | de062ffa56dd361d23a2f4f620050797519d02a3 | [
"MIT"
] | null | null | null | easyquotation/sina.py | zhengle2008/easyquotation | de062ffa56dd361d23a2f4f620050797519d02a3 | [
"MIT"
] | null | null | null | easyquotation/sina.py | zhengle2008/easyquotation | de062ffa56dd361d23a2f4f620050797519d02a3 | [
"MIT"
] | null | null | null | # coding:utf8
import re
from .basequotation import BaseQuotation
def _random(n=13):
from random import randint
start = 10**(n-1)
end = (10**n)-1
return str(randint(start, end))
class Sina(BaseQuotation):
"""新浪免费行情获取"""
max_num = 800
grep_detail = re.compile(
r"(\d+)=([^\s][^,]+... | 33.057971 | 79 | 0.482245 |
795d4f3b4a2495653f773adc2d822cf7c4ff272d | 1,619 | py | Python | tests/test_rangestr.py | keyfox/rangestr | 3a8f1fac51b21b7033f75673ecfa5720688a2efc | [
"MIT"
] | null | null | null | tests/test_rangestr.py | keyfox/rangestr | 3a8f1fac51b21b7033f75673ecfa5720688a2efc | [
"MIT"
] | null | null | null | tests/test_rangestr.py | keyfox/rangestr | 3a8f1fac51b21b7033f75673ecfa5720688a2efc | [
"MIT"
] | null | null | null | import functools
import pytest
from parameterized import param, parameterized
from rangestr import rangestr
from tests import testcases
class TestRangestr:
# This test won't focus on parsing because the parsing of input is
# supposed to be done in `parsers.parse_ranges`.
def test_rangestr(self):
... | 34.446809 | 79 | 0.620754 |
795d4f4a083bbdc808cd877324bb1710c70d56f4 | 10,908 | py | Python | pytorch/pytorchcv/models/sknet.py | naviocean/imgclsmob | f2993d3ce73a2f7ddba05da3891defb08547d504 | [
"MIT"
] | 2,649 | 2018-08-03T14:18:00.000Z | 2022-03-31T08:08:17.000Z | pytorch/pytorchcv/models/sknet.py | naviocean/imgclsmob | f2993d3ce73a2f7ddba05da3891defb08547d504 | [
"MIT"
] | 95 | 2018-08-13T01:46:03.000Z | 2022-03-13T08:38:14.000Z | pytorch/pytorchcv/models/sknet.py | naviocean/imgclsmob | f2993d3ce73a2f7ddba05da3891defb08547d504 | [
"MIT"
] | 549 | 2018-08-06T08:09:22.000Z | 2022-03-31T08:08:21.000Z | """
SKNet for ImageNet-1K, implemented in PyTorch.
Original paper: 'Selective Kernel Networks,' https://arxiv.org/abs/1903.06586.
"""
__all__ = ['SKNet', 'sknet50', 'sknet101', 'sknet152']
import os
import torch.nn as nn
import torch.nn.init as init
from .common import conv1x1, conv1x1_block, conv3x3_block, C... | 29.560976 | 115 | 0.583975 |
795d4fb40e6dc2b1afce87be14c0c8151127f500 | 1,269 | py | Python | src/addTokensAndCats.py | rob-dalton/amazonfeatures-feature-extraction | dcaf2623d97ce9130cdb85a28b02d73a34d6822a | [
"MIT"
] | 1 | 2016-11-11T15:08:52.000Z | 2016-11-11T15:08:52.000Z | src/addTokensAndCats.py | rob-dalton/amazon-feature-extractor | eca9b376423fdac9fdecb6dee551673d54a80aba | [
"MIT"
] | null | null | null | src/addTokensAndCats.py | rob-dalton/amazon-feature-extractor | eca9b376423fdac9fdecb6dee551673d54a80aba | [
"MIT"
] | 1 | 2016-12-14T07:16:40.000Z | 2016-12-14T07:16:40.000Z | """
========================================================================
-----------------------------------------------------------------------
ADD TOKENS AND CATEGORIES TO DATA
-----------------------------------------------------------------------
=================================================================... | 28.2 | 77 | 0.520883 |
795d5062cbbac8091941ef19349affc07608fbdd | 2,720 | py | Python | napari/layers/_markers_layer/view/controls.py | donovanr/napari | 580b5eab8cc40af53aef780a65adb9216d968a32 | [
"BSD-3-Clause"
] | null | null | null | napari/layers/_markers_layer/view/controls.py | donovanr/napari | 580b5eab8cc40af53aef780a65adb9216d968a32 | [
"BSD-3-Clause"
] | null | null | null | napari/layers/_markers_layer/view/controls.py | donovanr/napari | 580b5eab8cc40af53aef780a65adb9216d968a32 | [
"BSD-3-Clause"
] | null | null | null | from PyQt5.QtCore import Qt
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QButtonGroup, QVBoxLayout, QRadioButton, QFrame
class QtMarkersControls(QFrame):
def __init__(self, layer):
super().__init__()
self.layer = layer
self.layer.events.mode.connect(self.set_mode)
se... | 29.89011 | 75 | 0.638235 |
795d50c10ff65a71b4795c06a3871d2673d0106d | 19 | py | Python | __init__.py | elegantwist/slothtest | 0c5e5fa6f06c6089f6d1ac0e667d33abeda989bf | [
"MIT"
] | 12 | 2019-02-04T09:13:09.000Z | 2019-04-17T07:02:54.000Z | __init__.py | elegantwist/slothtest | 0c5e5fa6f06c6089f6d1ac0e667d33abeda989bf | [
"MIT"
] | null | null | null | __init__.py | elegantwist/slothtest | 0c5e5fa6f06c6089f6d1ac0e667d33abeda989bf | [
"MIT"
] | null | null | null | name = "slothtest"
| 9.5 | 18 | 0.684211 |
795d51c881c9f44f67d7d9285698015c48fe9d2e | 4,853 | py | Python | ml_demo/preprocessing.py | mmqm4544/rta | 6e34e4f9eace2f58bb7376603de6f144a0b0658b | [
"MIT"
] | 2 | 2019-02-14T02:33:15.000Z | 2019-02-14T02:33:17.000Z | ml_demo/preprocessing.py | mmqm4544/rta | 6e34e4f9eace2f58bb7376603de6f144a0b0658b | [
"MIT"
] | null | null | null | ml_demo/preprocessing.py | mmqm4544/rta | 6e34e4f9eace2f58bb7376603de6f144a0b0658b | [
"MIT"
] | null | null | null | import time
from datetime import datetime
from db import DATE_FORMAT
class Preprocessor(object):
pass
class SQLPreprocessor(Preprocessor):
def __init__(self, client, table_name):
self.client = client
self.table_name = table_name
self.meta_data = client.getTableSchema(self.table_name)... | 40.781513 | 100 | 0.597156 |
795d52465b133c5cd70682d67ee9dddb612517aa | 727 | py | Python | quotesbot/spiders/toscrape-css.py | naveen1083/GetTweetUserinfo_v3 | 5fe2b98d73ea4ec3ff4f33d690f3d99dcbc9fa57 | [
"MIT"
] | null | null | null | quotesbot/spiders/toscrape-css.py | naveen1083/GetTweetUserinfo_v3 | 5fe2b98d73ea4ec3ff4f33d690f3d99dcbc9fa57 | [
"MIT"
] | null | null | null | quotesbot/spiders/toscrape-css.py | naveen1083/GetTweetUserinfo_v3 | 5fe2b98d73ea4ec3ff4f33d690f3d99dcbc9fa57 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import scrapy
class ToScrapeCSSSpider(scrapy.Spider):
pass
# name = "toscrape-css"
# start_urls = [
# 'http://quotes.toscrape.com/',
# ]
# def parse(self, response):
# for quote in response.css("div.quote"):
# yield {
# 'tex... | 29.08 | 81 | 0.543329 |
795d54000f8ce4f5c1766524b6a47f2f1fb3de9b | 6,986 | py | Python | backend/utawala_main_altar_29305/settings.py | crowdbotics-apps/utawala-main-altar-29305 | f450b7e301bc63a8400e7a9b0e39f4b7f931e2fd | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/utawala_main_altar_29305/settings.py | crowdbotics-apps/utawala-main-altar-29305 | f450b7e301bc63a8400e7a9b0e39f4b7f931e2fd | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/utawala_main_altar_29305/settings.py | crowdbotics-apps/utawala-main-altar-29305 | f450b7e301bc63a8400e7a9b0e39f4b7f931e2fd | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
Django settings for utawala_main_altar_29305 project.
Generated by 'django-admin startproject' using Django 2.2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
... | 29.352941 | 99 | 0.729029 |
795d5469f8ee3b91d08225d87c05e04a1b22ebc1 | 5,745 | py | Python | flow/controllers/velocity_controllers.py | alt113/flow-triangle-scenario | 42451365c5760d5b6b7aa2507985652ec7ba9a72 | [
"MIT"
] | null | null | null | flow/controllers/velocity_controllers.py | alt113/flow-triangle-scenario | 42451365c5760d5b6b7aa2507985652ec7ba9a72 | [
"MIT"
] | null | null | null | flow/controllers/velocity_controllers.py | alt113/flow-triangle-scenario | 42451365c5760d5b6b7aa2507985652ec7ba9a72 | [
"MIT"
] | null | null | null | from flow.controllers.base_controller import BaseController
import numpy as np
class FollowerStopper(BaseController):
"""Inspired by Dan Work's... work:
Dissipation of stop-and-go waves via control of autonomous vehicles:
Field experiments https://arxiv.org/abs/1705.01693
Parameters
----------
... | 31.393443 | 79 | 0.574587 |
795d5483d423f3fe0ff236d25da95d41dc402e7f | 9,009 | py | Python | alipay/aop/api/domain/AlipayIserviceItaskProcessDetailModifyModel.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayIserviceItaskProcessDetailModifyModel.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayIserviceItaskProcessDetailModifyModel.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.ExtendFieldInfo import ExtendFieldInfo
class AlipayIserviceItaskProcessDetailModifyModel(object):
def __init__(self):
self._app_name = None
self... | 38.665236 | 101 | 0.651682 |
795d5495611b95010f95afe9eeac78d8a01755d3 | 1,168 | py | Python | api/schemas.py | gmos2104/poke-query | 7c44805cdcffc75d4e075c61ece07b92028a1a3f | [
"MIT"
] | null | null | null | api/schemas.py | gmos2104/poke-query | 7c44805cdcffc75d4e075c61ece07b92028a1a3f | [
"MIT"
] | null | null | null | api/schemas.py | gmos2104/poke-query | 7c44805cdcffc75d4e075c61ece07b92028a1a3f | [
"MIT"
] | null | null | null | from marshmallow import Schema, fields
class PokemonListItemSchema(Schema):
id = fields.Int()
name = fields.String()
image = fields.String()
class PokemonListSchema(Schema):
count = fields.Int()
limit = fields.String()
offset = fields.String()
data = fields.List(fields.Nested(PokemonList... | 25.955556 | 60 | 0.678938 |
795d550db920bbecf69b0a2730e0bb914ea2a22f | 3,051 | py | Python | test/test_nn_models.py | ColeMiles/QGasML | b8674f21047ae409681566ce1524db7bc9c07d42 | [
"MIT"
] | 3 | 2021-07-11T11:59:00.000Z | 2021-12-23T16:53:20.000Z | test/test_nn_models.py | KimGroup/QGasML | 3ad303b7022bd5220bd2d4a6e4fd9ddb35b0d2ec | [
"MIT"
] | null | null | null | test/test_nn_models.py | KimGroup/QGasML | 3ad303b7022bd5220bd2d4a6e4fd9ddb35b0d2ec | [
"MIT"
] | 1 | 2021-07-21T01:06:45.000Z | 2021-07-21T01:06:45.000Z | import os
import sys
import itertools
import numpy as np
import torch
import pytest
SCRIPTPATH = os.path.abspath(__file__)
REPODIR = os.path.split(os.path.split(SCRIPTPATH)[0])[0]
sys.path.append(REPODIR)
import nn_models
@pytest.fixture
def fake_snapshots():
""" Return a batch of 5 random 'snapshots' """
... | 29.621359 | 102 | 0.630285 |
795d5683ebd9c00c2dc36f1765c3a571d4ba0ee4 | 2,143 | py | Python | uploadartwork/migrations/0001_initial.py | Naveed-anwar123/artsfrica | f9820fdc2fc00a9a8bcaad22d6335b8629275a0b | [
"MIT"
] | null | null | null | uploadartwork/migrations/0001_initial.py | Naveed-anwar123/artsfrica | f9820fdc2fc00a9a8bcaad22d6335b8629275a0b | [
"MIT"
] | null | null | null | uploadartwork/migrations/0001_initial.py | Naveed-anwar123/artsfrica | f9820fdc2fc00a9a8bcaad22d6335b8629275a0b | [
"MIT"
] | null | null | null | # Generated by Django 2.2.2 on 2019-12-10 03:48
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import uploadartwork.models
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH... | 43.734694 | 128 | 0.60616 |
795d56c0357fe5603ad23e458f453fcbfaeca917 | 475 | py | Python | django/llama/llama/custom_storage.py | ckeitt/llama | 3dcca7be1c99fb5b033208f522bb02d5400c7a52 | [
"MIT"
] | null | null | null | django/llama/llama/custom_storage.py | ckeitt/llama | 3dcca7be1c99fb5b033208f522bb02d5400c7a52 | [
"MIT"
] | 13 | 2020-06-05T22:37:10.000Z | 2022-03-12T00:04:53.000Z | django/llama/llama/custom_storage.py | ckeitt/llama | 3dcca7be1c99fb5b033208f522bb02d5400c7a52 | [
"MIT"
] | null | null | null | import os
from django.conf import settings
from storages.backends.s3boto3 import S3Boto3Storage
class StaticStorage(S3Boto3Storage):
location = settings.AWS_STATIC_LOCATION
class PublicMediaStorage(S3Boto3Storage):
location = settings.AWS_PUBLIC_MEDIA_LOCATION
file_overwrite = False
class PrivateMediaSt... | 26.388889 | 52 | 0.804211 |
795d56cd206c619bb09440e6aa09fb7b3350d6fe | 921 | py | Python | networking_odl/db/migration/alembic_migrations/versions/pike/contract/7cbef5a56298_drop_created_at_column.py | gokarslan/networking-odl2 | 6a6967832b2c02dfcff6a9f0ab6e36472b849ce8 | [
"Apache-2.0"
] | null | null | null | networking_odl/db/migration/alembic_migrations/versions/pike/contract/7cbef5a56298_drop_created_at_column.py | gokarslan/networking-odl2 | 6a6967832b2c02dfcff6a9f0ab6e36472b849ce8 | [
"Apache-2.0"
] | null | null | null | networking_odl/db/migration/alembic_migrations/versions/pike/contract/7cbef5a56298_drop_created_at_column.py | gokarslan/networking-odl2 | 6a6967832b2c02dfcff6a9f0ab6e36472b849ce8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017, NEC Corp.
#
# 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 ... | 27.909091 | 78 | 0.732899 |
795d56f74633f070003ee9f55a5a70f4c1e70ac7 | 696 | py | Python | venv/bin/rstpep2html.py | owenabrams/greyapp | 05e1a7a7719f9974cb4424154c11338567383f96 | [
"MIT"
] | null | null | null | venv/bin/rstpep2html.py | owenabrams/greyapp | 05e1a7a7719f9974cb4424154c11338567383f96 | [
"MIT"
] | null | null | null | venv/bin/rstpep2html.py | owenabrams/greyapp | 05e1a7a7719f9974cb4424154c11338567383f96 | [
"MIT"
] | null | null | null | #!/Users/tiffgravel/greyapp/venv/bin/python3
# $Id: rstpep2html.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
A minimal front end to the Docutils Publisher, producing HTML from PEP
(Python Enhancement Proposal) do... | 26.769231 | 76 | 0.729885 |
795d59f2d42f370efb32b565cc28647c87bf67fe | 9,197 | py | Python | py3k-sympy/sympy/simplify/cse_main.py | cielavenir/sympy | ada04faf48a4eb6c1529e8a5d49a6f2f9ce2616e | [
"BSD-3-Clause"
] | null | null | null | py3k-sympy/sympy/simplify/cse_main.py | cielavenir/sympy | ada04faf48a4eb6c1529e8a5d49a6f2f9ce2616e | [
"BSD-3-Clause"
] | null | null | null | py3k-sympy/sympy/simplify/cse_main.py | cielavenir/sympy | ada04faf48a4eb6c1529e8a5d49a6f2f9ce2616e | [
"BSD-3-Clause"
] | null | null | null | """ Tools for doing common subexpression elimination.
"""
import bisect
import difflib
from sympy import Basic, Mul, Add
from sympy.utilities.iterables import preorder_traversal, numbered_symbols
from . import cse_opts
# (preprocessor, postprocessor) pairs which are commonly useful. They should
# each take a sympy e... | 38.805907 | 82 | 0.630423 |
795d59fccb826beaafcf30de1e588e9d67750a9e | 38,346 | py | Python | manila/share/drivers/zfsonlinux/driver.py | a-ovchinnikov/manila-lxd-backup | 0e0229b1addaf6108f4897a840dcc82c383da083 | [
"Apache-2.0"
] | null | null | null | manila/share/drivers/zfsonlinux/driver.py | a-ovchinnikov/manila-lxd-backup | 0e0229b1addaf6108f4897a840dcc82c383da083 | [
"Apache-2.0"
] | null | null | null | manila/share/drivers/zfsonlinux/driver.py | a-ovchinnikov/manila-lxd-backup | 0e0229b1addaf6108f4897a840dcc82c383da083 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Mirantis Inc.
# 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... | 42.701559 | 79 | 0.588614 |
795d5b191b57d72203bd89ca331a18fb98089317 | 17,162 | py | Python | textworld/generator/inform7/tests/test_world2inform7.py | JohnnySun8/TextWorld | 9a54e9d642f7605a0f3ebba3285cdd04047975e2 | [
"MIT"
] | 307 | 2019-05-07T01:51:55.000Z | 2022-03-31T19:35:47.000Z | textworld/generator/inform7/tests/test_world2inform7.py | JohnnySun8/TextWorld | 9a54e9d642f7605a0f3ebba3285cdd04047975e2 | [
"MIT"
] | 84 | 2019-05-08T14:24:36.000Z | 2022-03-31T14:35:16.000Z | textworld/generator/inform7/tests/test_world2inform7.py | JohnnySun8/TextWorld | 9a54e9d642f7605a0f3ebba3285cdd04047975e2 | [
"MIT"
] | 70 | 2019-05-21T21:36:56.000Z | 2022-02-28T12:04:27.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
import itertools
import textworld
from textworld import g_rng
from textworld.utils import make_temp_directory
from textworld.core import EnvInfos
from textworld.generator.data import KnowledgeBase
from textworld.generator ... | 35.605809 | 93 | 0.639145 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.