hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b0ffb0ea2de79771b65efeb1344c1df4111baf61 | 27,655 | py | Python | mysite_env/Lib/site-packages/pip/_vendor/requests/utils.py | Hongyil1/Django-learning-project | 13d4a5731f81a538e91d8fc7fad0587245056aea | [
"Apache-2.0"
] | null | null | null | mysite_env/Lib/site-packages/pip/_vendor/requests/utils.py | Hongyil1/Django-learning-project | 13d4a5731f81a538e91d8fc7fad0587245056aea | [
"Apache-2.0"
] | null | null | null | mysite_env/Lib/site-packages/pip/_vendor/requests/utils.py | Hongyil1/Django-learning-project | 13d4a5731f81a538e91d8fc7fad0587245056aea | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
requests.utils
~~~~~~~~~~~~~~
This module provides utility functions that are used within Requests
that are also useful for external consumption.
"""
import cgi
import codecs
import collections
import contextlib
import io
import os
import platform
import re
import socket
import struct
imp... | 30.558011 | 118 | 0.608642 |
74f1e16e11d224e3c01dc1d052dbf3e0ce56a35b | 1,612 | py | Python | mandelbrot.py | iuculano/py-fractal | 4f0847358d5d4ad9ea70f2e312ced45eadf43b51 | [
"MIT"
] | null | null | null | mandelbrot.py | iuculano/py-fractal | 4f0847358d5d4ad9ea70f2e312ced45eadf43b51 | [
"MIT"
] | null | null | null | mandelbrot.py | iuculano/py-fractal | 4f0847358d5d4ad9ea70f2e312ced45eadf43b51 | [
"MIT"
] | null | null | null | import shutil
import cmath
class Rectangle:
def __init__(self, x, y, width, height):
self.x = x
self.y = y
self.width = width
self.height = height
# Use the terminal size as the number of "pixels" on the screen
viewport = shutil.get_terminal_size()
# https://www.bo... | 26.42623 | 80 | 0.545906 |
78c459b7fa443adbc41109edd7ce4d4119363c10 | 5,001 | py | Python | common/write_categorized_lines.py | jhurley13/automating-cbc | 56017927ed99e649db2f0b6cb8321ab09942a252 | [
"Apache-2.0"
] | 2 | 2020-12-24T16:34:03.000Z | 2021-01-19T04:55:55.000Z | common/write_categorized_lines.py | jhurley13/automating-cbc | 56017927ed99e649db2f0b6cb8321ab09942a252 | [
"Apache-2.0"
] | 44 | 2021-01-15T02:42:15.000Z | 2021-01-31T05:42:54.000Z | common/write_categorized_lines.py | jhurley13/automatingcbc | 56017927ed99e649db2f0b6cb8321ab09942a252 | [
"Apache-2.0"
] | null | null | null | import string
from pathlib import Path
from typing import List
import pandas as pd
import webcolors
from utilities_excel import make_sheet_banded, add_workbook_formats, Xlformat
"""
Write out categorized_lines Excel file. This is used to debug the translations.
note: trying to write this code so it can be used for a ... | 38.175573 | 97 | 0.614877 |
22971dd9132b6d9e1bdd9c66e70c63be14b7d2c8 | 603 | py | Python | WebAXEL/migrations/squashed_migrations/0045_auto_20200107_1314.py | xhackax47/AXEL_WEB | 917cdbdd79ae364327135e09abce9d058dc1271a | [
"MIT"
] | 1 | 2020-01-17T10:51:21.000Z | 2020-01-17T10:51:21.000Z | WebAXEL/migrations/squashed_migrations/0045_auto_20200107_1314.py | xhackax47/AXEL_WEB | 917cdbdd79ae364327135e09abce9d058dc1271a | [
"MIT"
] | 8 | 2021-03-30T12:35:54.000Z | 2022-03-12T00:11:34.000Z | WebAXEL/migrations/squashed_migrations/0045_auto_20200107_1314.py | xhackax47/AXEL_WEB | 917cdbdd79ae364327135e09abce9d058dc1271a | [
"MIT"
] | null | null | null | # Generated by Django 3.0.1 on 2020-01-07 12:14
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('WebAXEL', '0044_auto_20200107_1313'),
]
operations = [
migrations.RemoveField(
model_name='document',
name='categori... | 26.217391 | 136 | 0.623549 |
307fa7990ff701824fe6a2c5093388cd908e9f20 | 6,933 | py | Python | opinions/united_states/state/ala.py | brianwc/juriscraper | f95221c3ab38ef89e642a3f5ed5569f73866d636 | [
"BSD-2-Clause"
] | null | null | null | opinions/united_states/state/ala.py | brianwc/juriscraper | f95221c3ab38ef89e642a3f5ed5569f73866d636 | [
"BSD-2-Clause"
] | null | null | null | opinions/united_states/state/ala.py | brianwc/juriscraper | f95221c3ab38ef89e642a3f5ed5569f73866d636 | [
"BSD-2-Clause"
] | null | null | null | """Scraper for Alabama Supreme Court
CourtID: ala
Court Short Name: Ala. Sup. Ct.
Author: mlr
Reviewer: None
Date created: 2014-07-18
This is one of the most ridiculous scrapers of them all. The list of unusual
hacks includes:
1. We use the _download() method to log into the website and collect cookies
that we lat... | 44.442308 | 124 | 0.628155 |
f851cc4ffbc0a20ad1dfa5b223a2ead66309369c | 4,109 | py | Python | src/manim_onlinetex/manim_onlinetex.py | jsonvillanueva/manim-onlinetex | c142124fca67346e96156e66a675912b8c724238 | [
"MIT"
] | null | null | null | src/manim_onlinetex/manim_onlinetex.py | jsonvillanueva/manim-onlinetex | c142124fca67346e96156e66a675912b8c724238 | [
"MIT"
] | null | null | null | src/manim_onlinetex/manim_onlinetex.py | jsonvillanueva/manim-onlinetex | c142124fca67346e96156e66a675912b8c724238 | [
"MIT"
] | null | null | null | import requests
import urllib
import base64
from manim import config, logger
from manim.utils.tex_file_writing import generate_tex_file
import manim.mobject.svg.tex_mobject
def tex_to_svg_file_online(expression, environment=None, tex_template=None):
"""Takes a tex expression and returns the path to the svg file ... | 37.354545 | 109 | 0.623023 |
37ddc30f2de0208959b8d7a94a88a4267ff2d2ad | 6,739 | py | Python | parlai/agents/drqa/utils.py | zl930216/ParlAI | abf0ad6d1779af0f8ce0b5aed00d2bab71416684 | [
"MIT"
] | 2 | 2017-09-20T21:49:51.000Z | 2018-08-12T06:58:10.000Z | parlai/agents/drqa/utils.py | zl930216/ParlAI | abf0ad6d1779af0f8ce0b5aed00d2bab71416684 | [
"MIT"
] | 7 | 2021-01-12T01:07:03.000Z | 2022-03-12T00:50:45.000Z | parlai/agents/drqa/utils.py | zl930216/ParlAI | abf0ad6d1779af0f8ce0b5aed00d2bab71416684 | [
"MIT"
] | 2 | 2020-10-29T18:14:33.000Z | 2020-11-07T09:46:23.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import torch
import unicodedata
from collections import Counter
from parlai.utils.io import PathManager
from parlai.core... | 33.034314 | 85 | 0.562398 |
f5e512c2e47a19c29a57790c50ac222a58f24375 | 3,067 | py | Python | kokon/commands/load/__init__.py | KoalicjaOtwartyKrakow/backend | 636eb0216ef8c236daec1dfc68f3118cf494d992 | [
"MIT"
] | null | null | null | kokon/commands/load/__init__.py | KoalicjaOtwartyKrakow/backend | 636eb0216ef8c236daec1dfc68f3118cf494d992 | [
"MIT"
] | null | null | null | kokon/commands/load/__init__.py | KoalicjaOtwartyKrakow/backend | 636eb0216ef8c236daec1dfc68f3118cf494d992 | [
"MIT"
] | null | null | null | import click
from pyrnalist import report
from sqlalchemy import text
from kokon.utils.db import DB
from ..seed.generators import generate_accommodation_unit, generate_guest, generate_host
from ..seed import load_dataset, to_sql
from .r3spreadsheet import (
import_ludzi,
import_mieszkania,
import_recepcja,... | 34.852273 | 88 | 0.63254 |
bf28bf91eab242c32da652d351d3d4418fd793ac | 1,226 | py | Python | src/solutions/part2/q131_part_palindrome_v2.py | hychrisli/PyAlgorithms | 71e537180f3b371d0d2cc47b11cb68ec13a8ac68 | [
"Apache-2.0"
] | null | null | null | src/solutions/part2/q131_part_palindrome_v2.py | hychrisli/PyAlgorithms | 71e537180f3b371d0d2cc47b11cb68ec13a8ac68 | [
"Apache-2.0"
] | null | null | null | src/solutions/part2/q131_part_palindrome_v2.py | hychrisli/PyAlgorithms | 71e537180f3b371d0d2cc47b11cb68ec13a8ac68 | [
"Apache-2.0"
] | null | null | null | from src.base.solution import Solution
from src.tests.part2.q131_test_part_palindrome import PartParlindromeTestCases
class PartPalindrome(Solution):
def gen_test_cases(self):
return PartParlindromeTestCases()
def run_test(self, input):
return self.partition(input)
def verify_output(self... | 27.244444 | 78 | 0.527732 |
0b9556e1a2d252d1cc1fa2233a877a14456e0a4f | 3,129 | py | Python | src/zeep/xsd/types/simple.py | davidshepherd7/zeep-request-printer-hacks | 75bad4487572d4dae8db8c2ab79e988a295815d0 | [
"MIT"
] | 1 | 2020-08-25T09:26:56.000Z | 2020-08-25T09:26:56.000Z | src/zeep/xsd/types/simple.py | davidshepherd7/zeep-request-printer-hacks | 75bad4487572d4dae8db8c2ab79e988a295815d0 | [
"MIT"
] | null | null | null | src/zeep/xsd/types/simple.py | davidshepherd7/zeep-request-printer-hacks | 75bad4487572d4dae8db8c2ab79e988a295815d0 | [
"MIT"
] | 1 | 2020-08-27T11:17:56.000Z | 2020-08-27T11:17:56.000Z | import logging
import typing
from lxml import etree
from zeep.exceptions import ValidationError
from zeep.xsd.const import Nil, xsd_ns, xsi_ns
from zeep.xsd.context import XmlParserContext
from zeep.xsd.types.any import AnyType
from zeep.xsd.valueobjects import CompoundValue
if typing.TYPE_CHECKING:
from zeep.xs... | 30.378641 | 78 | 0.600511 |
97b64529478e7e81af657edf1a6abcb64e370dd0 | 3,832 | py | Python | research/cv/single_path_nas/src/dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | research/cv/single_path_nas/src/dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | research/cv/single_path_nas/src/dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# 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... | 36.495238 | 114 | 0.672234 |
c8f16a85577a76374796d748d05b1c96e023d7dd | 1,831 | py | Python | json_schema_compress/json_schema_compress.py | sthagen/python-json_schema_compress | dc145625ddf6b79474a227e9b0f8115cd1e0f62a | [
"MIT"
] | null | null | null | json_schema_compress/json_schema_compress.py | sthagen/python-json_schema_compress | dc145625ddf6b79474a227e9b0f8115cd1e0f62a | [
"MIT"
] | 26 | 2020-07-30T08:13:57.000Z | 2021-01-10T11:23:14.000Z | json_schema_compress/json_schema_compress.py | sthagen/python-json_schema_compress | dc145625ddf6b79474a227e9b0f8115cd1e0f62a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# pylint: disable=line-too-long
"""Add logical documentation here later TODO."""
import json
JSONPATH_SEPARATOR = "/"
def is_description(key):
"""Simple matcher."""
return key == "description"
def anything(key):
"""Simple wildcard."""
return key
def keep_first_sentence_onl... | 27.328358 | 84 | 0.586565 |
09aa5e931ecf7b156c3c2a1a119025290a746c92 | 7,082 | py | Python | utils/generate_dataset.py | neda60/video-summarization-using-FCSN | 3bb42a841ce27d85b6cbde0748a1e5b8beebb2c5 | [
"MIT"
] | null | null | null | utils/generate_dataset.py | neda60/video-summarization-using-FCSN | 3bb42a841ce27d85b6cbde0748a1e5b8beebb2c5 | [
"MIT"
] | null | null | null | utils/generate_dataset.py | neda60/video-summarization-using-FCSN | 3bb42a841ce27d85b6cbde0748a1e5b8beebb2c5 | [
"MIT"
] | 1 | 2020-10-23T15:39:48.000Z | 2020-10-23T15:39:48.000Z | """
Generate Dataset
1. Converting video to frames
2. Extracting features
3. Getting change points
4. User Summary ( for evaluation )
"""
import errno
import os, sys, glob
sys.path.append('../')
# from networks.CNN import ResNet
from networks.CNN import ResNet
from utils.KTS.cpd_auto import cpd_au... | 40.936416 | 125 | 0.613527 |
3dc9fca73bc19e31a0fbe24976c0554c291350b5 | 7,532 | py | Python | sdk/python/pulumi_aws/wafv2/regex_pattern_set.py | JakeGinnivan/pulumi-aws | c91ef78932964ac74eda7f5da81f65b0f1798c93 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/wafv2/regex_pattern_set.py | JakeGinnivan/pulumi-aws | c91ef78932964ac74eda7f5da81f65b0f1798c93 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/wafv2/regex_pattern_set.py | JakeGinnivan/pulumi-aws | c91ef78932964ac74eda7f5da81f65b0f1798c93 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class RegexP... | 49.880795 | 281 | 0.669278 |
8a0ca479de24337bf1e31143970e14f3f9b87001 | 607 | py | Python | pyalertme/zbsensor.py | jamesleesaunders/pi-alertme | f8e8ea69ebe353e4aadcc54d89bb4fe1f5b473e5 | [
"MIT"
] | 16 | 2017-04-29T22:20:46.000Z | 2020-07-30T00:33:33.000Z | pyalertme/zbsensor.py | jamesleesaunders/pi-alertme | f8e8ea69ebe353e4aadcc54d89bb4fe1f5b473e5 | [
"MIT"
] | 36 | 2017-03-11T07:00:37.000Z | 2018-01-04T08:28:50.000Z | pyalertme/zbsensor.py | jamesleesaunders/pyalertme | f8e8ea69ebe353e4aadcc54d89bb4fe1f5b473e5 | [
"MIT"
] | 4 | 2017-10-20T20:49:34.000Z | 2018-11-05T09:57:39.000Z | import logging
from pyalertme.zbdevice import *
class ZBSensor(ZBDevice):
"""
ZigBee Sensor object.
"""
def __init__(self, serial, callback=None):
"""
Sensor Constructor.
:param serial: Serial Object
:param callback: Optional
"""
ZBDevice.__init__(self,... | 21.678571 | 49 | 0.578254 |
1581a5e64c1fba04575e4f2cb7d1daeb7df5bdc0 | 7,192 | py | Python | data store/prototype_implementation/memcached_daemon.py | patiner/spot_characterization | 6747d6640aa020839362e39f8416790e8160a608 | [
"Apache-2.0"
] | null | null | null | data store/prototype_implementation/memcached_daemon.py | patiner/spot_characterization | 6747d6640aa020839362e39f8416790e8160a608 | [
"Apache-2.0"
] | null | null | null | data store/prototype_implementation/memcached_daemon.py | patiner/spot_characterization | 6747d6640aa020839362e39f8416790e8160a608 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import json
import socket
import sys
import subprocess
from subprocess import PIPE
import telnetlib
import threading
import time
from urllib2 import urlopen
public_ip = ''
cpu_util_vector = [0 for x in range(10)]
class ThreadMemcachedCpu (threading.Thread):
def __init__(self):
thre... | 26.248175 | 104 | 0.661151 |
d80891b4b8fbaaea0574590c47070fad4d26cfa1 | 950 | py | Python | scraper/storage_spiders/dochoiembecomvn.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | null | null | null | scraper/storage_spiders/dochoiembecomvn.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | 10 | 2020-02-11T23:34:28.000Z | 2022-03-11T23:16:12.000Z | scraper/storage_spiders/dochoiembecomvn.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | 3 | 2018-08-05T14:54:25.000Z | 2021-06-07T01:49:59.000Z | # Auto generated by generator.py. Delete this line if you make modification.
from scrapy.spiders import Rule
from scrapy.linkextractors import LinkExtractor
XPATH = {
'name' : "//div[@id='post-content']/div[@class='dtProduct']/h1",
'price' : "//div[@class='info-box']/ul/li[@class='saleOff']",
'category' : ... | 35.185185 | 76 | 0.623158 |
b8707d2340593b6b7117c4900b51a3313589fda2 | 9,807 | py | Python | venv/Lib/site-packages/pygments/lexers/testing.py | star10919/drf | 77c005794087484d72ffc0d76612a6ac9845821e | [
"BSD-3-Clause"
] | 9 | 2019-05-29T23:50:28.000Z | 2021-01-29T20:51:05.000Z | venv/Lib/site-packages/pygments/lexers/testing.py | star10919/drf | 77c005794087484d72ffc0d76612a6ac9845821e | [
"BSD-3-Clause"
] | 5 | 2021-02-27T21:31:47.000Z | 2021-04-05T21:49:38.000Z | venv/Lib/site-packages/pygments/lexers/testing.py | star10919/drf | 77c005794087484d72ffc0d76612a6ac9845821e | [
"BSD-3-Clause"
] | 3 | 2020-05-25T02:38:08.000Z | 2021-01-20T06:23:06.000Z | # -*- coding: utf-8 -*-
"""
pygments.lexers.testing
~~~~~~~~~~~~~~~~~~~~~~~
Lexers for testing languages.
:copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.lexer import RegexLexer, include, bygroups
from pygments.token imp... | 47.149038 | 1,550 | 0.582339 |
2c60ec9b765e46bba7f8f530fdf229d53ac5f375 | 4,271 | py | Python | testing/scripts/test_alibi_explain_v2.py | ChowXu/seldon-core | ce9a2842a95a3212044542f78aa299c26fe1264d | [
"Apache-2.0"
] | 1 | 2018-03-22T03:12:47.000Z | 2018-03-22T03:12:47.000Z | testing/scripts/test_alibi_explain_v2.py | ChowXu/seldon-core | ce9a2842a95a3212044542f78aa299c26fe1264d | [
"Apache-2.0"
] | 54 | 2019-09-25T19:10:25.000Z | 2022-03-28T23:08:29.000Z | testing/scripts/test_alibi_explain_v2.py | cliveseldon/seldon-core | c744d2e72a4ae53b1c833b5b753b6303834dc642 | [
"Apache-2.0"
] | null | null | null | import json
import time
from subprocess import run
import numpy as np
import pytest
import requests
from tenacity import Retrying, stop_after_attempt, wait_fixed
from seldon_e2e_utils import retry_run, wait_for_deployment
# NOTE:
# to recreate the artifacts for these test:
# anchor tabular:
# 1. python components/al... | 33.629921 | 84 | 0.585109 |
1384e66b664bb03cc4944a28f0f113aa8734deec | 2,814 | py | Python | eks-artifacts/start.py | arnib/containerized-game-servers | 7e555ee7177cd7305989975c098173a3bca27f35 | [
"Apache-2.0"
] | null | null | null | eks-artifacts/start.py | arnib/containerized-game-servers | 7e555ee7177cd7305989975c098173a3bca27f35 | [
"Apache-2.0"
] | null | null | null | eks-artifacts/start.py | arnib/containerized-game-servers | 7e555ee7177cd7305989975c098173a3bca27f35 | [
"Apache-2.0"
] | 1 | 2019-10-02T04:38:14.000Z | 2019-10-02T04:38:14.000Z | #!/usr/bin/python
import sys
import os
import socket
import random
import subprocess
import boto3
import json
import signal
from datetime import datetime
from ec2_metadata import ec2_metadata
region=os.environ['AWS_DEFAULT_REGION']
print('Region is:{}'.format(region))
# global variables
public_hostname=''
public_por... | 29.621053 | 155 | 0.722814 |
471c0859085b9fe60fd362d0159cf3ff004e7092 | 1,764 | py | Python | ipproxytool/spiders/proxy/basespider.py | xlj44400/IPProxyTool | 416dc2bffeced8344f8156b5606376e93a7be5cf | [
"MIT"
] | 1 | 2017-11-10T15:29:35.000Z | 2017-11-10T15:29:35.000Z | ipproxytool/spiders/proxy/basespider.py | xlj44400/IPProxyTool | 416dc2bffeced8344f8156b5606376e93a7be5cf | [
"MIT"
] | null | null | null | ipproxytool/spiders/proxy/basespider.py | xlj44400/IPProxyTool | 416dc2bffeced8344f8156b5606376e93a7be5cf | [
"MIT"
] | 2 | 2018-09-27T06:36:00.000Z | 2019-04-16T06:06:26.000Z | # coding=utf-8
import sys
import config
import utils
import datetime
from sqlhelper import SqlHelper
from scrapy.spiders import Spider
from scrapy.http import Request
reload(sys)
sys.setdefaultencoding('utf8')
class BaseSpider(Spider):
name = 'basespider'
def __init__(self, *a, **kw):
super(BaseSp... | 24.164384 | 110 | 0.565193 |
4bda2e0dd3dbba7a29a1e919cb2ce262afdf2346 | 16,854 | py | Python | ravens/agents/gt_state_2_step.py | wx-b/ravens | 249c316301d84fda10e0ce4ca99519d9a37a5059 | [
"Apache-2.0"
] | 294 | 2020-12-14T22:35:18.000Z | 2022-03-26T19:06:00.000Z | ravens/agents/gt_state_2_step.py | wx-b/ravens | 249c316301d84fda10e0ce4ca99519d9a37a5059 | [
"Apache-2.0"
] | 18 | 2020-12-18T03:54:50.000Z | 2021-11-30T22:22:26.000Z | ravens/agents/gt_state_2_step.py | wx-b/ravens | 249c316301d84fda10e0ce4ca99519d9a37a5059 | [
"Apache-2.0"
] | 68 | 2020-12-15T21:19:49.000Z | 2022-02-25T05:03:33.000Z | # coding=utf-8
# Copyright 2021 The Ravens Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 37.041758 | 82 | 0.672659 |
e76790a6ab98bf8c56ff47ec426e88aaa4398113 | 334 | py | Python | dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/io/data.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 18 | 2018-02-23T11:28:54.000Z | 2021-09-23T08:19:54.000Z | dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/io/data.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 2 | 2018-01-22T23:21:36.000Z | 2018-01-22T23:31:27.000Z | dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/io/data.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 12 | 2017-05-23T06:01:12.000Z | 2021-08-16T05:09:46.000Z | raise ImportError(
"The pandas.io.data module is moved to a separate package "
"(pandas-datareader). After installing the pandas-datareader package "
"(https://github.com/pydata/pandas-datareader), you can change "
"the import ``from pandas.io import data, wb`` to "
"``from pandas_datareader import ... | 47.714286 | 74 | 0.703593 |
6348b2b60e5c83bc23e4e8df212aad13637c6719 | 7,037 | py | Python | sarpy/io/general/slice_parsing.py | ngageoint/SarPy | a21ebfe136833e3d25cac4e5ebfd534f28538db4 | [
"MIT"
] | null | null | null | sarpy/io/general/slice_parsing.py | ngageoint/SarPy | a21ebfe136833e3d25cac4e5ebfd534f28538db4 | [
"MIT"
] | null | null | null | sarpy/io/general/slice_parsing.py | ngageoint/SarPy | a21ebfe136833e3d25cac4e5ebfd534f28538db4 | [
"MIT"
] | null | null | null | """
Utilities for parsing slice input.
"""
__classification__ = "UNCLASSIFIED"
__author__ = 'Thomas McCullough'
from typing import Union, Tuple, Sequence
import numpy
def validate_slice_int(the_int: int, bound: int, include=True):
"""
Ensure that the given integer makes sense as a slice entry, and move to
... | 33.193396 | 120 | 0.602672 |
b95fc1e326fee87b72ac71365b8a43b930046f8b | 646 | py | Python | tests/test_ip_address.py | KennethSoelberg/AOS-Switch | a5a2c54917bbb69fab044bf0b313bcf795642d30 | [
"MIT"
] | null | null | null | tests/test_ip_address.py | KennethSoelberg/AOS-Switch | a5a2c54917bbb69fab044bf0b313bcf795642d30 | [
"MIT"
] | 1 | 2020-12-24T15:36:56.000Z | 2021-01-28T23:19:57.000Z | tests/test_ip_address.py | KennethSoelberg/AOS-Switch | a5a2c54917bbb69fab044bf0b313bcf795642d30 | [
"MIT"
] | 1 | 2021-02-16T23:26:28.000Z | 2021-02-16T23:26:28.000Z | import pytest
from aos_sw_api import IpAddress
from aos_sw_api.enums import IpAddressVersionEnum
def test_create_ip_address():
IpAddress(version=IpAddressVersionEnum.IAV_IP_V4, octets="127.0.0.1")
IpAddress(version=IpAddressVersionEnum.IAV_IP_V6, octets="::1")
def test_wrong_version():
with pytest.rais... | 29.363636 | 77 | 0.75387 |
612a54f4ffacb210dd45752a9aaa69af078478bc | 5,831 | py | Python | tensorrt/plugins.py | RitwickGhosh/DeepSORT-YOLOv4-TensorRT-OpenVINO | 104e0433c56cebb7db503e23aaec9e7f1d7fdd3a | [
"MIT"
] | 8 | 2021-08-06T10:13:55.000Z | 2022-03-23T07:40:59.000Z | tensorrt/plugins.py | RitwickGhosh/DeepSORT-YOLOv4-TensorRT-OpenVINO | 104e0433c56cebb7db503e23aaec9e7f1d7fdd3a | [
"MIT"
] | null | null | null | tensorrt/plugins.py | RitwickGhosh/DeepSORT-YOLOv4-TensorRT-OpenVINO | 104e0433c56cebb7db503e23aaec9e7f1d7fdd3a | [
"MIT"
] | 1 | 2021-11-24T13:53:48.000Z | 2021-11-24T13:53:48.000Z | """plugins.py
I referenced the code from https://github.com/dongfangduoshou123/YoloV3-TensorRT/blob/master/seralizeEngineFromPythonAPI.py
"""
import ctypes
import numpy as np
import tensorrt as trt
from yolo_to_onnx import (is_pan_arch, DarkNetParser, get_category_num,
get_h_and_w, get_ou... | 42.875 | 124 | 0.651518 |
670429b6b23550380083b195d15ac63eb7f6d569 | 1,835 | py | Python | eastlake/steps/_galsim.py | des-science/eastlake | bbfd28a1426d178cc7ce2f1cd87e7245779c5527 | [
"BSD-3-Clause"
] | 1 | 2022-03-29T14:01:02.000Z | 2022-03-29T14:01:02.000Z | eastlake/steps/_galsim.py | des-science/eastlake | bbfd28a1426d178cc7ce2f1cd87e7245779c5527 | [
"BSD-3-Clause"
] | 1 | 2021-06-11T11:33:14.000Z | 2021-06-11T11:33:14.000Z | eastlake/steps/_galsim.py | des-science/eastlake | bbfd28a1426d178cc7ce2f1cd87e7245779c5527 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function, absolute_import
import pprint
import galsim
import galsim.config
from ..step import Step
class GalSimRunner(Step):
"""
Pipeline step which runs galsim
The config attribute is a little different here, since it is updated when
running GalSim
"""
def __i... | 29.596774 | 79 | 0.632698 |
357e5d9bf99b8c4b94a1f6ffe596d64bbd183319 | 3,294 | py | Python | tests/test_project_loader.py | lejmr/ecsctl | 688c5d5e10536ee74ded9de187309134a4b7effc | [
"MIT"
] | null | null | null | tests/test_project_loader.py | lejmr/ecsctl | 688c5d5e10536ee74ded9de187309134a4b7effc | [
"MIT"
] | 1 | 2021-02-14T19:53:08.000Z | 2021-02-14T19:53:08.000Z | tests/test_project_loader.py | lejmr/ecsctl | 688c5d5e10536ee74ded9de187309134a4b7effc | [
"MIT"
] | null | null | null | from ecs.project_loader import load_project_files, _find_td_ser, _find_values, _load_and_interpolate_values, load_output
from ecs.exceptions import InvalidProjectStructure, InvalidInputFiles
import pytest
import os
### Loaders
def test_find_td1():
with pytest.raises(FileNotFoundError):
_find_td_ser('tests... | 34.673684 | 120 | 0.686703 |
e019fa23340fa623faf1397efcc622547e0989ec | 6,265 | py | Python | demo/inference.py | Dirtybluer/PMTD | 9bebd7af176dc93bb9fe5523af7a9cd2034698e0 | [
"Apache-2.0"
] | 50 | 2019-09-02T07:03:15.000Z | 2022-03-28T12:40:35.000Z | demo/inference.py | Dirtybluer/PMTD | 9bebd7af176dc93bb9fe5523af7a9cd2034698e0 | [
"Apache-2.0"
] | null | null | null | demo/inference.py | Dirtybluer/PMTD | 9bebd7af176dc93bb9fe5523af7a9cd2034698e0 | [
"Apache-2.0"
] | 41 | 2019-09-03T06:51:59.000Z | 2022-01-18T02:40:57.000Z | import collections
import logging
import os
import torch
from tqdm import tqdm
from maskrcnn_benchmark.modeling.roi_heads.mask_head.inference import Masker
logger = logging.getLogger(__name__)
MASK_SCALE = 28
class PlaneClustering(Masker):
def __init__(self):
super().__init__()
assist_info = to... | 36.005747 | 104 | 0.58324 |
0fe4f9a154275865791bc8e8d82c51d811b642f9 | 25,171 | py | Python | plotille/_figure.py | ntezak/plotille | 7baa4fa176ced99f7a9ab9688e99b525ef3edf4d | [
"MIT"
] | 157 | 2017-09-28T12:16:52.000Z | 2022-03-31T08:13:23.000Z | plotille/_figure.py | ntezak/plotille | 7baa4fa176ced99f7a9ab9688e99b525ef3edf4d | [
"MIT"
] | 43 | 2017-11-01T19:21:21.000Z | 2022-03-27T08:36:56.000Z | plotille/_figure.py | ntezak/plotille | 7baa4fa176ced99f7a9ab9688e99b525ef3edf4d | [
"MIT"
] | 12 | 2018-01-14T08:05:07.000Z | 2021-07-31T05:15:38.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
# The MIT License
# Copyright (c) 2017 - 2021 Tammo Ippen, tammo.ippen@posteo.de
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation fi... | 32.562743 | 100 | 0.553772 |
f8a3261c37e6a51e6068f3d3de84fb7044b9e1d4 | 4,417 | py | Python | application/dashboard/trello_service.py | racedisparityaudit/rd_cms | a12f0e3f5461cc41eed0077ed02e11efafc5dd76 | [
"MIT"
] | 1 | 2021-10-06T13:48:36.000Z | 2021-10-06T13:48:36.000Z | application/dashboard/trello_service.py | racedisparityaudit/ethnicity-facts-and-figures-publisher | 63a3bd5618a04b2b853868aae35d54730077f14c | [
"MIT"
] | 116 | 2018-11-02T17:20:47.000Z | 2022-02-09T11:06:22.000Z | application/dashboard/trello_service.py | racedisparityaudit/rd_cms | a12f0e3f5461cc41eed0077ed02e11efafc5dd76 | [
"MIT"
] | 2 | 2018-11-09T16:47:35.000Z | 2020-04-09T13:06:48.000Z | import re
from trello import TrelloClient
from application.cms.service import Service
BOARD_ID = "K3A3MP7x"
TRELLO_LISTS = {
"5a686d4076c5194520f1186c": {"name": "Planned", "id": "5a686d4076c5194520f1186c", "stage": "planned"},
"5b90ec017b538e7de152dbc0": {"name": "Data received", "id": "5b90ec017b538e7de152... | 37.752137 | 119 | 0.64614 |
39a02c582608c5199411e4d8ce3316be1d332633 | 6,329 | py | Python | tutorial_english/text_format.py | SymonSaroar/manim | 9f1112474fedb67c061852720ee75234d785a0ec | [
"MIT"
] | 2 | 2020-12-26T05:21:23.000Z | 2022-02-22T23:00:28.000Z | from_wjl/tutorial_english/tutorial/text_format.py | wwjll/Manim-Chamber | 3d1b186bd111e6297607ba31eba73465fb7d6229 | [
"MIT"
] | null | null | null | from_wjl/tutorial_english/tutorial/text_format.py | wwjll/Manim-Chamber | 3d1b186bd111e6297607ba31eba73465fb7d6229 | [
"MIT"
] | null | null | null | from big_ol_pile_of_manim_imports import *
class WriteText(Scene):
def construct(self):
text = TextMobject("This is a regular text")
self.play(Write(text))
self.wait(3)
class TextoAdd(Scene):
def construct(self):
text = TextMobject("This is a regular text")
self.add... | 31.80402 | 121 | 0.630589 |
17fd81725c78a44e866b66e919fd80676fb55b89 | 3,725 | py | Python | vis_freesurfer.py | okahilak/xcoord | 255d30555f312a2afb0a0d42dce829b1f6ec2caa | [
"MIT"
] | null | null | null | vis_freesurfer.py | okahilak/xcoord | 255d30555f312a2afb0a0d42dce829b1f6ec2caa | [
"MIT"
] | null | null | null | vis_freesurfer.py | okahilak/xcoord | 255d30555f312a2afb0a0d42dce829b1f6ec2caa | [
"MIT"
] | 1 | 2021-09-15T13:54:15.000Z | 2021-09-15T13:54:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# xcoord - Tools for cross-software spatial coordinate manipulation
#
# This file is part of xcoord package which is released under copyright.
# See file LICENSE or go to website for full license details.
# Copyright (C) 2020 Victor Hugo Souza - All Rights Reserved
#
# Hom... | 28.007519 | 109 | 0.705772 |
fb7fd77044e177f27bd209ec0b7c5b2e00a3363d | 17,887 | py | Python | tests/test_base.py | Telecominfraproject/OOPT-DTC-TAI | b3a2292297a6c0a7d30987f39eb5d5e154cb7774 | [
"BSD-3-Clause"
] | 2 | 2018-03-26T23:00:51.000Z | 2018-05-24T15:19:58.000Z | tests/test_base.py | Telecominfraproject/OOPT-DTC-TAI | b3a2292297a6c0a7d30987f39eb5d5e154cb7774 | [
"BSD-3-Clause"
] | 7 | 2018-03-28T05:07:38.000Z | 2018-05-18T17:40:57.000Z | tests/test_base.py | Telecominfraproject/OOPT-DTC-TAI | b3a2292297a6c0a7d30987f39eb5d5e154cb7774 | [
"BSD-3-Clause"
] | 3 | 2018-03-05T22:12:14.000Z | 2018-03-26T23:12:18.000Z | import unittest
import subprocess as sp
import threading
import os
import time
import taish
import asyncio
TAI_TEST_MODULE_LOCATION = os.environ.get("TAI_TEST_MODULE_LOCATION", "")
if not TAI_TEST_MODULE_LOCATION:
TAI_TEST_MODULE_LOCATION = "0"
TAI_TEST_TAISH_SERVER_ADDRESS = os.environ.get("TAI_TEST_TAISH_SERVER... | 33.247212 | 85 | 0.603735 |
74c5d1001a084f3fc2460b4c0ba5f9bfab5b53a5 | 94 | py | Python | project/project/settings/__init__.py | DasAllFolks/DjangoPerfTest | 780c6de43da447435fd6f592f891fc2cb5d8d444 | [
"Apache-2.0"
] | null | null | null | project/project/settings/__init__.py | DasAllFolks/DjangoPerfTest | 780c6de43da447435fd6f592f891fc2cb5d8d444 | [
"Apache-2.0"
] | null | null | null | project/project/settings/__init__.py | DasAllFolks/DjangoPerfTest | 780c6de43da447435fd6f592f891fc2cb5d8d444 | [
"Apache-2.0"
] | null | null | null | from project.settings.base import *
try:
from project.settings.dev import *
except:
pass
| 13.428571 | 36 | 0.744681 |
a7ecdd6bd682ba35ce73431da32d7ce10f90474a | 1,228 | py | Python | example/ctrl_server.py | IBM/sofa-storage | cede9c1e9d193eea6b57811c066effc237858443 | [
"Apache-2.0"
] | 2 | 2022-02-01T15:48:28.000Z | 2022-03-24T05:41:33.000Z | example/ctrl_server.py | IBM/sofa-storage | cede9c1e9d193eea6b57811c066effc237858443 | [
"Apache-2.0"
] | null | null | null | example/ctrl_server.py | IBM/sofa-storage | cede9c1e9d193eea6b57811c066effc237858443 | [
"Apache-2.0"
] | null | null | null | """
Copyright (c) 2021 International Business Machines
All rights reserved.
SPDX-License-Identifier: Apache-2.0
"""
from concurrent import futures
from signal import signal, SIGTERM, SIGINT
import grpc
from .config import config
from .log import logger
from .generated import storage_ctrl_pb2_grpc
from .ctrl_ser... | 30.7 | 102 | 0.679153 |
777d452f182cefa9c38f1d0b446679744fe56309 | 1,363 | py | Python | voxel_globe/world/migrations/0001_initial.py | ngageoint/voxel-globe | 91f386de652b704942165889c10468b2c4cf4eec | [
"MIT"
] | 28 | 2015-07-27T23:57:24.000Z | 2020-04-05T15:10:52.000Z | voxel_globe/world/migrations/0001_initial.py | VisionSystemsInc/voxel_globe | 6eb3fca5586726428e9d914f7b730ca164c64a52 | [
"MIT"
] | 50 | 2016-02-11T15:50:22.000Z | 2016-10-27T22:38:27.000Z | voxel_globe/world/migrations/0001_initial.py | ngageoint/voxel-globe | 91f386de652b704942165889c10468b2c4cf4eec | [
"MIT"
] | 8 | 2015-07-27T19:22:03.000Z | 2021-01-04T09:44:48.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.contrib.gis.db.models.fields
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='WorldBorder',
fields... | 41.30303 | 114 | 0.592076 |
f5b63c2e7721eafd542c84fc19c6f591b6934495 | 7,331 | py | Python | src/class_smtpServer.py | kdcis/PyBitmessage | 2ef6463439b21d662cfe0360f8df9a165909d63e | [
"MIT",
"BSD-2-Clause-FreeBSD"
] | 1,583 | 2015-01-01T13:03:20.000Z | 2022-03-31T23:10:00.000Z | src/class_smtpServer.py | kdcis/PyBitmessage | 2ef6463439b21d662cfe0360f8df9a165909d63e | [
"MIT",
"BSD-2-Clause-FreeBSD"
] | 841 | 2015-01-01T14:51:48.000Z | 2022-03-25T06:45:14.000Z | src/class_smtpServer.py | g1itch/PyBitmessage | 5bc92987c02cf41fecfe118e6d2ab148f7ddea21 | [
"MIT",
"BSD-2-Clause-FreeBSD"
] | 482 | 2015-01-07T00:53:25.000Z | 2022-03-24T15:58:12.000Z | """
SMTP server thread
"""
import asyncore
import base64
import email
import logging
import re
import signal
import smtpd
import threading
import time
from email.header import decode_header
from email.parser import Parser
import queues
from addresses import decodeAddress
from bmconfigparser import BMConfigParser
from ... | 33.62844 | 110 | 0.580139 |
d4548127512993c346e8424861cfaa25af99441c | 3,798 | py | Python | rocketman/launch.py | Batucho/Rocketman | ff93b7e68be269e4b1b04b4d72611e308e73a76b | [
"MIT"
] | null | null | null | rocketman/launch.py | Batucho/Rocketman | ff93b7e68be269e4b1b04b4d72611e308e73a76b | [
"MIT"
] | null | null | null | rocketman/launch.py | Batucho/Rocketman | ff93b7e68be269e4b1b04b4d72611e308e73a76b | [
"MIT"
] | null | null | null | from .types.launch import FailureData, FairingData, LaunchData
from .utils.objects import BaseClass
class Fairing(BaseClass):
"""
Represents a fairing.
Attributes
----------
recovered: :class:`bool`
Returns bool stating state of recovery.
recovery_attempt: :class:`bool`
Retur... | 24.191083 | 66 | 0.556609 |
e93d20392a4073657a015f2dc8acf2fe58670ea7 | 11,869 | py | Python | Cura/Uranium/tests/TestResources.py | TIAO-JI-FU/3d-printing-with-moveo-1 | 100ecfd1208fe1890f8bada946145d716b2298eb | [
"MIT"
] | null | null | null | Cura/Uranium/tests/TestResources.py | TIAO-JI-FU/3d-printing-with-moveo-1 | 100ecfd1208fe1890f8bada946145d716b2298eb | [
"MIT"
] | null | null | null | Cura/Uranium/tests/TestResources.py | TIAO-JI-FU/3d-printing-with-moveo-1 | 100ecfd1208fe1890f8bada946145d716b2298eb | [
"MIT"
] | null | null | null | # Copyright (c) 2017 Ultimaker B.V.
# Uranium is released under the terms of the LGPLv3 or higher.
import os
import platform
import unittest
from unittest import TestCase
from unittest.mock import patch, PropertyMock
import tempfile
import pytest
from UM.Resources import Resources, ResourceTypeError, UnsupportedStora... | 49.661088 | 119 | 0.684388 |
a585328b8ecd78cd565c30f07a690e63f291b01d | 17,596 | py | Python | traitlite/traits.py | lejar/traitlite | 27c1ec06051af79f54c5f61949288f4fd7d8bf86 | [
"MIT"
] | 6 | 2018-09-17T06:28:54.000Z | 2019-06-04T19:53:01.000Z | traitlite/traits.py | lejar/traitlite | 27c1ec06051af79f54c5f61949288f4fd7d8bf86 | [
"MIT"
] | 1 | 2018-08-16T11:45:23.000Z | 2018-08-16T11:45:23.000Z | traitlite/traits.py | lejar/traitlite | 27c1ec06051af79f54c5f61949288f4fd7d8bf86 | [
"MIT"
] | 1 | 2018-08-16T11:39:21.000Z | 2018-08-16T11:39:21.000Z | import copy
import inspect
from weakref import WeakKeyDictionary
from typing import (
Any,
Callable,
List,
Generic,
Optional,
Tuple,
Type,
TypeVar,
)
from .weakref_utilities import DefaultWeakKeyDictionary
Owner = TypeVar('Owner')
Value = TypeVar('Value')
def resolve_mro(obj1: 'Base... | 32.405157 | 99 | 0.614344 |
1e3d35369441d5940cf63c4048d9881f204c4b12 | 6,573 | py | Python | clinicadl/clinicadl/interpret/individual_backprop.py | cristhiandcl/AD-DL | b7abb3fe619e736b269067033ba4aad1f03cf3b8 | [
"MIT"
] | null | null | null | clinicadl/clinicadl/interpret/individual_backprop.py | cristhiandcl/AD-DL | b7abb3fe619e736b269067033ba4aad1f03cf3b8 | [
"MIT"
] | null | null | null | clinicadl/clinicadl/interpret/individual_backprop.py | cristhiandcl/AD-DL | b7abb3fe619e736b269067033ba4aad1f03cf3b8 | [
"MIT"
] | null | null | null | from os import path
import os
import numpy as np
import nibabel as nib
from torch.utils.data import DataLoader
import argparse
import matplotlib.pyplot as plt
import warnings
from clinicadl.tools.deep_learning.iotools import read_json, commandline_to_json, translate_parameters, return_logger
from clinicadl.tools.deep_... | 51.351563 | 117 | 0.573711 |
e274d668b268d5bfb7c453e9cfd0b021feeb6b2b | 7,241 | py | Python | src/tfont/converters/tfontConverter.py | moyogo/tfont | 6da511163af28471b1744e783ff46421d4cf4aed | [
"Apache-2.0"
] | null | null | null | src/tfont/converters/tfontConverter.py | moyogo/tfont | 6da511163af28471b1744e783ff46421d4cf4aed | [
"Apache-2.0"
] | null | null | null | src/tfont/converters/tfontConverter.py | moyogo/tfont | 6da511163af28471b1744e783ff46421d4cf4aed | [
"Apache-2.0"
] | null | null | null | import cattr
from collections.abc import Collection
from datetime import datetime
from functools import partial
import rapidjson as json
from rapidjson import RawJSON, dumps
from tfont.objects.anchor import Anchor
from tfont.objects.axis import Axis
from tfont.objects.feature import Feature, FeatureClass
from tfont.obj... | 34.480952 | 79 | 0.594255 |
2c3c40cd8f58fa2ff8b40527eb19c1602ef5192e | 1,085 | py | Python | code/gits_undo.py | oaaky/GITS | 2254f298df158b5d085015c4cf9b542b059b3a6c | [
"MIT"
] | 2 | 2020-11-11T08:45:07.000Z | 2021-09-02T18:36:21.000Z | code/gits_undo.py | oaaky/GITS | 2254f298df158b5d085015c4cf9b542b059b3a6c | [
"MIT"
] | 24 | 2020-10-01T16:55:05.000Z | 2020-10-27T02:51:25.000Z | code/gits_undo.py | oaaky/GITS | 2254f298df158b5d085015c4cf9b542b059b3a6c | [
"MIT"
] | 15 | 2020-10-02T03:43:30.000Z | 2021-10-01T03:48:32.000Z | #!/usr/bin/python3
import gits_logging
from subprocess import PIPE
import subprocess
def gits_undo(args):
"""
Function that moves files from working directory to the staging directory.
Only tracked files will be considered for any upcoming files.
"""
try:
subprocess_command = list()
... | 31.911765 | 79 | 0.653456 |
f391260c139f420bd6fa972ca564dbda4cd61ff2 | 30,907 | py | Python | tests/trainer/test_trainer.py | Laksh1997/pytorch-lightning | 10c643f162318b7fe2b4a041a1f2975468492a92 | [
"Apache-2.0"
] | null | null | null | tests/trainer/test_trainer.py | Laksh1997/pytorch-lightning | 10c643f162318b7fe2b4a041a1f2975468492a92 | [
"Apache-2.0"
] | null | null | null | tests/trainer/test_trainer.py | Laksh1997/pytorch-lightning | 10c643f162318b7fe2b4a041a1f2975468492a92 | [
"Apache-2.0"
] | null | null | null | import glob
import math
import os
import pickle
import types
from argparse import Namespace
import cloudpickle
import pytest
import torch
import tests.base.utils as tutils
from pytorch_lightning import Callback, LightningModule
from pytorch_lightning import Trainer
from pytorch_lightning.callbacks import EarlyStoppin... | 36.106308 | 134 | 0.685055 |
473c49a6e2fcc9aa1c4bdb0efcd0f74be7d5803d | 17,090 | py | Python | RePoE/parser/modules/gems.py | Project-Path-of-Exile-Wiki/RePoE | 5051a059a68587da84ed25a671900dadc35ff8dd | [
"MIT"
] | null | null | null | RePoE/parser/modules/gems.py | Project-Path-of-Exile-Wiki/RePoE | 5051a059a68587da84ed25a671900dadc35ff8dd | [
"MIT"
] | null | null | null | RePoE/parser/modules/gems.py | Project-Path-of-Exile-Wiki/RePoE | 5051a059a68587da84ed25a671900dadc35ff8dd | [
"MIT"
] | 1 | 2021-08-22T18:11:32.000Z | 2021-08-22T18:11:32.000Z | import re
from PyPoE.cli.exporter.wiki.parsers.skill import SkillParserShared
from PyPoE.poe.file.stat_filters import StatFilterFile
from PyPoE.poe.sim.formula import GemTypes, gem_stat_requirement
from RePoE.parser.constants import ActiveSkillType, CooldownBypassType
from RePoE.parser.util import (
call_with_defa... | 40.306604 | 116 | 0.595202 |
eef27cf7eba0eb187ad76b7cfba98b55419df944 | 1,391 | py | Python | app.py | holdenmatt/flask-boilerplate | 2c779a725633a50d3efe278d92517a35394fe19f | [
"MIT"
] | 1 | 2015-07-03T03:34:40.000Z | 2015-07-03T03:34:40.000Z | app.py | holdenmatt/flask-boilerplate | 2c779a725633a50d3efe278d92517a35394fe19f | [
"MIT"
] | null | null | null | app.py | holdenmatt/flask-boilerplate | 2c779a725633a50d3efe278d92517a35394fe19f | [
"MIT"
] | null | null | null | """
Create the application.
"""
import os
from flask import Flask, render_template, request, redirect, url_for
from flask.ext.assets import Environment
from webassets.loaders import PythonLoader
app = Flask(__name__)
assets = Environment(app)
app.config.from_pyfile('settings.py')
# Load and register assets bundl... | 21.4 | 68 | 0.689432 |
e567b6eafc74671c1b3dad12b347714c30710b34 | 6,425 | py | Python | src/qlearning_approx.py | thurbridi/mo436-project-1 | 6d29bb4536d684a79b1a271e4d8505aca40db03b | [
"MIT"
] | null | null | null | src/qlearning_approx.py | thurbridi/mo436-project-1 | 6d29bb4536d684a79b1a271e4d8505aca40db03b | [
"MIT"
] | null | null | null | src/qlearning_approx.py | thurbridi/mo436-project-1 | 6d29bb4536d684a79b1a271e4d8505aca40db03b | [
"MIT"
] | null | null | null | import gym
actions_names = {
'Left': 0,
'Down': 1,
'Right': 2,
'Up': 3
}
env = gym.make("FrozenLake-v0", is_slippery=False, map_name='8x8')
env.reset()
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import os
import pickle
import time
class LinearModel:
# Linear Regressio... | 24.522901 | 128 | 0.654942 |
a33707ebf8b6f3fde3ae093bcf629e16c7af9bec | 5,595 | py | Python | scripts/app.py | jiamingli9674/Intelligent-Checkout-System | 10c6ac761d707ce80686ae7e7f37461a8984616c | [
"MIT"
] | 2 | 2022-02-06T00:40:00.000Z | 2022-03-19T12:12:15.000Z | scripts/app.py | jiamingli9674/Intelligent-Checkout-System | 10c6ac761d707ce80686ae7e7f37461a8984616c | [
"MIT"
] | 1 | 2022-02-07T08:44:20.000Z | 2022-02-07T08:44:20.000Z | scripts/app.py | jiamingli9674/Intelligent-Checkout-System | 10c6ac761d707ce80686ae7e7f37461a8984616c | [
"MIT"
] | null | null | null | #!venv/bin/python
import os
from flask import url_for, render_template
from flask_sqlalchemy import SQLAlchemy
from flask_security import Security, SQLAlchemyUserDatastore
from flask_security.utils import encrypt_password
import flask_admin
from flask_admin import helpers as admin_helpers
from app import app, db
from ... | 38.321918 | 182 | 0.646649 |
c94c1b6f15395e45acf7444dab2cd4199f378d1a | 691 | py | Python | src/stats/cdf_calc.py | saguilarDevel/open_schc | ac7f2a84b6120964c8fdaabf9f5c8ca8ae39c289 | [
"MIT"
] | null | null | null | src/stats/cdf_calc.py | saguilarDevel/open_schc | ac7f2a84b6120964c8fdaabf9f5c8ca8ae39c289 | [
"MIT"
] | null | null | null | src/stats/cdf_calc.py | saguilarDevel/open_schc | ac7f2a84b6120964c8fdaabf9f5c8ca8ae39c289 | [
"MIT"
] | null | null | null | from ucollections import OrderedDict
def cdf_cal(time_list):
""" Calculates the cdf for the time delay
:param list: the list of times
"""
results_sum = OrderedDict()
for time in time_list:
print("time:{}".format(time))
round_time = round(time,3)
print("round_time:{}".forma... | 28.791667 | 74 | 0.629522 |
0f99313b699cc4199a21954dc06266b16329185c | 2,233 | py | Python | Chapter08/B13346_08_04-least.py | shahidnawazkhan/geog786course | e2d425875d183af3f0d5d54bb7c01033f5b2926f | [
"MIT"
] | 97 | 2019-06-21T21:59:23.000Z | 2022-03-30T17:00:46.000Z | Chapter08/B13346_08_04-least.py | Fall-in-love-with-Kikyo/Learning-Geospatial-Analysis-with-Python-Third-Edition | 5f4961837d762cffbf67338e0237313ea89dbb48 | [
"MIT"
] | 3 | 2021-10-19T02:31:15.000Z | 2022-01-18T04:45:07.000Z | Chapter08/B13346_08_04-least.py | Fall-in-love-with-Kikyo/Learning-Geospatial-Analysis-with-Python-Third-Edition | 5f4961837d762cffbf67338e0237313ea89dbb48 | [
"MIT"
] | 61 | 2019-04-07T22:53:30.000Z | 2022-03-28T03:01:11.000Z | """
Provides a simple command-line-output
version of the least cost path solution
using randomly-generated notional arrays.
"""
import numpy as np
# Our A* search algorithm
def astar(start, end, h, g):
closed_set = set()
open_set = set()
path = set()
open_set.add(start)
while open_set:
cu... | 22.33 | 49 | 0.554859 |
5f55d3849d3772002c140b7f9532a8f8ea0f65ad | 8,904 | py | Python | libnamebench/charts.py | djprmf/namebench | ffbd716edf957d3788390444d2ef475d8828391a | [
"Apache-2.0"
] | 195 | 2015-02-04T05:50:03.000Z | 2022-02-20T08:37:08.000Z | libnamebench/charts.py | djprmf/namebench | ffbd716edf957d3788390444d2ef475d8828391a | [
"Apache-2.0"
] | 13 | 2015-03-02T19:34:31.000Z | 2021-03-14T10:39:42.000Z | libnamebench/charts.py | djprmf/namebench | ffbd716edf957d3788390444d2ef475d8828391a | [
"Apache-2.0"
] | 35 | 2015-09-20T03:24:28.000Z | 2022-03-21T21:07:09.000Z | # Copyright 2009 Google 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 applicable law or ... | 32.615385 | 100 | 0.681491 |
78504e4682d31f1e857a409dd9b39c0ecdb6c924 | 7,299 | py | Python | yt/visualization/volume_rendering/transfer_function_helper.py | themousepotato/yt | 6befef2bc0427250fd62395962599be41b193e65 | [
"BSD-3-Clause-Clear"
] | null | null | null | yt/visualization/volume_rendering/transfer_function_helper.py | themousepotato/yt | 6befef2bc0427250fd62395962599be41b193e65 | [
"BSD-3-Clause-Clear"
] | null | null | null | yt/visualization/volume_rendering/transfer_function_helper.py | themousepotato/yt | 6befef2bc0427250fd62395962599be41b193e65 | [
"BSD-3-Clause-Clear"
] | null | null | null | import matplotlib
import numpy as np
from distutils.version import LooseVersion
from yt.funcs import mylog
from yt.data_objects.profiles import create_profile
from yt.visualization.volume_rendering.transfer_functions import \
ColorTransferFunction
from io import BytesIO
class TransferFunctionHelper:
r"""A t... | 32.730942 | 90 | 0.561173 |
cf93a8af501ecd607821e5fa80763c89aa032e2a | 4,497 | py | Python | DeepACC/models/BehaveNet/81/BehaveNetACC.py | amirsaleh-salehzadeh/BehaveNet | 1dcdfa3d9efd022f29f37495be15f9657c5e7374 | [
"MIT"
] | 1 | 2019-03-06T13:45:23.000Z | 2019-03-06T13:45:23.000Z | Swimming/models/BehaveNet/81/BehaveNetACC.py | amirsaleh-salehzadeh/BehaveNet | 1dcdfa3d9efd022f29f37495be15f9657c5e7374 | [
"MIT"
] | null | null | null | Swimming/models/BehaveNet/81/BehaveNetACC.py | amirsaleh-salehzadeh/BehaveNet | 1dcdfa3d9efd022f29f37495be15f9657c5e7374 | [
"MIT"
] | 1 | 2019-12-19T15:12:53.000Z | 2019-12-19T15:12:53.000Z | import sys
from keras.layers.normalization import BatchNormalization
from keras.layers.pooling import MaxPooling1D, AveragePooling1D
sys.path.insert(0, "/home/cirl/Amir/Human-Activity-EEG-Accelerometer")
import numpy as np
import os
from keras.models import Sequential
from keras.layers.core import Dense, Activation, Dr... | 44.524752 | 93 | 0.707583 |
6cf7f11ca7079bfc5ad0b7e1735049031d257de7 | 1,894 | py | Python | pydoop/app/argparse_types.py | expobrain/pydoop | 795ffd8875095fab498e3e075395b70a8192a9e6 | [
"Apache-2.0"
] | 1 | 2021-03-22T02:22:30.000Z | 2021-03-22T02:22:30.000Z | pydoop/app/argparse_types.py | expobrain/pydoop | 795ffd8875095fab498e3e075395b70a8192a9e6 | [
"Apache-2.0"
] | null | null | null | pydoop/app/argparse_types.py | expobrain/pydoop | 795ffd8875095fab498e3e075395b70a8192a9e6 | [
"Apache-2.0"
] | null | null | null | # BEGIN_COPYRIGHT
#
# Copyright 2009-2018 CRS4.
#
# 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 agree... | 28.268657 | 79 | 0.654171 |
88a82020afe646b21adb30c610deda1b2f909582 | 2,572 | bzl | Python | third_party/generate_workspace.bzl | xylo04/commons-collections | 734e314c159872da82eb5fb77909b599fee16450 | [
"Apache-2.0"
] | null | null | null | third_party/generate_workspace.bzl | xylo04/commons-collections | 734e314c159872da82eb5fb77909b599fee16450 | [
"Apache-2.0"
] | null | null | null | third_party/generate_workspace.bzl | xylo04/commons-collections | 734e314c159872da82eb5fb77909b599fee16450 | [
"Apache-2.0"
] | null | null | null | # Generated by https://github.com/bazelbuild/migration-tooling
# The following dependencies were calculated from:
#
# generate_workspace --maven_project=/home/chris/git/commons-collections --repositories=https://repo1.maven.org/maven2/
def generated_maven_jars():
# pom.xml got requested version
# org.apache.c... | 31.365854 | 119 | 0.648911 |
7ea2b8af044c93f11d0bfca30eefea0d8e2d08dc | 2,435 | py | Python | HackerRank/Trees/views_problems.py | ksarthak4ever/Competitive-Programming | 2b3eafec42b67f3f63c8be726443fa28aefb0373 | [
"MIT"
] | 1 | 2019-10-15T08:20:12.000Z | 2019-10-15T08:20:12.000Z | HackerRank/Trees/views_problems.py | ksarthak4ever/Competitive-Programming | 2b3eafec42b67f3f63c8be726443fa28aefb0373 | [
"MIT"
] | null | null | null | HackerRank/Trees/views_problems.py | ksarthak4ever/Competitive-Programming | 2b3eafec42b67f3f63c8be726443fa28aefb0373 | [
"MIT"
] | 2 | 2019-12-10T07:07:46.000Z | 2019-12-10T07:10:47.000Z | import sys
sys.path.append("..") # to import higher directory.
from Queues.queue import Queue
class Node(object):
def __init__(self, value):
self.info = value
self.left = None
self.right = None
class BinaryTree(object):
def __init__(self, root):
self.root = Node(root)
de... | 26.467391 | 74 | 0.549897 |
b4c9d7c261e137da7ac8fe18d256db2943ac168d | 10,861 | py | Python | spectrum/autism_prevalence_map/management/commands/pull_studies_from_gsheets.py | simonsfoundation/spectrum-autism-prevalence-map | 9f9674087b1404e1c5526ef7958e2e6d1c4724d6 | [
"Apache-2.0"
] | null | null | null | spectrum/autism_prevalence_map/management/commands/pull_studies_from_gsheets.py | simonsfoundation/spectrum-autism-prevalence-map | 9f9674087b1404e1c5526ef7958e2e6d1c4724d6 | [
"Apache-2.0"
] | 1 | 2021-12-07T03:27:08.000Z | 2021-12-07T03:27:08.000Z | spectrum/autism_prevalence_map/management/commands/pull_studies_from_gsheets.py | simonsfoundation/spectrum-autism-prevalence-map | 9f9674087b1404e1c5526ef7958e2e6d1c4724d6 | [
"Apache-2.0"
] | null | null | null | import sys, os, urllib.request, json, time, datetime, re
from django.core.management.base import BaseCommand, CommandError
from autism_prevalence_map.models import *
"""
Loads research studies data from google spreadsheets API
"""
class Command(BaseCommand):
def load_research_data(self):
# Old (v3) sty... | 47.221739 | 334 | 0.537151 |
62f2c5802ca28f9be89dec8ed2b7d8762bb6e4ed | 1,763 | py | Python | armi/pluginManager.py | keckler/armi | b5f95b4795aa21e00fd6786f6994862a4bdccb16 | [
"Apache-2.0"
] | 162 | 2019-11-01T17:35:58.000Z | 2022-03-18T04:22:39.000Z | armi/pluginManager.py | keckler/armi | b5f95b4795aa21e00fd6786f6994862a4bdccb16 | [
"Apache-2.0"
] | 315 | 2019-11-01T17:32:05.000Z | 2022-03-30T03:51:42.000Z | armi/pluginManager.py | keckler/armi | b5f95b4795aa21e00fd6786f6994862a4bdccb16 | [
"Apache-2.0"
] | 55 | 2019-11-01T16:59:59.000Z | 2022-03-25T18:19:06.000Z | # Copyright 2019 TerraPower, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 35.979592 | 87 | 0.723199 |
08cb81d521e4d33ce410183cc96a538bc2167e9d | 2,032 | py | Python | scripts/repoutils.py | foxonedev/tabler-react | 395cfb3908d9e7e30b6aa2f443dae2ee7e4298a5 | [
"MIT"
] | 1,977 | 2018-04-13T10:19:01.000Z | 2022-03-31T19:26:39.000Z | scripts/repoutils.py | foxonedev/tabler-react | 395cfb3908d9e7e30b6aa2f443dae2ee7e4298a5 | [
"MIT"
] | 415 | 2018-04-15T05:36:53.000Z | 2022-03-18T05:37:09.000Z | scripts/repoutils.py | foxonedev/tabler-react | 395cfb3908d9e7e30b6aa2f443dae2ee7e4298a5 | [
"MIT"
] | 589 | 2018-04-17T01:48:00.000Z | 2022-03-21T06:45:09.000Z | import os
import os.path
libDir = '../src/'
exampleDir = '../example/src/'
# Functions Parsing/Handling File Names
def walkFileNames(booleanOperator, successCallback, failureCallback):
walkLibFileNames(booleanOperator, successCallback, failureCallback)
walkExampleFileNames(booleanOperator, successC... | 41.469388 | 80 | 0.737205 |
572a1954d12175e4952944a609967c599139ab08 | 7,668 | py | Python | venv/lib/python3.8/site-packages/tmdbv3api/objs/movie.py | lfbox7/flixster-kivy | f9497a2c8ba572db5d1fbfdb94d04d37a75ad1e5 | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.8/site-packages/tmdbv3api/objs/movie.py | lfbox7/flixster-kivy | f9497a2c8ba572db5d1fbfdb94d04d37a75ad1e5 | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.8/site-packages/tmdbv3api/objs/movie.py | lfbox7/flixster-kivy | f9497a2c8ba572db5d1fbfdb94d04d37a75ad1e5 | [
"Apache-2.0"
] | null | null | null | from tmdbv3api.tmdb import TMDb
from tmdbv3api.as_obj import AsObj
try:
from urllib import quote
except ImportError:
from urllib.parse import quote
try:
from urllib import urlencode
except ImportError:
from urllib.parse import urlencode
class Movie(TMDb):
_urls = {
"details": "/movie/%s",... | 30.428571 | 135 | 0.542514 |
2316d526cf7e08b87255845e3b2468f465d06470 | 3,471 | py | Python | alchemical_analysis/utils/zeroxvg.py | VincenzoChen/alchemical-analysis | 948dfbd6fb7c4df07118b2e0cde0cce649eded30 | [
"MIT"
] | null | null | null | alchemical_analysis/utils/zeroxvg.py | VincenzoChen/alchemical-analysis | 948dfbd6fb7c4df07118b2e0cde0cce649eded30 | [
"MIT"
] | null | null | null | alchemical_analysis/utils/zeroxvg.py | VincenzoChen/alchemical-analysis | 948dfbd6fb7c4df07118b2e0cde0cce649eded30 | [
"MIT"
] | null | null | null | import numpy,os,sys
def zero_output(K,P):
"""Adapted from totalEnergies() function to write out all zeros in results.txt file"""
print("Generating results.txt with all 0")
df_allk = list(); ddf_allk = list()
for k in range(K-1):
df=dict(); ddf=dict()
for name in P.methods:
df[name] = 0... | 41.819277 | 157 | 0.580812 |
8d10f5abee15f0290f8c4d85e7e5ca6af6806338 | 3,637 | py | Python | module/Weather.py | mao-shonen/LINE-chat-bot | ef6a18ee6bdd3ade099b1b102e70dfa5608a77ac | [
"MIT"
] | 15 | 2017-12-27T06:02:19.000Z | 2020-09-30T02:33:26.000Z | module/Weather.py | mao-shonen/LINE-chat-bot | ef6a18ee6bdd3ade099b1b102e70dfa5608a77ac | [
"MIT"
] | 22 | 2018-01-20T04:40:42.000Z | 2021-08-17T07:20:52.000Z | module/Weather.py | mao-shonen/LINE-chat-bot | ef6a18ee6bdd3ade099b1b102e70dfa5608a77ac | [
"MIT"
] | 10 | 2017-12-01T07:19:40.000Z | 2022-02-21T13:22:03.000Z | '''
天氣模組
'''
import os
from api import cfg, download
from time import time
from datetime import datetime
from lxml import etree
from module.ConfigFile import ConfigFile
DATA_TYPE = 'F-C0032-001'
DATA_URL = 'http://opendata.cwb.gov.tw/opendataapi?authorizationkey=%s&dataid=%s' % (cfg['opendata.cwb.gov... | 36.009901 | 186 | 0.545505 |
cf10ef6535cacea61d0087922566dafe1a1d5357 | 1,891 | py | Python | configs/_base_/datasets/bead_cropped_type_2_mask_grayscale.py | anley1/Swin-Transformer-Object-Detection | 0f26c7979ee2360acd359a5789cd8d52527e0d64 | [
"Apache-2.0"
] | null | null | null | configs/_base_/datasets/bead_cropped_type_2_mask_grayscale.py | anley1/Swin-Transformer-Object-Detection | 0f26c7979ee2360acd359a5789cd8d52527e0d64 | [
"Apache-2.0"
] | null | null | null | configs/_base_/datasets/bead_cropped_type_2_mask_grayscale.py | anley1/Swin-Transformer-Object-Detection | 0f26c7979ee2360acd359a5789cd8d52527e0d64 | [
"Apache-2.0"
] | null | null | null | dataset_type = 'CocoDataset'
classes = ('beading',)
data_root = 'data/'
img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=False)
train_pipeline = [
dict(type='LoadImageFromFile'),
dict(type='LoadAnnotations',
with_bbox=True,
with_mask=True,
... | 33.175439 | 79 | 0.589106 |
1882a52eec7834369109b2e186ef7b132a3e942a | 528 | py | Python | hexToByte.py | danielbrownjr/cryptopals | e322dbd5faf58bfeb0480cdfb562ed34da193f3c | [
"MIT"
] | null | null | null | hexToByte.py | danielbrownjr/cryptopals | e322dbd5faf58bfeb0480cdfb562ed34da193f3c | [
"MIT"
] | null | null | null | hexToByte.py | danielbrownjr/cryptopals | e322dbd5faf58bfeb0480cdfb562ed34da193f3c | [
"MIT"
] | null | null | null | import base64 as b64
print("Enter the hexcode (default is")
hexCode = input("49276d206b696c6c696e6720796f757220627261696e206c" +
"696b65206120706f69736f6e6f7573206d757368726f6f6d): ")
if not hexCode:
hexCode = "49276d206b696c6c696e6720796f757220627261696e206c\
696b65206120706f69736f6... | 33 | 70 | 0.751894 |
bdde158f54e32771f0581fb58805f911b50041fd | 51,297 | py | Python | python/GafferArnoldTest/ArnoldRenderTest.py | bradleyhenke/gaffer | 73170283a3d5bf45f9d1edd5fc65aa60fa9956cc | [
"BSD-3-Clause"
] | null | null | null | python/GafferArnoldTest/ArnoldRenderTest.py | bradleyhenke/gaffer | 73170283a3d5bf45f9d1edd5fc65aa60fa9956cc | [
"BSD-3-Clause"
] | null | null | null | python/GafferArnoldTest/ArnoldRenderTest.py | bradleyhenke/gaffer | 73170283a3d5bf45f9d1edd5fc65aa60fa9956cc | [
"BSD-3-Clause"
] | null | null | null | ##########################################################################
#
# Copyright (c) 2012, John Haddon. All rights reserved.
# Copyright (c) 2013, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that ... | 36.588445 | 141 | 0.681287 |
6ccf42a4759e1da6afea57b18c9aceae3ec63233 | 10,589 | py | Python | android/app/src/main/python/electroncash_gui/android/console.py | mpatc/Electron-Cash | 6ee6cebd2f1cac8a332d1820f6bd0349296b6adf | [
"MIT"
] | 1 | 2019-11-15T05:00:02.000Z | 2019-11-15T05:00:02.000Z | android/app/src/main/python/electroncash_gui/android/console.py | mpatc/Electron-Cash | 6ee6cebd2f1cac8a332d1820f6bd0349296b6adf | [
"MIT"
] | 18 | 2019-11-14T03:55:32.000Z | 2020-10-25T10:53:35.000Z | android/app/src/main/python/electroncash_gui/android/console.py | mpatc/Electron-Cash | 6ee6cebd2f1cac8a332d1820f6bd0349296b6adf | [
"MIT"
] | 3 | 2019-02-21T07:57:57.000Z | 2020-01-09T15:03:17.000Z | from __future__ import absolute_import, division, print_function
from code import InteractiveConsole
import json
import os
from os.path import dirname, exists, join, split
import pkgutil
from shutil import copyfile
import unittest
from electroncash import commands, daemon, keystore, simple_config, storage, tests, uti... | 36.767361 | 95 | 0.617433 |
6ae0ae97d3ac532c5c3246cdbae9af1ff5b87ced | 2,584 | py | Python | example/example/views.py | jayaddison-collabora/django-gdpr-assist | 12a8f1e8dc0d0482120ca62fe09242523c711aed | [
"BSD-3-Clause"
] | null | null | null | example/example/views.py | jayaddison-collabora/django-gdpr-assist | 12a8f1e8dc0d0482120ca62fe09242523c711aed | [
"BSD-3-Clause"
] | null | null | null | example/example/views.py | jayaddison-collabora/django-gdpr-assist | 12a8f1e8dc0d0482120ca62fe09242523c711aed | [
"BSD-3-Clause"
] | null | null | null | """
Example views for gdpr-assist
"""
import random
from django.contrib import messages
from django.shortcuts import redirect
from django.views.generic import TemplateView
from autofixture import AutoFixture, generators
from .models import HealthRecord, MailingListLog, Person, PersonProfile
class IndexView(Templat... | 31.512195 | 88 | 0.552632 |
e51f2bcfaa3f9a072e6e022b083d897fcff7c17c | 395 | py | Python | Question19.py | Schrodinger73/PracticalJournal_Class11 | cf098a87bcba807858ea7e904e8ac57742f19e70 | [
"MIT"
] | 13 | 2020-10-22T05:12:27.000Z | 2022-01-10T10:59:10.000Z | Question19.py | Schrodinger73/PracticalJournal_Class11 | cf098a87bcba807858ea7e904e8ac57742f19e70 | [
"MIT"
] | 2 | 2020-10-25T19:34:18.000Z | 2020-11-03T19:02:22.000Z | Question19.py | Schrodinger73/PracticalJournal_Class11 | cf098a87bcba807858ea7e904e8ac57742f19e70 | [
"MIT"
] | 7 | 2020-10-25T18:53:09.000Z | 2020-12-25T03:15:03.000Z | # Question
# 19. Write a program to input a string and a character and count the number of occurrences of the input character in a given string
# Code:
a = input("String:\n")
char = input("Character:\n")
count = 0
for letter in a:
if letter == char:
count += 1
print("Count:",count)
# Input:
# String:
# ... | 18.809524 | 132 | 0.64557 |
307910faf40872aa1370bac1b427118a9991b809 | 244 | py | Python | src/gedml/launcher/creators/factories/datasets_creator.py | wangck20/GeDML | 1f76ac2094d7b88be7fd4eb6145e5586e547b9ca | [
"MIT"
] | 25 | 2021-09-06T13:26:02.000Z | 2022-01-06T13:25:24.000Z | src/gedml/launcher/creators/factories/datasets_creator.py | wangck20/GeDML | 1f76ac2094d7b88be7fd4eb6145e5586e547b9ca | [
"MIT"
] | 1 | 2021-09-09T08:29:29.000Z | 2021-09-13T15:05:59.000Z | src/gedml/launcher/creators/factories/datasets_creator.py | wangck20/GeDML | 1f76ac2094d7b88be7fd4eb6145e5586e547b9ca | [
"MIT"
] | 2 | 2021-09-07T08:44:41.000Z | 2021-09-09T08:31:55.000Z | from .base_creator import BaseCreator
from ....core import datasets
class datasetsCreator(BaseCreator):
def __init__(self, **kwargs):
super().__init__(**kwargs)
def prepare_packages(self):
self.package = [datasets] | 27.111111 | 37 | 0.688525 |
8149629b7fb324ef8709a708515c861873577f3e | 1,003 | py | Python | examples/multimetric.py | tvquynh/tune-sklearn | 298709319ae856230e1287dd59bbaeabe3e66bf9 | [
"Apache-2.0"
] | 356 | 2019-12-27T09:00:52.000Z | 2022-03-24T08:19:16.000Z | examples/multimetric.py | tvquynh/tune-sklearn | 298709319ae856230e1287dd59bbaeabe3e66bf9 | [
"Apache-2.0"
] | 161 | 2020-03-06T18:57:15.000Z | 2022-03-25T13:52:18.000Z | examples/multimetric.py | tvquynh/tune-sklearn | 298709319ae856230e1287dd59bbaeabe3e66bf9 | [
"Apache-2.0"
] | 38 | 2020-03-27T04:39:24.000Z | 2022-03-24T21:29:29.000Z | """
An example training an SGDClassifier, performing grid search
using TuneGridSearchCV.
This example uses early stopping to further improve runtimes
by eliminating worse hyperparameter choices early based off
of its average test score from cross validation.
"""
from tune_sklearn import TuneGridSearchCV
from sklearn.... | 28.657143 | 71 | 0.780658 |
af90166c015f19f360473a61f33801edf56cbe30 | 997 | py | Python | tests/links_tests/model_tests/deeplab_tests/test_xception.py | beam2d/chainercv | 55d34c07cbbd03642b71d375db579433859bd00e | [
"MIT"
] | 1,600 | 2017-06-01T15:37:52.000Z | 2022-03-09T08:39:09.000Z | tests/links_tests/model_tests/deeplab_tests/test_xception.py | beam2d/chainercv | 55d34c07cbbd03642b71d375db579433859bd00e | [
"MIT"
] | 547 | 2017-06-01T06:43:16.000Z | 2021-05-28T17:14:05.000Z | tests/links_tests/model_tests/deeplab_tests/test_xception.py | beam2d/chainercv | 55d34c07cbbd03642b71d375db579433859bd00e | [
"MIT"
] | 376 | 2017-06-02T01:29:10.000Z | 2022-03-13T11:19:59.000Z | import unittest
import chainer
from chainer import testing
from chainer.testing import attr
from chainercv.links.model.deeplab.xception import Xception65
class TestXception(unittest.TestCase):
def setUp(self):
self.link = Xception65()
def check_call(self):
xp = self.link.xp
x = cha... | 24.317073 | 61 | 0.645938 |
b8a6515fae06683fd4d24526442b083dce2e4400 | 1,301 | py | Python | tests/plugin/sw_django/test_django.py | fuhuo/skywalking-python | 9cde2064409f4677df3bc1cda773e787522795cc | [
"Apache-2.0"
] | null | null | null | tests/plugin/sw_django/test_django.py | fuhuo/skywalking-python | 9cde2064409f4677df3bc1cda773e787522795cc | [
"Apache-2.0"
] | null | null | null | tests/plugin/sw_django/test_django.py | fuhuo/skywalking-python | 9cde2064409f4677df3bc1cda773e787522795cc | [
"Apache-2.0"
] | null | null | null | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 32.525 | 97 | 0.722521 |
4e29075490b8f724c36d2b5a6aa03eb2716ab2a9 | 101 | py | Python | pydantic/version.py | sindhukothe/pydantic | 46db1efdfca313e37665dff69c0777d429564015 | [
"MIT"
] | null | null | null | pydantic/version.py | sindhukothe/pydantic | 46db1efdfca313e37665dff69c0777d429564015 | [
"MIT"
] | null | null | null | pydantic/version.py | sindhukothe/pydantic | 46db1efdfca313e37665dff69c0777d429564015 | [
"MIT"
] | null | null | null | from distutils.version import StrictVersion
__all__ = ['VERSION']
VERSION = StrictVersion('1.0b2')
| 16.833333 | 43 | 0.762376 |
bf82c25926f9ec6e5a0be3d07e64f18f5d16cfd6 | 3,451 | py | Python | Dyn_Beam/functions_for_delivery/FE_utils.py | romarowski/thesis | 3393942c9b0f77b32c875a117f837486e0126897 | [
"MIT"
] | 1 | 2020-09-21T14:50:12.000Z | 2020-09-21T14:50:12.000Z | Dyn_Beam/functions_for_delivery/FE_utils.py | romarowski/thesis | 3393942c9b0f77b32c875a117f837486e0126897 | [
"MIT"
] | null | null | null | Dyn_Beam/functions_for_delivery/FE_utils.py | romarowski/thesis | 3393942c9b0f77b32c875a117f837486e0126897 | [
"MIT"
] | null | null | null | def stiffness(n_elem, E, Iz, L, fixed_dofs):
#Assemblage of the stiffness matrix for a 1D Euler-Bernoulli beam.
#Is a uniformly distributed Finite Element discretization of a beam with
#n_elem elements, length L, Young Modulus E, Flexural Inertia Iz and
#boundary conditions fixed_dofs.
import ... | 31.66055 | 128 | 0.494349 |
109872eb9d9da25eecc5d2146b5327163141f569 | 827 | py | Python | tests/python/contrib/test_ethosn/__init__.py | janifer112x/incubator-tvm | 98c2096f4944bdbdbbb2b7b20ccd35c6c11dfbf6 | [
"Apache-2.0"
] | 90 | 2019-01-26T00:38:49.000Z | 2022-03-11T23:12:34.000Z | tests/python/contrib/test_ethosn/__init__.py | janifer112x/incubator-tvm | 98c2096f4944bdbdbbb2b7b20ccd35c6c11dfbf6 | [
"Apache-2.0"
] | 91 | 2019-02-27T00:17:01.000Z | 2022-02-21T18:08:21.000Z | tests/python/contrib/test_ethosn/__init__.py | janifer112x/incubator-tvm | 98c2096f4944bdbdbbb2b7b20ccd35c6c11dfbf6 | [
"Apache-2.0"
] | 41 | 2019-01-28T14:37:03.000Z | 2022-03-31T03:58:57.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 45.944444 | 62 | 0.771463 |
6502bcfb50b1de3e5b6703929cd6eb8e41e6f859 | 25,353 | py | Python | astropy/io/ascii/tests/test_write.py | b1quint/astropy | a170a74739e4356c169429a42e554f9777b53f4d | [
"BSD-3-Clause"
] | null | null | null | astropy/io/ascii/tests/test_write.py | b1quint/astropy | a170a74739e4356c169429a42e554f9777b53f4d | [
"BSD-3-Clause"
] | null | null | null | astropy/io/ascii/tests/test_write.py | b1quint/astropy | a170a74739e4356c169429a42e554f9777b53f4d | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
import copy
from io import StringIO
from itertools import chain
import pytest
import numpy as np
from astropy.io import ascii
from astropy import table
from astropy.table.table_helpers import simple_table
from astropy.tests.helper import cat... | 34.076613 | 424 | 0.597484 |
94c1d6f1c818dd200ecc175462affc12a5fc69fd | 6,744 | py | Python | fastai/callbacks/hooks.py | ahmedsharf11/fastai | eeddfde65ddb463688bf275265d7691052c12bf1 | [
"Apache-2.0"
] | null | null | null | fastai/callbacks/hooks.py | ahmedsharf11/fastai | eeddfde65ddb463688bf275265d7691052c12bf1 | [
"Apache-2.0"
] | null | null | null | fastai/callbacks/hooks.py | ahmedsharf11/fastai | eeddfde65ddb463688bf275265d7691052c12bf1 | [
"Apache-2.0"
] | null | null | null | "Hooks provide extensibility at the model level."
from ..torch_core import *
from ..callback import *
from ..basic_train import *
from ..basic_data import *
__all__ = ['ActivationStats', 'Hook', 'HookCallback', 'Hooks', 'hook_output', 'hook_outputs',
'model_sizes', 'num_features_model', 'model_summary', 'du... | 42.15 | 109 | 0.664294 |
3197957cd1a716c26dbf3fe0a1d93bb51972b095 | 11,764 | py | Python | Detection/yolov5/utils/augmentations.py | YuHe0108/cvmodule | ea00a90fc9bbca5b2c7809791cbd1f7b0da526cd | [
"Apache-2.0"
] | null | null | null | Detection/yolov5/utils/augmentations.py | YuHe0108/cvmodule | ea00a90fc9bbca5b2c7809791cbd1f7b0da526cd | [
"Apache-2.0"
] | null | null | null | Detection/yolov5/utils/augmentations.py | YuHe0108/cvmodule | ea00a90fc9bbca5b2c7809791cbd1f7b0da526cd | [
"Apache-2.0"
] | null | null | null | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license
"""
Image augmentation functions
"""
import math
import random
import cv2
import numpy as np
from Detection.yolov5.utils.general import LOGGER, check_version, colorstr, resample_segments, segment2box
from Detection.yolov5.utils.metrics import bbox_ioa
class Albumentation... | 42.316547 | 118 | 0.568004 |
da9c9e0cada60369f33f3eb7a6903d738d9a7e78 | 9,955 | py | Python | django_plotly_dash/models.py | manish-podugu/django-plotly-dash | 5f2ec2345bef39e5f045964fd9ddefb8c596cc13 | [
"MIT"
] | 1 | 2020-06-12T07:52:41.000Z | 2020-06-12T07:52:41.000Z | django_plotly_dash/models.py | manish-podugu/django-plotly-dash | 5f2ec2345bef39e5f045964fd9ddefb8c596cc13 | [
"MIT"
] | null | null | null | django_plotly_dash/models.py | manish-podugu/django-plotly-dash | 5f2ec2345bef39e5f045964fd9ddefb8c596cc13 | [
"MIT"
] | 1 | 2020-06-12T07:53:04.000Z | 2020-06-12T07:53:04.000Z | '''
Django ORM models for dash applications
Copyright (c) 2018 Gibbs Consulting and others - see CONTRIBUTIONS.md
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including wi... | 38.735409 | 117 | 0.67102 |
a0297315a2824729806d226e37934bd0d79880cb | 18,812 | py | Python | deltaencoder.py | christinazavou/DeltaEncoder | 1913e12f50d4295612fd2172bb5c90bb03f08d15 | [
"BSD-3-Clause",
"Unlicense"
] | null | null | null | deltaencoder.py | christinazavou/DeltaEncoder | 1913e12f50d4295612fd2172bb5c90bb03f08d15 | [
"BSD-3-Clause",
"Unlicense"
] | null | null | null | deltaencoder.py | christinazavou/DeltaEncoder | 1913e12f50d4295612fd2172bb5c90bb03f08d15 | [
"BSD-3-Clause",
"Unlicense"
] | null | null | null | from __future__ import print_function
import numpy as np
import tensorflow as tf
import random
import os
from sklearn.metrics import accuracy_score
from sklearn.utils import shuffle
try:
xrange
except NameError: # Python 3
xrange = range
class linear_classifier(object):
def __init__(self, features_train... | 47.746193 | 125 | 0.578833 |
3457b0b12106d1cdb95305ba9acb0ea53ba49d01 | 2,575 | py | Python | windflow/losses/losses.py | tjvandal/windflow | 20eee2b04ca983ba1fe6399f30f7ebd67dc68b5b | [
"MIT"
] | null | null | null | windflow/losses/losses.py | tjvandal/windflow | 20eee2b04ca983ba1fe6399f30f7ebd67dc68b5b | [
"MIT"
] | null | null | null | windflow/losses/losses.py | tjvandal/windflow | 20eee2b04ca983ba1fe6399f30f7ebd67dc68b5b | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
class SmoothnessLoss(nn.Module):
def __init__(self):
super(SmoothnessLoss, self).__init__()
def forward(self, flows, mask=None):
gradx = torch.abs(flows[:,:,:,:-1] - flows[:,:,:,1:])
grady = torch.abs(flows[:,:,:-1,:] - flows[:,:,1:,:])
normal... | 29.94186 | 73 | 0.573981 |
13d7758e1395ec1d09660395d526487f3cf1411f | 40,335 | py | Python | test/functional/feature_segwit.py | maic23222/bitcoin | 474bbd3468d28f910b5df1fb7231dd5679dde5f3 | [
"MIT"
] | 28 | 2019-07-17T08:30:58.000Z | 2021-11-29T07:41:08.000Z | test/functional/feature_segwit.py | maic23222/bitcoin | 474bbd3468d28f910b5df1fb7231dd5679dde5f3 | [
"MIT"
] | 2 | 2019-10-27T03:00:26.000Z | 2019-11-05T07:47:48.000Z | test/functional/feature_segwit.py | maic23222/bitcoin | 474bbd3468d28f910b5df1fb7231dd5679dde5f3 | [
"MIT"
] | 11 | 2019-07-17T11:40:07.000Z | 2021-07-06T06:41:12.000Z | #!/usr/bin/env python3
# Copyright (c) 2016-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.
"""Test the SegWit changeover logic."""
from decimal import Decimal
from test_framework.address import (... | 63.821203 | 224 | 0.692401 |
753220da4074eaecaab6ede6200dcbddbc41b7dd | 31,967 | py | Python | src/objective.py | trevorgokey/forcebalance | 6f1fff8aa31a7c7168cf2849cd433b2a9fbe1cec | [
"BSD-3-Clause"
] | null | null | null | src/objective.py | trevorgokey/forcebalance | 6f1fff8aa31a7c7168cf2849cd433b2a9fbe1cec | [
"BSD-3-Clause"
] | null | null | null | src/objective.py | trevorgokey/forcebalance | 6f1fff8aa31a7c7168cf2849cd433b2a9fbe1cec | [
"BSD-3-Clause"
] | null | null | null | """@package forcebalance.objective
ForceBalance objective function."""
from __future__ import division
from builtins import range
from builtins import object
import sys
import inspect
#from implemented import Implemented_Targets
import numpy as np
from collections import defaultdict, OrderedDict
import forcebalance
f... | 48.28852 | 212 | 0.600932 |
fa47ed98983b4dc8b52dfda5792df33d6b5e769c | 1,374 | py | Python | model_prediction.py | Nilay26/ImageClassification | 2fdfd4bd53714bac5879326f774235b1a8681ed2 | [
"MIT"
] | null | null | null | model_prediction.py | Nilay26/ImageClassification | 2fdfd4bd53714bac5879326f774235b1a8681ed2 | [
"MIT"
] | null | null | null | model_prediction.py | Nilay26/ImageClassification | 2fdfd4bd53714bac5879326f774235b1a8681ed2 | [
"MIT"
] | null | null | null | exec(compile(open('importLibraries.py', "rb").read(), 'importLibraries.py', 'exec'))
def testdata_prediction(image_path, model, topk, device):
image = Image.open(image_path)
image_augmentation = transforms.Compose([
transforms.Resize(255),
transforms.CenterCrop(224),
transforms.ToTens... | 38.166667 | 98 | 0.671761 |
cd1722ea999476a1e1fac18ffa1bbab8fedb3140 | 1,104 | py | Python | src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/auto_upgrade_policy_resource.py | limingu/azure-cli-extensions | 1bc29f089f4da42ab8905e440f2f46d6b5b0aa97 | [
"MIT"
] | 2 | 2021-06-05T17:51:26.000Z | 2021-11-17T11:17:56.000Z | src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/auto_upgrade_policy_resource.py | limingu/azure-cli-extensions | 1bc29f089f4da42ab8905e440f2f46d6b5b0aa97 | [
"MIT"
] | 1 | 2020-06-12T01:39:40.000Z | 2020-06-12T01:39:40.000Z | src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/auto_upgrade_policy_resource.py | anpaz-msft/azure-cli-extensions | 847fd487fe61e83f2a4163a9393edc9555267bc2 | [
"MIT"
] | null | null | null | # 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 ... | 35.612903 | 93 | 0.634058 |
1cfd6e3eb04cff600b99be5a07ffc84cacf92b47 | 2,101 | py | Python | app/analysis.py | ferreiramarcelo/telegram-crypto-signals | 321d9305de5b98cc1c70bec293cafd0ce7432db3 | [
"MIT"
] | 22 | 2018-11-18T08:07:24.000Z | 2022-03-25T16:18:50.000Z | app/analysis.py | ferreiramarcelo/telegram-crypto-signals | 321d9305de5b98cc1c70bec293cafd0ce7432db3 | [
"MIT"
] | 4 | 2018-11-19T07:29:11.000Z | 2022-03-22T16:21:10.000Z | app/analysis.py | ferreiramarcelo/telegram-crypto-signals | 321d9305de5b98cc1c70bec293cafd0ce7432db3 | [
"MIT"
] | 15 | 2019-01-08T16:49:36.000Z | 2022-03-17T06:42:27.000Z | """Executes the trading strategies and analyzes the results.
"""
import math
from datetime import datetime
import structlog
import pandas
from talib import abstract
from analyzers.indicators import *
from analyzers.informants import *
from analyzers import *
class StrategyAnalyzer():
"""Contains ... | 27.644737 | 92 | 0.587815 |
b0fc772ad907a3336377912542c072e10e437159 | 330 | py | Python | test/selenium/src/lib/constants/test_runner.py | Smotko/ggrc-core | b3abb58b24e7559960d71a94ba79c75539e7fe29 | [
"Apache-2.0"
] | null | null | null | test/selenium/src/lib/constants/test_runner.py | Smotko/ggrc-core | b3abb58b24e7559960d71a94ba79c75539e7fe29 | [
"Apache-2.0"
] | 12 | 2015-01-08T14:50:19.000Z | 2017-11-29T19:37:53.000Z | test/selenium/src/lib/constants/test_runner.py | Smotko/ggrc-core | b3abb58b24e7559960d71a94ba79c75539e7fe29 | [
"Apache-2.0"
] | 1 | 2015-01-08T13:25:09.000Z | 2015-01-08T13:25:09.000Z | # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: jernej@reciprocitylabs.com
# Maintained By: jernej@reciprocitylabs.com
UPDATE_VENV = "update_env"
TEST_METHOD_PREFIX = "test_"
TEST_METHOD_POSTFIX ... | 36.666667 | 78 | 0.775758 |
52ca254db41b4174fd2329045970cdd08a7cc24d | 355 | py | Python | Packs/Microsoft365Defender/Scripts/MS365DefenderUserListToTable/MS365DefenderUserListToTable.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Microsoft365Defender/Scripts/MS365DefenderUserListToTable/MS365DefenderUserListToTable.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Microsoft365Defender/Scripts/MS365DefenderUserListToTable/MS365DefenderUserListToTable.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
def count_dict(value):
if not isinstance(value, str):
return value
users = value.split(',')
return [{'User': user for user in users}]
if __name__ in ('__main__', '__builtin__', 'builtins'):
return_res... | 23.666667 | 55 | 0.673239 |
6bcf926a5e084d8ae29d4b6a929ac4259afbb10f | 568 | py | Python | app.py | Hanifff/DES | 99f37b5e2af6b294db86d52bcf164079cf6dd41c | [
"Apache-2.0"
] | null | null | null | app.py | Hanifff/DES | 99f37b5e2af6b294db86d52bcf164079cf6dd41c | [
"Apache-2.0"
] | null | null | null | app.py | Hanifff/DES | 99f37b5e2af6b294db86d52bcf164079cf6dd41c | [
"Apache-2.0"
] | null | null | null | from flask import Flask, request
import time
import json
from part2_3des import *
from part2_des import *
from part2_helpers import *
app = Flask(__name__)
keys = {
"k1":"1000101110",
"k2": "0110101110"
}
@app.route("/decrypting")
def decrypting():
ct = request.args.get('cipher', None)
if ct:
... | 17.212121 | 47 | 0.625 |
eeb6c67d0647bfa9c1f6cfa778c538e896902213 | 326 | py | Python | wafw00f/plugins/secupress.py | biscuitehh/wafw00f | b1a08122ea3d65e2aaaa5120231cca6c37851c5b | [
"BSD-3-Clause"
] | 1 | 2020-01-17T08:09:48.000Z | 2020-01-17T08:09:48.000Z | wafw00f/plugins/secupress.py | tlsloves/wafw00f | 9682cdbdffc78150719b58390f8c5552b40a40b6 | [
"BSD-3-Clause"
] | null | null | null | wafw00f/plugins/secupress.py | tlsloves/wafw00f | 9682cdbdffc78150719b58390f8c5552b40a40b6 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
'''
Copyright (C) 2019, WAFW00F Developers.
See the LICENSE file for copying permission.
'''
NAME = 'SecuPress WP Security (SecuPress)'
def is_waf(self):
schemes = [
self.matchContent(r'<(title|h\d{1})>SecuPress'),
]
if any(i for i in schemes):
return True
return... | 20.375 | 56 | 0.641104 |
84cdcc396f8dc9c1ce07529b1bdae40c29bc6ccc | 3,914 | py | Python | setup.py | flash-center/PRadReader | b63c7c778bc6ade914141b66e1ba87fbbaf68e64 | [
"MIT"
] | null | null | null | setup.py | flash-center/PRadReader | b63c7c778bc6ade914141b66e1ba87fbbaf68e64 | [
"MIT"
] | 4 | 2017-11-20T20:00:19.000Z | 2018-03-30T17:51:40.000Z | setup.py | flash-center/PRadReader | b63c7c778bc6ade914141b66e1ba87fbbaf68e64 | [
"MIT"
] | 2 | 2017-11-28T15:20:11.000Z | 2018-06-22T18:16:40.000Z | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspa... | 35.581818 | 94 | 0.675268 |
95c4973ae18ad6203b6405a70f08da48ffe9508c | 206 | py | Python | test-8.py | NoahtheDeveloper/Learning-Python | afd93ef5bd81a7ab97d788ee6c84d7fda79b27f4 | [
"MIT"
] | null | null | null | test-8.py | NoahtheDeveloper/Learning-Python | afd93ef5bd81a7ab97d788ee6c84d7fda79b27f4 | [
"MIT"
] | null | null | null | test-8.py | NoahtheDeveloper/Learning-Python | afd93ef5bd81a7ab97d788ee6c84d7fda79b27f4 | [
"MIT"
] | null | null | null | # Prints after each name
def my_function(fname):
print(fname + " is a monkey.")
# Name Function
my_function("Joe")
# Name Function
my_function("Jim")
# Name Function
my_function("Jacob")
| 14.714286 | 33 | 0.665049 |
8d4959454abe3236471bcbf2fc8bd720f3d011e0 | 12,762 | py | Python | generate.py | Jade570/tensorflow-wavenet | 1e20ef32eb1be56caea412ce96513919a7079084 | [
"MIT"
] | null | null | null | generate.py | Jade570/tensorflow-wavenet | 1e20ef32eb1be56caea412ce96513919a7079084 | [
"MIT"
] | null | null | null | generate.py | Jade570/tensorflow-wavenet | 1e20ef32eb1be56caea412ce96513919a7079084 | [
"MIT"
] | 2 | 2020-08-11T09:21:03.000Z | 2021-02-02T03:58:45.000Z | from __future__ import division
from __future__ import print_function
import argparse
from datetime import datetime
import json
import os
import librosa
import numpy as np
import tensorflow as tf
from wavenet import WaveNetModel, mu_law_decode, mu_law_encode, audio_reader
import dynamic_changer as dynamic
import wa... | 37.315789 | 151 | 0.636812 |
3285f8663ab211b7d4f83c4441116576372250e9 | 66 | py | Python | pyp/model/__init__.py | liying2008/PYP_Manager | fd006912e071a97c5682c402b16d42c15844fe95 | [
"MIT"
] | null | null | null | pyp/model/__init__.py | liying2008/PYP_Manager | fd006912e071a97c5682c402b16d42c15844fe95 | [
"MIT"
] | null | null | null | pyp/model/__init__.py | liying2008/PYP_Manager | fd006912e071a97c5682c402b16d42c15844fe95 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
__author__ = 'liying'
| 11 | 23 | 0.575758 |
155c9bc64a676ef4e470629ddc729b27bb7bfa4c | 2,759 | py | Python | huaweicloud-sdk-dds/huaweicloudsdkdds/v3/model/add_sharding_node_volume_option.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2021-04-16T07:59:28.000Z | 2021-04-16T07:59:28.000Z | huaweicloud-sdk-dds/huaweicloudsdkdds/v3/model/add_sharding_node_volume_option.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-dds/huaweicloudsdkdds/v3/model/add_sharding_node_volume_option.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2022-01-17T02:24:18.000Z | 2022-01-17T02:24:18.000Z | # coding: utf-8
import pprint
import re
import six
class AddShardingNodeVolumeOption:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and ... | 25.081818 | 78 | 0.537514 |
02bd8d91f9472ed7f5f63a1c183a3193e4ba0035 | 6,010 | py | Python | bagc.py | batataprodz/Bitcoin-Address-Generator-Checker | fe82e4668c02aef1952d693b7d49187d55bd55da | [
"MIT"
] | 1 | 2021-05-15T13:46:34.000Z | 2021-05-15T13:46:34.000Z | bagc.py | ArthurJS/Bitcoin-Address-Generator-Checker | fe82e4668c02aef1952d693b7d49187d55bd55da | [
"MIT"
] | null | null | null | bagc.py | ArthurJS/Bitcoin-Address-Generator-Checker | fe82e4668c02aef1952d693b7d49187d55bd55da | [
"MIT"
] | 2 | 2019-11-14T13:57:45.000Z | 2020-12-21T19:29:54.000Z | #!/usr/bin/python
import os
import binascii
import ecdsa
import hashlib
import simplejson
import urllib2
import time
class Address(object):
@classmethod
def from_secret(cls, secret):
if len(secret) == 64:
return Address(binascii.unhexlify(secret))
elif len(secret) == 32:
... | 30.820513 | 124 | 0.540599 |
70ff3a4196e04de7f7e9b19ad6f18162041932e5 | 547 | py | Python | CodeSamples/Chapter6/gzip_example_post.py | PacktPublishing/Python-Microservices-Development-2nd-Edition | bbd0ed0f2f26e91cf589e539a70666057dc880eb | [
"MIT"
] | 16 | 2021-08-28T13:46:53.000Z | 2022-03-21T18:09:57.000Z | CodeSamples/Chapter6/gzip_example_post.py | saibaldas/Python-Microservices-Development-2nd-Edition | bbd0ed0f2f26e91cf589e539a70666057dc880eb | [
"MIT"
] | null | null | null | CodeSamples/Chapter6/gzip_example_post.py | saibaldas/Python-Microservices-Development-2nd-Edition | bbd0ed0f2f26e91cf589e539a70666057dc880eb | [
"MIT"
] | 15 | 2021-08-19T03:49:17.000Z | 2022-03-23T13:53:33.000Z | import asyncio
import gzip
import json
import aiohttp
async def make_request():
url = "http://127.0.0.1:5000/api_post"
headers = {
"Content-Encoding": "gzip",
}
data = {"Hello": "World!", "result": "OK"}
data = bytes(json.dumps(data), "utf8")
data = gzip.compress(data)
async with ... | 23.782609 | 65 | 0.656307 |
3d751d3491a202a51fa86118c413bc5113463671 | 2,218 | py | Python | ucscentralsdk/mometa/identpool/IdentpoolIPV6Qual.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | ucscentralsdk/mometa/identpool/IdentpoolIPV6Qual.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | ucscentralsdk/mometa/identpool/IdentpoolIPV6Qual.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for IdentpoolIPV6Qual ManagedObject."""
from ...ucscentralmo import ManagedObject
from ...ucscentralcoremeta import UcsCentralVersion, MoPropertyMeta, MoMeta
from ...ucscentralmeta import VersionMeta
class IdentpoolIPV6QualConsts():
pass
class IdentpoolIPV6Qual(M... | 47.191489 | 249 | 0.659603 |
71bc160070e2e3bb0f09b32ba1b1d5dcecacda1f | 2,378 | py | Python | INBa/2015/SOSNOVY_M_S/task_10_26.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/SOSNOVY_M_S/task_10_26.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/SOSNOVY_M_S/task_10_26.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | POINT = 30
ochki = 30
person = {"Сила":"0","Здоровье":"0","Мудрость":"0","Ловкость":"0"}
points = 0
choice = None
while choice != 0:
print("""
0 - Выход
1 - Добавить пункты к характеристике
2 - Уменьшить пункты характеристики
3 - Просмотр характеристик
""")
choice = int(input("Выбор пункта меню: "))
if... | 36.584615 | 112 | 0.549622 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.