hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79731c45232bebe13f00b321697af1e1db474d9d | 1,296 | py | Python | InterviewBit/math/rain_water_trapped.py | shrey199325/LeetCodeSolution | fede0d98d2aeeedc3cd501ac5042f2217494f4c6 | [
"Unlicense"
] | null | null | null | InterviewBit/math/rain_water_trapped.py | shrey199325/LeetCodeSolution | fede0d98d2aeeedc3cd501ac5042f2217494f4c6 | [
"Unlicense"
] | null | null | null | InterviewBit/math/rain_water_trapped.py | shrey199325/LeetCodeSolution | fede0d98d2aeeedc3cd501ac5042f2217494f4c6 | [
"Unlicense"
] | 1 | 2020-09-18T09:38:26.000Z | 2020-09-18T09:38:26.000Z | """
Rain Water Trapped
Problem Description
Given a vector A of non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.
Problem Constraints
1 <= |A| <= 100000
Input Format
First and only argument is the vector A
Output Forma... | 18.514286 | 162 | 0.604938 |
79731cb9e7809e3d2d4695d3c87a82d0a370f404 | 188,990 | py | Python | apim-migration-testing-tool/Python/venv/lib/python3.6/site-packages/pip/_vendor/idna/uts46data.py | tharindu1st/apim-migration-resources | dd68aa8c53cf310392bb72e699dd24c57b109cfb | [
"Apache-2.0"
] | 1,553 | 2015-11-09T02:17:06.000Z | 2022-03-31T20:24:52.000Z | virtual/lib/python3.6/site-packages/pip/_vendor/idna/uts46data.py | annstella/blog | 1cdb7e7e7df028a84fae9b7d901116aae577589d | [
"MIT"
] | 691 | 2015-11-05T21:32:26.000Z | 2022-03-17T10:52:45.000Z | lib/python2.7/site-packages/pip/_vendor/idna/uts46data.py | anish03/weather-dash | d517fa9da9028d1fc5d8fd71d77cee829ddee87b | [
"MIT"
] | 162 | 2015-11-06T19:38:55.000Z | 2022-03-16T02:42:41.000Z | # This file is automatically generated by tools/idna-data
# vim: set fileencoding=utf-8 :
"""IDNA Mapping Table from UTS46."""
__version__ = "10.0.0"
def _seg_0():
return [
(0x0, '3'),
(0x1, '3'),
(0x2, '3'),
(0x3, '3'),
(0x4, '3'),
(0x5, '3'),
(0x6, '3'),
(0x7, '3'),
(0x8, '3... | 23.103912 | 57 | 0.368787 |
79731cfe6c6336f663095d5e42aec847ef9c2366 | 2,607 | py | Python | tensorpack/callbacks/group.py | zhengknight/tensorpack | 726747313fb2f189dd195d32087897b16a23be0a | [
"Apache-2.0"
] | 2 | 2018-10-23T22:02:59.000Z | 2021-06-19T15:14:02.000Z | tensorpack/callbacks/group.py | zhengknight/tensorpack | 726747313fb2f189dd195d32087897b16a23be0a | [
"Apache-2.0"
] | null | null | null | tensorpack/callbacks/group.py | zhengknight/tensorpack | 726747313fb2f189dd195d32087897b16a23be0a | [
"Apache-2.0"
] | 1 | 2018-11-14T05:50:57.000Z | 2018-11-14T05:50:57.000Z | # -*- coding: utf-8 -*-
# File: group.py
import tensorflow as tf
from contextlib import contextmanager
from time import time as timer
import traceback
import six
from .base import Callback
from .hooks import CallbackToHook
from ..utils import logger
from ..utils.utils import humanize_time_delta
if six.PY3:
from... | 24.364486 | 68 | 0.568086 |
79731d58adc2519ae9d7d8cf010affe0137a2c0b | 5,474 | py | Python | honeydew.py | jjradler/honeydew | ecf813f3d9c51f21334a3e9868dae9708a26ba6d | [
"MIT"
] | null | null | null | honeydew.py | jjradler/honeydew | ecf813f3d9c51f21334a3e9868dae9708a26ba6d | [
"MIT"
] | null | null | null | honeydew.py | jjradler/honeydew | ecf813f3d9c51f21334a3e9868dae9708a26ba6d | [
"MIT"
] | null | null | null | #!/bin/env python3
#honeydew.py
"""
Script that will search all files in a directory for `TODO` and
`FIXME` comments, grouping them by filename.
No input arguments. Simply invoke `python3 honeydew.py`
The parser is searching for comment lines containing `#` followed by any number
of spaces, then `TODO` OR `FIXME` fol... | 34.2125 | 82 | 0.596639 |
79731daaef0013d32ef5820a8346be81cee6ee8a | 70 | py | Python | smtp2go/settings.py | smtp2go-oss/smtp2go-python | 929518203583c82db45e3c8bfb143df23b310a50 | [
"MIT"
] | 3 | 2018-10-28T22:32:24.000Z | 2019-04-03T09:24:37.000Z | smtp2go/settings.py | smtp2go-oss/smtp2go-python | 929518203583c82db45e3c8bfb143df23b310a50 | [
"MIT"
] | 3 | 2018-04-11T21:35:51.000Z | 2022-03-21T15:57:24.000Z | smtp2go/settings.py | smtp2go-oss/smtp2go-python | 929518203583c82db45e3c8bfb143df23b310a50 | [
"MIT"
] | 2 | 2018-04-11T20:47:56.000Z | 2018-10-21T00:04:13.000Z | API_ROOT = 'https://api.smtp2go.com/v3/'
ENDPOINT_SEND = 'email/send'
| 23.333333 | 40 | 0.714286 |
79731dd7b7e6b9ede9f462d421d55d02cf185fe6 | 1,515 | py | Python | build/scripts/copy_to_dir.py | kyper999/catboost_yandex | 91c41df3d4997dbab57fc1b8a990017270da47c6 | [
"Apache-2.0"
] | 1 | 2021-01-19T17:18:38.000Z | 2021-01-19T17:18:38.000Z | build/scripts/copy_to_dir.py | dsferz/machinelearning_yandex | 8fde8314c5c70299ece8b8f00075ddfcd5e07ddf | [
"Apache-2.0"
] | null | null | null | build/scripts/copy_to_dir.py | dsferz/machinelearning_yandex | 8fde8314c5c70299ece8b8f00075ddfcd5e07ddf | [
"Apache-2.0"
] | null | null | null | import errno
import sys
import os
import shutil
import optparse
import tarfile
def parse_args():
parser = optparse.OptionParser()
parser.add_option('--build-root')
parser.add_option('--dest-dir')
parser.add_option('--dest-arch')
return parser.parse_args()
def copy_file(src, dst):
path = os.p... | 25.25 | 134 | 0.619142 |
79731eb187941b499b8024d7459d6d81d0343e69 | 11,369 | py | Python | hand_eye_calibration/python/hand_eye_calibration/time_alignment.py | christian-rauch/hand_eye_calibration | 2203884d825451ffe7f271453282afa60b51201a | [
"BSD-3-Clause"
] | 1 | 2020-03-09T16:44:23.000Z | 2020-03-09T16:44:23.000Z | hand_eye_calibration/python/hand_eye_calibration/time_alignment.py | bygreencn/hand_eye_calibration | 5d5077572d650a5491040a4a90d98850df4cf068 | [
"BSD-3-Clause"
] | null | null | null | hand_eye_calibration/python/hand_eye_calibration/time_alignment.py | bygreencn/hand_eye_calibration | 5d5077572d650a5491040a4a90d98850df4cf068 | [
"BSD-3-Clause"
] | 1 | 2019-11-20T06:47:29.000Z | 2019-11-20T06:47:29.000Z | # Expect time stamped transformations
# Output aligned and resampled poses
from quaternion import (angular_velocity_between_quaternions,
quaternions_interpolate, Quaternion)
from time_alignment_plotting_tools import (plot_results, plot_input_data,
plot... | 37.896667 | 113 | 0.698126 |
79731f57c817562b9f5a9fe0fb04e2a6af2fd082 | 3,924 | py | Python | experiments/plot.py | jiahuanluo/Federated-Benchmark | 50df36142fd0f17c5a04bbb739e571dc940ff2b8 | [
"Apache-2.0"
] | 31 | 2019-10-18T06:00:50.000Z | 2022-03-28T10:32:51.000Z | experiments/plot.py | jiahuanluo/Federated-Benchmark | 50df36142fd0f17c5a04bbb739e571dc940ff2b8 | [
"Apache-2.0"
] | 8 | 2020-03-23T15:51:30.000Z | 2022-01-30T04:59:04.000Z | experiments/plot.py | jiahuanluo/Federated-Benchmark | 50df36142fd0f17c5a04bbb739e571dc940ff2b8 | [
"Apache-2.0"
] | 9 | 2019-10-15T06:39:00.000Z | 2021-12-09T06:48:09.000Z | # -*- coding:utf-8 -*-
# @Author : LuoJiahuan
# @File : plot.py
# @Time : 2019/7/23 16:27
import csv
from matplotlib import pyplot as plt
from scipy.interpolate import interp1d, InterpolatedUnivariateSpline, make_interp_spline, BSpline
import numpy as np
from scipy.ndimage.filters import gaussian_f... | 49.670886 | 107 | 0.656218 |
79731f82c2d9fd1971f7fda60dafcc37aae70c1f | 1,141 | py | Python | scripts/init_env.py | YAtOff/s3rsync | ebb36e47602491ef7dcb073bed9527f6243e317b | [
"MIT"
] | null | null | null | scripts/init_env.py | YAtOff/s3rsync | ebb36e47602491ef7dcb073bed9527f6243e317b | [
"MIT"
] | 1 | 2020-01-09T07:17:58.000Z | 2020-01-09T07:17:58.000Z | scripts/init_env.py | YAtOff/s3rsync | ebb36e47602491ef7dcb073bed9527f6243e317b | [
"MIT"
] | 1 | 2020-01-09T07:18:44.000Z | 2020-01-09T07:18:44.000Z | from textwrap import dedent
import click
from dynaconf import settings
@click.command()
@click.argument("s3_prefix")
def init_env(s3_prefix):
"""
Run:
source <(python scripts/init_env.py s3_prefix)
"""
print("alias s3ls='aws s3 ls'")
print("alias s3rm='aws s3 rm'")
print("alias s3cp='aw... | 28.525 | 97 | 0.63716 |
79731fc5dc188d67cc2fbb46c28d00f49e63b0cb | 488 | py | Python | .eggs/py2app-0.14-py3.6.egg/py2app/bootstrap/semi_standalone_path.py | stfbnc/mtsa_py | 0dd14f0e51e3251f10b3da781867fbc7173608eb | [
"MIT"
] | 17 | 2018-08-28T04:40:07.000Z | 2021-12-15T06:19:31.000Z | .eggs/py2app-0.14-py3.6.egg/py2app/bootstrap/semi_standalone_path.py | stfbnc/mtsa_py | 0dd14f0e51e3251f10b3da781867fbc7173608eb | [
"MIT"
] | 4 | 2019-05-17T09:35:30.000Z | 2022-03-13T03:50:20.000Z | .eggs/py2app-0.14-py3.6.egg/py2app/bootstrap/semi_standalone_path.py | stfbnc/mtsa_py | 0dd14f0e51e3251f10b3da781867fbc7173608eb | [
"MIT"
] | 3 | 2019-01-15T07:13:53.000Z | 2020-03-29T00:48:39.000Z | def _update_path():
import os
import sys
resources = os.environ['RESOURCEPATH']
sys.path.append(os.path.join(
resources, 'lib', 'python%d.%d' % (
sys.version_info[:2]), 'lib-dynload'))
sys.path.append(os.path.join(
resources, 'lib', 'python%d.%d' % (
sys.vers... | 27.111111 | 56 | 0.565574 |
79731fe857ba02841c3def8d686bbe35766b5f8b | 7,611 | py | Python | plotting/LSDPlottingTools/inundation.py | fclubb/fault-swath | 687b1af26a969b1ed4e94cc597b23762fd1bb3da | [
"MIT"
] | null | null | null | plotting/LSDPlottingTools/inundation.py | fclubb/fault-swath | 687b1af26a969b1ed4e94cc597b23762fd1bb3da | [
"MIT"
] | null | null | null | plotting/LSDPlottingTools/inundation.py | fclubb/fault-swath | 687b1af26a969b1ed4e94cc597b23762fd1bb3da | [
"MIT"
] | 1 | 2019-04-29T16:13:44.000Z | 2019-04-29T16:13:44.000Z | # -*- coding: utf-8 -*-
"""
inundation.py
A script that calculates the area of the model/DEM domain that is inundated by
water; either across the entire domain, the floodplain (using Fiona's floodplain
ID algorithm, or in the Channel, using the channel network and measuring along
this line. The mean, max, and ... | 43.741379 | 137 | 0.703718 |
79732010b2b2c30ef490b65954d937fac93dccb2 | 2,256 | py | Python | version.py | groupserver/gs.group.messages.post.text | 22d93ef2abef52395297a69b726e56c2e1059351 | [
"ZPL-2.1"
] | null | null | null | version.py | groupserver/gs.group.messages.post.text | 22d93ef2abef52395297a69b726e56c2e1059351 | [
"ZPL-2.1"
] | null | null | null | version.py | groupserver/gs.group.messages.post.text | 22d93ef2abef52395297a69b726e56c2e1059351 | [
"ZPL-2.1"
] | null | null | null | # -*- coding: utf-8 -*-
version = '1.1.2'
release = False
#--------------------------------------------------------------------------#
import sys
if (sys.version_info < (3, )):
from commands import getstatusoutput
else:
from subprocess import getstatusoutput # lint:ok
import datetime
import os
import glob
c... | 29.298701 | 76 | 0.596188 |
79732026189df45214ca4b4d83f32a79932401e0 | 9,806 | py | Python | ddtrace/api.py | ewjoachim/dd-trace-py | 64d8307800aface32a74b8e40a2746c613bb1326 | [
"BSD-3-Clause"
] | null | null | null | ddtrace/api.py | ewjoachim/dd-trace-py | 64d8307800aface32a74b8e40a2746c613bb1326 | [
"BSD-3-Clause"
] | null | null | null | ddtrace/api.py | ewjoachim/dd-trace-py | 64d8307800aface32a74b8e40a2746c613bb1326 | [
"BSD-3-Clause"
] | null | null | null | # stdlib
import time
import ddtrace
from json import loads
import socket
# project
from .encoding import get_encoder, JSONEncoder
from .compat import httplib, PYTHON_VERSION, PYTHON_INTERPRETER, get_connection_response
from .internal.logger import get_logger
from .payload import Payload, PayloadFull
from .utils.deprec... | 38.007752 | 115 | 0.600041 |
7973206b7fc0f1db10bbae0b239dc6e01fadcd84 | 103 | py | Python | sparql_dataframe/__init__.py | mac389/sparql-dataframe | 225016fdcce88e25b405033691b048665f8822ec | [
"MIT"
] | 20 | 2018-03-13T03:22:38.000Z | 2022-03-26T07:49:52.000Z | sparql_dataframe/__init__.py | mac389/sparql-dataframe | 225016fdcce88e25b405033691b048665f8822ec | [
"MIT"
] | 9 | 2018-05-20T15:27:25.000Z | 2021-11-22T18:28:02.000Z | sparql_dataframe/__init__.py | mac389/sparql-dataframe | 225016fdcce88e25b405033691b048665f8822ec | [
"MIT"
] | 4 | 2018-05-20T13:36:07.000Z | 2020-09-13T14:12:45.000Z | from .sparql_dataframe import get_sparql_dataframe as get
from .sparql_dataframe import QueryException
| 34.333333 | 57 | 0.883495 |
7973211b79214578ef3ef2223e96b22ac2137e84 | 355 | py | Python | aRibeiro/util/__init__.py | A-Ribeiro/ARibeiroPythonFramework | e81c5499d642560264c2f1d5a5194aded9c3b45a | [
"MIT"
] | 1 | 2021-07-22T16:26:56.000Z | 2021-07-22T16:26:56.000Z | aRibeiro/util/__init__.py | A-Ribeiro/ARibeiroPythonFramework | e81c5499d642560264c2f1d5a5194aded9c3b45a | [
"MIT"
] | null | null | null | aRibeiro/util/__init__.py | A-Ribeiro/ARibeiroPythonFramework | e81c5499d642560264c2f1d5a5194aded9c3b45a | [
"MIT"
] | 1 | 2021-07-27T13:13:47.000Z | 2021-07-27T13:13:47.000Z | #
# For this is how God loved the world:<br/>
# he gave his only Son, so that everyone<br/>
# who believes in him may not perish<br/>
# but may have eternal life.
#
# John 3:16
#
from aRibeiro.util.GLVirtualImage import *
from aRibeiro.util.LineRenderer import *
from aRibeiro.util.GLInitialSettings import *
from aRibe... | 27.307692 | 45 | 0.752113 |
7973226b9736e5706c778d728e35fe37c84e6489 | 270 | py | Python | biometric_attendance/biometric_attendance/doctype/punch_status_child/punch_status_child.py | umaepoch/Biometric-Attendance | 308d8646320a2913c6a784af27e8aa6b48721bb1 | [
"MIT"
] | null | null | null | biometric_attendance/biometric_attendance/doctype/punch_status_child/punch_status_child.py | umaepoch/Biometric-Attendance | 308d8646320a2913c6a784af27e8aa6b48721bb1 | [
"MIT"
] | null | null | null | biometric_attendance/biometric_attendance/doctype/punch_status_child/punch_status_child.py | umaepoch/Biometric-Attendance | 308d8646320a2913c6a784af27e8aa6b48721bb1 | [
"MIT"
] | 2 | 2021-08-17T09:23:06.000Z | 2021-09-02T07:16:43.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2020, Epoch Consultancy and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class punchstatuschile(Document):
pass
| 24.545455 | 56 | 0.788889 |
797322c1d198a74afa019945ac6229d6f16a6bc3 | 1,071 | py | Python | leasing/management/commands/payable_rent_calculation.py | City-of-Helsinki/mvj | 6f786047805a968317ecc37b38c2262ada2c3805 | [
"MIT"
] | 1 | 2021-01-12T08:14:10.000Z | 2021-01-12T08:14:10.000Z | leasing/management/commands/payable_rent_calculation.py | City-of-Helsinki/mvj | 6f786047805a968317ecc37b38c2262ada2c3805 | [
"MIT"
] | 249 | 2017-04-18T14:00:13.000Z | 2022-03-30T12:18:03.000Z | leasing/management/commands/payable_rent_calculation.py | City-of-Helsinki/mvj | 6f786047805a968317ecc37b38c2262ada2c3805 | [
"MIT"
] | 7 | 2017-04-18T08:43:54.000Z | 2021-07-28T07:29:30.000Z | import logging
import sys
from django.core.management.base import BaseCommand
from leasing.models import Rent
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = "Payable rent calculation"
def handle(self, *args, **options): # noqa: C901 TODO
from auditlog.registry import audi... | 28.945946 | 88 | 0.613445 |
7973233a9b773eedd0ce20b5edcc6e0b3cab4d85 | 7,705 | py | Python | pypureclient/flasharray/FA_2_1/models/volume.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 14 | 2018-12-07T18:30:27.000Z | 2022-02-22T09:12:33.000Z | pypureclient/flasharray/FA_2_1/models/volume.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 28 | 2019-09-17T21:03:52.000Z | 2022-03-29T22:07:35.000Z | pypureclient/flasharray/FA_2_1/models/volume.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 15 | 2020-06-11T15:50:08.000Z | 2022-03-21T09:27:25.000Z | # coding: utf-8
"""
FlashArray REST API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re
import six
import typing
from .... | 38.718593 | 461 | 0.590526 |
797323992abaeff474357712891c2e1872c5a5d8 | 858 | py | Python | src/decorators.py | 4theKnowledge/s-vaal | b35292bb7f209093ff907f8fe81e3e9a5b74a67d | [
"MIT"
] | null | null | null | src/decorators.py | 4theKnowledge/s-vaal | b35292bb7f209093ff907f8fe81e3e9a5b74a67d | [
"MIT"
] | null | null | null | src/decorators.py | 4theKnowledge/s-vaal | b35292bb7f209093ff907f8fe81e3e9a5b74a67d | [
"MIT"
] | null | null | null | """
Decorator test bed
"""
import random
import numpy as np
# Takes function as an argument
def trial_runner(**kwargs):
""" Runs n trials of wrapped function.
Arguments
---------
runs : int
Number of trial runs
func : function object
TODO
"""
def run_wrappe... | 21.45 | 78 | 0.566434 |
7973241729067bdba56ff12726e4907b556ed751 | 9,863 | py | Python | kedro/extras/datasets/pickle/pickle_dataset.py | moutai/kedro | ebcd659f02948e79e7a7930026ca23776028014c | [
"Apache-2.0"
] | 2 | 2021-08-04T08:58:38.000Z | 2021-08-04T18:54:07.000Z | kedro/extras/datasets/pickle/pickle_dataset.py | moutai/kedro | ebcd659f02948e79e7a7930026ca23776028014c | [
"Apache-2.0"
] | null | null | null | kedro/extras/datasets/pickle/pickle_dataset.py | moutai/kedro | ebcd659f02948e79e7a7930026ca23776028014c | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 QuantumBlack Visual Analytics Limited
#
# 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
#
# THE SOFTWARE IS PROVIDED "AS IS",... | 41.792373 | 109 | 0.634999 |
79732547edfda83667da290cc9c4b95700c74a2a | 1,254 | py | Python | extract-identified-mgf/mgf_identified.py | mofhu/bioinformatics | f418aff49b3c0296d2b20557175de81c76fa5f9d | [
"MIT"
] | null | null | null | extract-identified-mgf/mgf_identified.py | mofhu/bioinformatics | f418aff49b3c0296d2b20557175de81c76fa5f9d | [
"MIT"
] | 1 | 2015-06-24T11:40:28.000Z | 2015-07-15T04:43:28.000Z | extract-identified-mgf/mgf_identified.py | Frank-the-Obscure/mascot-csv-process | f418aff49b3c0296d2b20557175de81c76fa5f9d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Author Frank Hu
# select and copy identified peaks to a new mgf file.
# input: directory of mgf files / cleaned query list / output file name
# output: a new mgf file of identified peaks
# 提取 mgf 文件中的特定谱图(通过 csv 文件), 并生成一个新的 mgf 文件.
import os
from sys import argv
import re
script,... | 27.26087 | 72 | 0.627592 |
797325b100db76a370f45ff0156dba26eea1f6d3 | 5,449 | py | Python | tests/doc_test/doc_style_custom/conf.py | swaldhoer/sphinxcontrib-needs | 202135d78f91f75aa03228323ccb03347639f075 | [
"MIT"
] | 90 | 2016-11-30T21:23:10.000Z | 2022-01-11T16:33:56.000Z | tests/doc_test/doc_style_custom/conf.py | swaldhoer/sphinxcontrib-needs | 202135d78f91f75aa03228323ccb03347639f075 | [
"MIT"
] | 359 | 2016-12-02T14:53:44.000Z | 2022-03-31T11:59:03.000Z | tests/doc_test/doc_style_custom/conf.py | swaldhoer/sphinxcontrib-needs | 202135d78f91f75aa03228323ccb03347639f075 | [
"MIT"
] | 25 | 2018-06-20T18:56:13.000Z | 2022-03-25T06:11:40.000Z | # -*- coding: utf-8 -*-
#
# needs test docs documentation build configuration file, created by
# sphinx-quickstart on Tue Mar 28 11:37:14 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated fil... | 33.635802 | 118 | 0.676638 |
7973267bac17cce5f987916f6ed1efe42da9383c | 926 | py | Python | scripts/_common.py | LibrariesHacked/mobilelibraries-data | f14e891261a2d170326f92395f4a41867e8ceef7 | [
"MIT"
] | null | null | null | scripts/_common.py | LibrariesHacked/mobilelibraries-data | f14e891261a2d170326f92395f4a41867e8ceef7 | [
"MIT"
] | 92 | 2019-04-13T21:59:34.000Z | 2020-11-27T22:58:28.000Z | scripts/_common.py | LibrariesHacked/mobilelibraries-data | f14e891261a2d170326f92395f4a41867e8ceef7 | [
"MIT"
] | null | null | null | import csv
from datetime import datetime
DATA_OUTPUT = '../data/'
def create_mobile_library_file(organisation, filename, mobiles):
with open(DATA_OUTPUT + filename, 'w', encoding='utf8', newline='') as out_csv:
mobiles = sorted(mobiles, key=lambda row: (row[1], row[2], datetime.strptime('01/01/2020 ' + row[11], '... | 54.470588 | 126 | 0.603672 |
797326c402ea9fb8730aa6f6f9a86d7594be14db | 17,731 | py | Python | mojo/devtools/common/android_stack_parser/symbol.py | TribeMedia/sky_engine | 4a3894ed246327931b198a7d64652bd0b615b036 | [
"BSD-3-Clause"
] | 1 | 2021-06-12T00:47:29.000Z | 2021-06-12T00:47:29.000Z | mojo/devtools/common/android_stack_parser/symbol.py | TribeMedia/sky_engine | 4a3894ed246327931b198a7d64652bd0b615b036 | [
"BSD-3-Clause"
] | null | null | null | mojo/devtools/common/android_stack_parser/symbol.py | TribeMedia/sky_engine | 4a3894ed246327931b198a7d64652bd0b615b036 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (C) 2013 The Android Open Source Project
#
# 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 ... | 31.437943 | 82 | 0.685353 |
797326df986283e4efdd907377b80cd05c0c36ff | 715 | py | Python | data/external/repositories_2to3/197834/Kaggle_Avito-2015-master/features.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories_2to3/197834/Kaggle_Avito-2015-master/features.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories_2to3/197834/Kaggle_Avito-2015-master/features.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | 1 | 2019-12-04T08:23:33.000Z | 2019-12-04T08:23:33.000Z | import re
import pdb
KEY_PATTERN = r'(\d+):'
def jaccard_keys(search_params, ad_params):
'''
Computes Jaccard similarity between the keys of the Params for an ad
and the SearchParams from SearchInfo.
args:
params1, params2 - the strings containing the Params, if any.
Expects an e... | 28.6 | 83 | 0.665734 |
797327050212ab5cba290c76455d06cce5953e92 | 5,569 | py | Python | piaplib/lint/check.py | reactive-firewall/PiAP-python-tools | 0313956cef86a4e44c606280e07afb2b94864581 | [
"MIT-0"
] | 2 | 2017-05-01T10:25:33.000Z | 2018-06-22T21:54:52.000Z | piaplib/lint/check.py | reactive-firewall/PiAP-python-tools | 0313956cef86a4e44c606280e07afb2b94864581 | [
"MIT-0"
] | 89 | 2017-05-05T22:11:03.000Z | 2020-04-05T03:06:36.000Z | piaplib/lint/check.py | reactive-firewall/PiAP-python-tools | 0313956cef86a4e44c606280e07afb2b94864581 | [
"MIT-0"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# Pocket PiAP
# ......................................................................
# Copyright (c) 2017-2020, Kendrick Walls
# ......................................................................
# Licensed under MIT (the "License");
# you may not use this file exce... | 25.782407 | 91 | 0.679835 |
797327a5e307f2759df3652c905d7d9fb655159c | 1,155 | py | Python | users/users/domain/paginable.py | madEng84/pycon | 31d71b7a86398a7b0518e909ae939aaffd181091 | [
"MIT"
] | 56 | 2018-01-20T17:18:40.000Z | 2022-03-28T22:42:04.000Z | users/users/domain/paginable.py | madEng84/pycon | 31d71b7a86398a7b0518e909ae939aaffd181091 | [
"MIT"
] | 2,029 | 2018-01-20T11:37:24.000Z | 2022-03-31T04:10:51.000Z | users/users/domain/paginable.py | madEng84/pycon | 31d71b7a86398a7b0518e909ae939aaffd181091 | [
"MIT"
] | 17 | 2018-03-17T09:44:28.000Z | 2021-12-27T19:57:35.000Z | from dataclasses import dataclass
from typing import Generic, Type, TypeVar
from sqlalchemy.ext.asyncio.session import AsyncSession
from sqlalchemy.sql.expression import func, select
from users.settings import DEFAULT_PAGINATION_TO
T = TypeVar("T")
@dataclass
class Page(Generic[T]):
items: list[T]
total_co... | 28.875 | 82 | 0.672727 |
797327d28b37b6fad980ab88121ada9c9a4b571c | 8,992 | py | Python | TorrentSpider_AsianNomosaic_With_Json.py | huihut/1024Spiders | 995b44636c0ee3caa3ef2212e9af2440d23afb91 | [
"MIT"
] | 27 | 2019-01-28T08:07:51.000Z | 2022-02-23T10:43:09.000Z | TorrentSpider_AsianNomosaic_With_Json.py | hellowac/1024Spiders | 995b44636c0ee3caa3ef2212e9af2440d23afb91 | [
"MIT"
] | null | null | null | TorrentSpider_AsianNomosaic_With_Json.py | hellowac/1024Spiders | 995b44636c0ee3caa3ef2212e9af2440d23afb91 | [
"MIT"
] | 11 | 2019-01-29T13:34:18.000Z | 2021-10-31T14:20:10.000Z | #!/usr/bin/python
#-*-coding:utf-8 -*-
import _thread
import re
import requests
from bs4 import BeautifulSoup
from urllib.parse import urlencode, parse_qs, urlsplit, urlunsplit
from urllib.request import urlretrieve
import urllib.request
import os
import json
config = object
# Read configuration from [config.json]
... | 35.824701 | 119 | 0.531695 |
79732959e9e05bf226c5ed33822f20eeecc50a51 | 2,046 | py | Python | app/api.py | shashidhar0508/fastapi-jwt | 56c77c57ce33b44c9faa54c37705cc357713a4d5 | [
"MIT"
] | null | null | null | app/api.py | shashidhar0508/fastapi-jwt | 56c77c57ce33b44c9faa54c37705cc357713a4d5 | [
"MIT"
] | null | null | null | app/api.py | shashidhar0508/fastapi-jwt | 56c77c57ce33b44c9faa54c37705cc357713a4d5 | [
"MIT"
] | null | null | null | from fastapi import FastAPI, Body, Depends
from app.model import PostSchema, UserSchema, UserLoginSchema
from app.auth.auth_bearer import JWTBearer
from app.auth.auth_handler import signJWT
from fastapi.middleware.cors import CORSMiddleware
posts = [
{
"id": 1,
"title": "Pancake",
"conten... | 22 | 86 | 0.609482 |
79732a192d7416294ffb2d0b57c880d3afb07cbc | 1,356 | py | Python | osmchadjango/users/tests/test_models.py | juusokor/osmcha-django | 5daafa015d5e341aa8ad6f847be2b7cc1a204e2b | [
"BSD-2-Clause"
] | null | null | null | osmchadjango/users/tests/test_models.py | juusokor/osmcha-django | 5daafa015d5e341aa8ad6f847be2b7cc1a204e2b | [
"BSD-2-Clause"
] | null | null | null | osmchadjango/users/tests/test_models.py | juusokor/osmcha-django | 5daafa015d5e341aa8ad6f847be2b7cc1a204e2b | [
"BSD-2-Clause"
] | null | null | null | from django.core.exceptions import ValidationError
from django.db.utils import IntegrityError
from django.test import TestCase
from ..models import User
class TestUserModel(TestCase):
def setUp(self):
self.user = User.objects.create_user(
username='test',
password='password',
... | 34.769231 | 74 | 0.622419 |
79732b51ae9e54510df0e78228566e5f8b87aa8d | 572 | py | Python | mcutils/django/templatetags/form_utils.py | sprymak/metacorus-django-utils | dc2c3ff54ec0c56c259d0920e30b251b7c0f5fd6 | [
"MIT"
] | null | null | null | mcutils/django/templatetags/form_utils.py | sprymak/metacorus-django-utils | dc2c3ff54ec0c56c259d0920e30b251b7c0f5fd6 | [
"MIT"
] | null | null | null | mcutils/django/templatetags/form_utils.py | sprymak/metacorus-django-utils | dc2c3ff54ec0c56c259d0920e30b251b7c0f5fd6 | [
"MIT"
] | null | null | null | import copy
from django.template import Library
from django.utils import six
from django.utils.datastructures import SortedDict
register = Library()
@register.assignment_tag
def fieldset(form, field_names):
fields = list(filter(lambda s: bool(s.strip()), field_names.split(',')))
new_form = copy.copy(form)
... | 22.88 | 76 | 0.702797 |
79732b5959bc2bf8873f7fe844895a75c01804d4 | 1,739 | py | Python | V2RaycSpider1225/examples/service_discovery_general.py | oooxiaolin/V2RayCloudSpider | 1bcdf645534d5849aa82e7f28b8ff0a321142eb7 | [
"MIT"
] | null | null | null | V2RaycSpider1225/examples/service_discovery_general.py | oooxiaolin/V2RayCloudSpider | 1bcdf645534d5849aa82e7f28b8ff0a321142eb7 | [
"MIT"
] | null | null | null | V2RaycSpider1225/examples/service_discovery_general.py | oooxiaolin/V2RayCloudSpider | 1bcdf645534d5849aa82e7f28b8ff0a321142eb7 | [
"MIT"
] | null | null | null | # feat service-discovery-general
# - [×] base on gevent
# - [√] 订阅链接不存储
# - [√] 订阅链接解析
# - [√] 任务1:是否可用(基于类型的判断)
# - [√] 任务2:可用时长,可用流量(不自动签到)
# - [√] 任务3:实体存储,生成统计报表
# - Format
# provider subType passable enDay enFlow nodeNum context
# https:// v2ray yes/no ... | 26.753846 | 101 | 0.622772 |
79732bc95337975877a912d9cdd1bf5041d83c88 | 83 | py | Python | BBS/App1/apps.py | H1Y2F3/BBSPROJECT | 924ddcf4a6ed85f0d073495d7177c1e8721abacf | [
"MIT"
] | 1 | 2020-09-13T13:45:14.000Z | 2020-09-13T13:45:14.000Z | BBS/App1/apps.py | H1Y2F3/BBSPROJECT | 924ddcf4a6ed85f0d073495d7177c1e8721abacf | [
"MIT"
] | 5 | 2021-03-30T13:32:51.000Z | 2021-09-22T19:08:59.000Z | BBS/App1/apps.py | H1Y2F3/BBSPROJECT | 924ddcf4a6ed85f0d073495d7177c1e8721abacf | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class App1Config(AppConfig):
name = 'App1'
| 13.833333 | 33 | 0.73494 |
79732c7285b57c4715709e4754ae440ab3df05fb | 12,920 | py | Python | pyctest_tomopy.py | mrakitin/tomopy | 6e972c885b59240e7d9f66fc41698909899b8458 | [
"BSD-3-Clause"
] | null | null | null | pyctest_tomopy.py | mrakitin/tomopy | 6e972c885b59240e7d9f66fc41698909899b8458 | [
"BSD-3-Clause"
] | null | null | null | pyctest_tomopy.py | mrakitin/tomopy | 6e972c885b59240e7d9f66fc41698909899b8458 | [
"BSD-3-Clause"
] | 1 | 2019-11-12T17:21:31.000Z | 2019-11-12T17:21:31.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
PyCTest driver for TomoPy
"""
import os
import sys
import glob
import shutil
import argparse
import platform
import warnings
import traceback
import subprocess as sp
import multiprocessing as mp
import pyctest.pyctest as pyctest
import pyctest.pycmake as pycmake
impo... | 37.233429 | 90 | 0.598607 |
79732d669058e58222d8c09a1c9162cd1a4ceb38 | 725 | py | Python | chamber/utils/tqdm.py | druids/django-chamber | 6eea8fd5f00d739284e9e9b59ec0cf446d54f796 | [
"BSD-3-Clause"
] | 9 | 2016-03-16T13:49:47.000Z | 2021-02-15T01:26:18.000Z | chamber/utils/tqdm.py | druids/django-chamber | 6eea8fd5f00d739284e9e9b59ec0cf446d54f796 | [
"BSD-3-Clause"
] | 96 | 2016-11-16T12:19:53.000Z | 2022-03-11T23:42:25.000Z | chamber/utils/tqdm.py | druids/django-chamber | 6eea8fd5f00d739284e9e9b59ec0cf446d54f796 | [
"BSD-3-Clause"
] | 9 | 2016-03-12T22:35:18.000Z | 2019-10-25T10:42:16.000Z | from django.core.management.base import OutputWrapper
from tqdm import tqdm as original_tqdm
class CommandOutputTMDQWrapper:
"""
Wrapper around stdout/stderr
"""
def __init__(self, out):
self._out = out
def __getattr__(self, name):
return getattr(self._out, name)
def isatty... | 20.714286 | 66 | 0.627586 |
79732de08e88e33f935dd7218badaae4c08d535b | 5,790 | py | Python | regex_demo.py | patrick-s-h-lewis/IceBreak | 8dfed6ca70d60b20292f2a453c966d6d6022ed13 | [
"MIT"
] | null | null | null | regex_demo.py | patrick-s-h-lewis/IceBreak | 8dfed6ca70d60b20292f2a453c966d6d6022ed13 | [
"MIT"
] | null | null | null | regex_demo.py | patrick-s-h-lewis/IceBreak | 8dfed6ca70d60b20292f2a453c966d6d6022ed13 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Basic regular expression demostration facility (Perl style syntax)."""
from Tkinter import *
import re
class ReDemo:
def __init__(self, master):
self.master = master
self.promptdisplay = Label(self.master, anchor=W,
text="Enter a Perl-style regular expres... | 33.662791 | 73 | 0.515026 |
79732de8cc0ade3fb8881c51947dddf3e4e2c7b5 | 789 | py | Python | website/whisper/views.py | Bigpop/Vue3-Django-drf | 899fca9fed3a7d51a0e39a5ac4ec2103596eedef | [
"MIT"
] | 1 | 2021-12-11T10:10:48.000Z | 2021-12-11T10:10:48.000Z | website/whisper/views.py | Bigpop/vue3-django-drf | 899fca9fed3a7d51a0e39a5ac4ec2103596eedef | [
"MIT"
] | null | null | null | website/whisper/views.py | Bigpop/vue3-django-drf | 899fca9fed3a7d51a0e39a5ac4ec2103596eedef | [
"MIT"
] | null | null | null | from rest_framework.permissions import IsAdminUser
from django.shortcuts import render
from django.http import Http404
from django.http import HttpResponse
from django.views.generic import ListView, DetailView, View
from .models import Whisper
from website.settings import BASE_DIR
import json
class WhisperList(ListV... | 26.3 | 67 | 0.765526 |
797331420133e02b1ba9fc50f57aff28eb25cdf9 | 10,330 | py | Python | androidcrypto/experiment.py | adamjanovsky/AndroidMalwareCrypto | bacd30c2fa0dd00879604f713f6eedb9fa22e3cb | [
"MIT"
] | 1 | 2022-01-18T05:25:18.000Z | 2022-01-18T05:25:18.000Z | androidcrypto/experiment.py | adamjanovsky/AndroidMalwareCrypto | bacd30c2fa0dd00879604f713f6eedb9fa22e3cb | [
"MIT"
] | 22 | 2021-08-06T11:01:50.000Z | 2022-03-12T01:00:13.000Z | androidcrypto/experiment.py | adamjanovsky/AndroidMalwareCrypto | bacd30c2fa0dd00879604f713f6eedb9fa22e3cb | [
"MIT"
] | null | null | null | import functools
import logging
import os
import shutil
import sys
import json
from datetime import datetime, timedelta
from multiprocessing import Pool
import neptune
from stopit import SignalTimeout, TimeoutException
import androidcrypto.constants as constants
from androidcrypto.constants import StatusCode, Evaluat... | 43.041667 | 140 | 0.667086 |
7973315058930c3dc97192739877363df960c92d | 282 | py | Python | flucoma/exceptions.py | jamesb93/python-flucoma | da745160993f2e33f77c5389808efb4966ca88a2 | [
"BSD-3-Clause"
] | 9 | 2020-06-18T08:08:22.000Z | 2022-01-22T02:10:35.000Z | flucoma/exceptions.py | jamesb93/python-flucoma | da745160993f2e33f77c5389808efb4966ca88a2 | [
"BSD-3-Clause"
] | null | null | null | flucoma/exceptions.py | jamesb93/python-flucoma | da745160993f2e33f77c5389808efb4966ca88a2 | [
"BSD-3-Clause"
] | 1 | 2021-06-02T09:10:22.000Z | 2021-06-02T09:10:22.000Z | class BinError(Exception):
def __init__(self, msg:str):
super().__init__(msg)
class ShellError(Exception):
def __init__(self, msg:str):
super().__init__(msg)
class DatasetPointError(Exception):
def __init__(self, msg:str):
super().__init__(msg) | 25.636364 | 35 | 0.666667 |
7973319c299337117898d820d8d370111407d247 | 1,419 | py | Python | Alexnet/image_net_demo.py | SunnyMarkLiu/Deep_Learning_In_Action | 50a90a2af0b7b8887ff3ca4699fa991f532aebc4 | [
"MIT"
] | 8 | 2017-03-11T14:50:14.000Z | 2020-02-13T18:29:45.000Z | Alexnet/image_net_demo.py | SunnyMarkLiu/Deep_Learning_In_Action | 50a90a2af0b7b8887ff3ca4699fa991f532aebc4 | [
"MIT"
] | 1 | 2019-03-06T00:49:25.000Z | 2019-03-06T00:49:25.000Z | Alexnet/image_net_demo.py | SunnyMarkLiu/Deep_Learning_In_Action | 50a90a2af0b7b8887ff3ca4699fa991f532aebc4 | [
"MIT"
] | 5 | 2017-03-11T14:49:56.000Z | 2020-02-29T12:53:42.000Z | #!/home/sunnymarkliu/software/miniconda2/bin/python
# _*_ coding: utf-8 _*_
"""
Alexnet predict ImageNet demo.
@author: MarkLiu
@time : 17-3-6 上午11:23
"""
from alex_net import Alexnet
from caffe_classes import class_names
import tensorflow as tf
import utils
import numpy as np
import os
import cv2
def main():
... | 28.959184 | 98 | 0.663848 |
797331e089b9a9008baf6713de9784ee626e3ab6 | 259 | py | Python | bank_diary/defaults.py | hgminh95/bank-diary | 4082dd10a6ade0369fa86ae971fbdbe056b50a8a | [
"MIT"
] | 1 | 2018-05-21T08:20:36.000Z | 2018-05-21T08:20:36.000Z | bank_diary/defaults.py | hgminh95/bank-diary | 4082dd10a6ade0369fa86ae971fbdbe056b50a8a | [
"MIT"
] | null | null | null | bank_diary/defaults.py | hgminh95/bank-diary | 4082dd10a6ade0369fa86ae971fbdbe056b50a8a | [
"MIT"
] | null | null | null | from bank_diary.classifier import *
classifier = ClassifierSet([
Classifier('transport', lambda t: t.client_ref == 'EZT'),
RegexClassifier([
('food', 'CHICKEN RICE'),
('transport', 'EXPEDIA'),
('utility', 'SINGTEL')
])
])
| 23.545455 | 61 | 0.590734 |
7973328b1b8c15685225529e8df29ef57776754a | 4,635 | py | Python | cjupyter.py | tboudreaux/ZSH_conda | 90c306855f1fcba696d0242b7d8a335908e6c72b | [
"MIT"
] | 9 | 2018-07-14T21:13:08.000Z | 2021-03-12T12:51:06.000Z | cjupyter.py | tboudreaux/ZSH_conda | 90c306855f1fcba696d0242b7d8a335908e6c72b | [
"MIT"
] | null | null | null | cjupyter.py | tboudreaux/ZSH_conda | 90c306855f1fcba696d0242b7d8a335908e6c72b | [
"MIT"
] | 1 | 2020-01-05T03:08:28.000Z | 2020-01-05T03:08:28.000Z | #!/anaconda/bin/python
from __future__ import print_function
import subprocess as sp
import sys
import os
import time
import socket
from contextlib import closing
import color_codes as cc
from notebook import notebookapp
import argparse
parser = argparse.ArgumentParser(description='Start Jupyter Lab in the current or... | 45.441176 | 142 | 0.615102 |
797332953a080618cfc15a66b570fd55438632e5 | 2,258 | py | Python | src/foreign_if/python/UT/src/dt/test_007.py | XpressAI/frovedis | bda0f2c688fb832671c5b542dd8df1c9657642ff | [
"BSD-2-Clause"
] | 63 | 2018-06-21T14:11:59.000Z | 2022-03-30T11:24:36.000Z | src/foreign_if/python/UT/src/dt/test_007.py | XpressAI/frovedis | bda0f2c688fb832671c5b542dd8df1c9657642ff | [
"BSD-2-Clause"
] | 5 | 2018-09-22T14:01:53.000Z | 2021-12-27T16:11:05.000Z | src/foreign_if/python/UT/src/dt/test_007.py | XpressAI/frovedis | bda0f2c688fb832671c5b542dd8df1c9657642ff | [
"BSD-2-Clause"
] | 12 | 2018-08-23T15:59:44.000Z | 2022-02-20T06:47:22.000Z | #!/usr/bin/env python
from frovedis.exrpc.server import FrovedisServer
from frovedis.mllib.tree import DecisionTreeClassifier
from frovedis.mllib.tree import DecisionTreeRegressor
import sys
import numpy as np
import pandas as pd
# Objective : When read data using file
# initializing the Frovedis server
argvs = sys.... | 33.205882 | 142 | 0.723649 |
797334362cbf075be635349661d3c4b3ff63cffc | 17,250 | py | Python | PaddleNLP/paddlenlp/transformers/roberta/tokenizer.py | weiwei1115/models | e2c96c5f64b1dc8f0d5d9aa121300b87150e11e3 | [
"Apache-2.0"
] | null | null | null | PaddleNLP/paddlenlp/transformers/roberta/tokenizer.py | weiwei1115/models | e2c96c5f64b1dc8f0d5d9aa121300b87150e11e3 | [
"Apache-2.0"
] | null | null | null | PaddleNLP/paddlenlp/transformers/roberta/tokenizer.py | weiwei1115/models | e2c96c5f64b1dc8f0d5d9aa121300b87150e11e3 | [
"Apache-2.0"
] | 1 | 2021-06-09T01:50:13.000Z | 2021-06-09T01:50:13.000Z | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 44.689119 | 122 | 0.591652 |
7973349caca20ae3010d153fcd946ab9ccf3ccf7 | 20,099 | py | Python | _test/test_comments.py | smurfix/ruyaml | b4e55ab79410a5082c9d301175e54f7815b1ca38 | [
"MIT"
] | 50 | 2020-07-23T17:06:16.000Z | 2022-03-06T06:37:04.000Z | _test/test_comments.py | smurfix/ruyaml | b4e55ab79410a5082c9d301175e54f7815b1ca38 | [
"MIT"
] | 38 | 2020-07-25T16:08:36.000Z | 2022-02-21T13:05:58.000Z | _test/test_comments.py | smurfix/ruyaml | b4e55ab79410a5082c9d301175e54f7815b1ca38 | [
"MIT"
] | 12 | 2020-07-31T04:56:03.000Z | 2021-12-06T21:19:50.000Z | # coding: utf-8
"""
comment testing is all about roundtrips
these can be done in the "old" way by creating a file.data and file.roundtrip
but there is little flexibility in doing that
but some things are not easily tested, eog. how a
roundtrip changes
"""
import pytest
from .roundtrip import dedent, round_trip, ro... | 20.827979 | 82 | 0.425146 |
7973376a0bf1711be29c875e528b6cd82198bac2 | 236 | py | Python | setup.py | NREL/Solar-Forecasting | ef50e393f19908c72987a7a711b57fecef5482b2 | [
"BSD-3-Clause"
] | 10 | 2019-11-04T18:27:12.000Z | 2021-12-16T20:50:37.000Z | setup.py | elkomysarah/Grid-Forecasting | ddd3a0548dda33ee15404bca047ecf03c475848d | [
"BSD-3-Clause"
] | 1 | 2021-01-21T17:07:59.000Z | 2021-01-22T07:09:13.000Z | setup.py | elkomysarah/Grid-Forecasting | ddd3a0548dda33ee15404bca047ecf03c475848d | [
"BSD-3-Clause"
] | 8 | 2019-12-02T21:55:08.000Z | 2022-02-14T18:04:42.000Z | from setuptools import setup, find_packages
__version__ = '1.0'
packages = find_packages('.')
# Setup
setup(
name="gridappsd",
version=__version__,
install_requires=['PyYaml', 'stomp.py', 'pytz'],
packages=packages,
) | 18.153846 | 52 | 0.686441 |
797338a089889974712ef569fc7d9d00fcfa633e | 1,516 | py | Python | taskflow/conductors/backends/impl_blocking.py | JonasMie/taskflow | 942bb76d9cf69a87e7c78f0e231ce9b94e69bb37 | [
"Apache-2.0"
] | 299 | 2015-01-11T01:36:28.000Z | 2022-03-11T08:56:27.000Z | taskflow/conductors/backends/impl_blocking.py | JonasMie/taskflow | 942bb76d9cf69a87e7c78f0e231ce9b94e69bb37 | [
"Apache-2.0"
] | 4 | 2015-02-06T11:12:58.000Z | 2018-10-19T18:55:58.000Z | taskflow/conductors/backends/impl_blocking.py | jimbobhickville/taskflow | 6ea991ce94f5be46b7e4726b4c4f014e10407786 | [
"Apache-2.0"
] | 67 | 2015-01-11T14:34:24.000Z | 2022-01-14T02:57:03.000Z | # -*- coding: utf-8 -*-
# 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... | 36.095238 | 78 | 0.693931 |
797339452f575fdb0958b61ba627bd9b0d13bbb2 | 205 | py | Python | FundProg/Aula21-Arquivos/ex06.py | Bhclira/NExT | 192353a139089d0fed003bfb7e2523aa02a0a737 | [
"MIT"
] | null | null | null | FundProg/Aula21-Arquivos/ex06.py | Bhclira/NExT | 192353a139089d0fed003bfb7e2523aa02a0a737 | [
"MIT"
] | null | null | null | FundProg/Aula21-Arquivos/ex06.py | Bhclira/NExT | 192353a139089d0fed003bfb7e2523aa02a0a737 | [
"MIT"
] | null | null | null | '''
adicione uma lista de valores
'''
dados = []
arquivo = open('lista.txt', 'w')
for i in range(5):
dados.append(input('Digite o nome do voluntário da ONG: '))
arquivo.writelines("\n" .join(dados)) | 18.636364 | 63 | 0.64878 |
79733a8a4a4ef7cb37053ce87a58c7d8f2e15b63 | 30,569 | py | Python | Packs/TrendMicroDDA/Integrations/TrendMicroDDA/TrendMicroDDA.py | mazmat-panw/content | 024a65c1dea2548e2637a9cbbe54966e9e34a722 | [
"MIT"
] | 2 | 2021-12-06T21:38:24.000Z | 2022-01-13T08:23:36.000Z | Packs/TrendMicroDDA/Integrations/TrendMicroDDA/TrendMicroDDA.py | mazmat-panw/content | 024a65c1dea2548e2637a9cbbe54966e9e34a722 | [
"MIT"
] | 87 | 2022-02-23T12:10:53.000Z | 2022-03-31T11:29:05.000Z | Packs/TrendMicroDDA/Integrations/TrendMicroDDA/TrendMicroDDA.py | henry-sue-pa/content | 043c6badfb4f9c80673cad9242fdea72efe301f7 | [
"MIT"
] | 2 | 2022-01-05T15:27:01.000Z | 2022-02-01T19:27:43.000Z | import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
import hashlib
from datetime import datetime
import uuid
import json
import requests
import re
import platform
import os.path
import copy
# disable insecure warnings
requests.packages.urllib3.disable_warnings()
if not demisto.p... | 37.692972 | 128 | 0.615885 |
79733abdb86ee95696fcf7234f1683e591520983 | 3,388 | py | Python | mysite/mysite/settings.py | WorkShoft/Django-Channels-with-React | 6516ffb0f970ce18013157d0d199b65e095d889c | [
"CC-BY-4.0"
] | 8 | 2020-05-29T16:54:46.000Z | 2021-12-07T05:03:16.000Z | mysite/mysite/settings.py | farshidhss/Django-Channels-with-React | 1a06a74b5ac287a0e39479e55fb39b91f096ea82 | [
"CC-BY-4.0"
] | 6 | 2021-03-19T04:13:33.000Z | 2021-09-22T19:06:26.000Z | mysite/mysite/settings.py | farshidhss/Django-Channels-with-React | 1a06a74b5ac287a0e39479e55fb39b91f096ea82 | [
"CC-BY-4.0"
] | 1 | 2021-01-23T18:38:06.000Z | 2021-01-23T18:38:06.000Z | """
Django settings for mysite project.
Generated by 'django-admin startproject' using Django 3.0.6.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import os
# ... | 24.911765 | 91 | 0.679162 |
79733b32e2762ac9233295cf4fe7f7ce00d21e49 | 1,380 | py | Python | src/noos_tf/api.py | noosenergy/terraform-client | 0cc096248117652ec549086182a54e624b6dccf5 | [
"MIT"
] | null | null | null | src/noos_tf/api.py | noosenergy/terraform-client | 0cc096248117652ec549086182a54e624b6dccf5 | [
"MIT"
] | null | null | null | src/noos_tf/api.py | noosenergy/terraform-client | 0cc096248117652ec549086182a54e624b6dccf5 | [
"MIT"
] | null | null | null | from . import client
__all__ = ["update_workspace_variable", "run_workspace_plan"]
RUN_URL_TEMPLATE = "https://app.terraform.io/app/{organization}/workspaces/{workspace}/runs/{id}"
class TerraformError(Exception):
"""Basic exception raised by a Terraform request."""
def update_workspace_variable(
organi... | 29.361702 | 97 | 0.728986 |
79733b6f7319964e0e2e9d09f6087a76e8ebd55a | 3,537 | py | Python | NN_skin_cancer/cfgs/2020/ham_effb1_rand_25.py | GavinHU66/DebugEntity | 21f38f01bdfbbc363a73f640331c6f04a121cf82 | [
"MIT"
] | null | null | null | NN_skin_cancer/cfgs/2020/ham_effb1_rand_25.py | GavinHU66/DebugEntity | 21f38f01bdfbbc363a73f640331c6f04a121cf82 | [
"MIT"
] | null | null | null | NN_skin_cancer/cfgs/2020/ham_effb1_rand_25.py | GavinHU66/DebugEntity | 21f38f01bdfbbc363a73f640331c6f04a121cf82 | [
"MIT"
] | null | null | null | import numpy as np
def init(mdlParams_):
mdlParams = {}
# Save summaries and model here
mdlParams['saveDir'] = './models/model_ham_effb1_rand_25'
mdlParams['model_load_path'] = ''
# Data is loaded from here
mdlParams['dataDir'] = './Data'
mdlParams['with_meta'] = False
mdlPa... | 41.127907 | 107 | 0.590331 |
79733d4e6db4866ea31ec9ab686f6d44fc58045c | 33 | py | Python | test/agent_based/test.py | jiuka/build-checkmk-extension | 66290ef4db004c03052282fe656e97774c3a78f0 | [
"MIT"
] | null | null | null | test/agent_based/test.py | jiuka/build-checkmk-extension | 66290ef4db004c03052282fe656e97774c3a78f0 | [
"MIT"
] | 3 | 2021-01-29T09:05:05.000Z | 2021-05-02T02:15:57.000Z | test/agent_based/test.py | jiuka/build-checkmk-extension | 66290ef4db004c03052282fe656e97774c3a78f0 | [
"MIT"
] | 1 | 2021-01-25T13:21:30.000Z | 2021-01-25T13:21:30.000Z | from .agent_based_api.v1 import * | 33 | 33 | 0.818182 |
79733d8de8a52537c67cc5b5d44f7c1f1e36a2d4 | 340 | py | Python | peapod0.py | halvorsen/peapod_available_delivery_finder | fe8251e0f654aea780f65c396a6bc484ea2f4f74 | [
"Apache-2.0"
] | 1 | 2020-04-11T06:47:26.000Z | 2020-04-11T06:47:26.000Z | peapod0.py | halvorsen/peapod_available_delivery_finder | fe8251e0f654aea780f65c396a6bc484ea2f4f74 | [
"Apache-2.0"
] | 1 | 2020-04-23T01:55:00.000Z | 2020-04-23T01:55:00.000Z | peapod0.py | halvorsen/peapod_available_delivery_finder | fe8251e0f654aea780f65c396a6bc484ea2f4f74 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
browser = webdriver.Chrome()
url = browser.command_executor._url
session_id = browser.session_id
print('session url')
print(url)
print('session id'... | 21.25 | 55 | 0.805882 |
79733da3b91eed8d89c531c2ea88256d43405ed5 | 5,352 | py | Python | geopyspark/geotrellis/geotiff.py | geotrellis/geotrellis-python | 97bcb17a56ed4b4059e2f0dbab97706562cac692 | [
"Apache-2.0"
] | 182 | 2017-01-26T18:11:57.000Z | 2021-09-07T07:39:52.000Z | geopyspark/geotrellis/geotiff.py | geotrellis/geotrellis-python | 97bcb17a56ed4b4059e2f0dbab97706562cac692 | [
"Apache-2.0"
] | 428 | 2016-12-21T14:53:43.000Z | 2019-07-14T09:33:54.000Z | geopyspark/geotrellis/geotiff.py | geotrellis/geotrellis-python | 97bcb17a56ed4b4059e2f0dbab97706562cac692 | [
"Apache-2.0"
] | 66 | 2017-01-05T19:16:15.000Z | 2022-02-23T12:49:50.000Z | """This module contains functions that create ``RasterLayer`` from files."""
from geopyspark import get_spark_context
from geopyspark.geotrellis.constants import (LayerType,
DEFAULT_MAX_TILE_SIZE,
DEFAULT_PARTITION_BYTES,
... | 42.141732 | 106 | 0.6321 |
79733dac08e6a4424f6676a250012cedcf1094d1 | 3,222 | py | Python | submitit/auto/test_auto.py | JJGO/submitit | f5ef9fa239de4eb1a45a76c7b556dcf62542c77e | [
"MIT"
] | null | null | null | submitit/auto/test_auto.py | JJGO/submitit | f5ef9fa239de4eb1a45a76c7b556dcf62542c77e | [
"MIT"
] | null | null | null | submitit/auto/test_auto.py | JJGO/submitit | f5ef9fa239de4eb1a45a76c7b556dcf62542c77e | [
"MIT"
] | null | null | null | # 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 pytest
from ..local import debug
from ..slurm import test_slurm
from . import auto
def test_slurm_executor(monkeypatch) -> None:
... | 35.8 | 87 | 0.716325 |
79733e7e1266d1bd715ea1bb1de73277b715754d | 8,231 | py | Python | mcpyrate/repl/iconsole.py | set-soft/mcpyrate | 3b2fa4651a99db7d85d67cadb8642446b6589913 | [
"MIT"
] | null | null | null | mcpyrate/repl/iconsole.py | set-soft/mcpyrate | 3b2fa4651a99db7d85d67cadb8642446b6589913 | [
"MIT"
] | null | null | null | mcpyrate/repl/iconsole.py | set-soft/mcpyrate | 3b2fa4651a99db7d85d67cadb8642446b6589913 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""IPython extension for a mcpyrate-enabled REPL.
To enable::
%load_ext mcpyrate.repl.iconsole
To autoload it at IPython startup, put this into your ``ipython_config.py``::
c.InteractiveShellApp.extensions = ["mcpyrate.repl.iconsole"]
To find your config file, ``ipython profile loca... | 40.747525 | 134 | 0.680233 |
79733e8457799de7366471791550d73b4795b95e | 52,109 | py | Python | traffic/data/adsb/opensky_impala.py | sunzhaoc/TrackPrediction | bcf5e5f71d5d893f562d141915198f5f2578d48c | [
"MIT"
] | 1 | 2021-05-10T02:30:14.000Z | 2021-05-10T02:30:14.000Z | traffic/data/adsb/opensky_impala.py | sunzhaoc/TrackPrediction | bcf5e5f71d5d893f562d141915198f5f2578d48c | [
"MIT"
] | null | null | null | traffic/data/adsb/opensky_impala.py | sunzhaoc/TrackPrediction | bcf5e5f71d5d893f562d141915198f5f2578d48c | [
"MIT"
] | null | null | null | # fmt: off
import hashlib
import logging
import re
import string
import time
from datetime import timedelta
from io import StringIO
from pathlib import Path
from tempfile import gettempdir
from typing import Callable, Dict, Iterable, List, Optional, Tuple, Union, cast
import pandas as pd
import paramiko
from pandas.e... | 38.06355 | 80 | 0.52939 |
79733e9b3688a7f23ffd6d7dfc33514e7920275f | 935 | py | Python | test/functional/mining_v5_upgrade.py | QRAX-LABS/QRAX | 951ed45d473b7ab8c74bf35ff794e97169736d0c | [
"MIT"
] | 2 | 2021-12-29T14:10:03.000Z | 2022-02-19T09:24:37.000Z | test/functional/mining_v5_upgrade.py | QRAX-LABS/QRAX | 951ed45d473b7ab8c74bf35ff794e97169736d0c | [
"MIT"
] | null | null | null | test/functional/mining_v5_upgrade.py | QRAX-LABS/QRAX | 951ed45d473b7ab8c74bf35ff794e97169736d0c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from test_framework.test_framework import QraxTestFramework
from test_framework.util import *
"""
Simple test checking chain movement after v5 enforcement.
"""
class MiningV5UpgradeTest(QraxTestFramework):
def set_test_params(self):
self.num_nodes = 1
self.extra_args = [[]... | 34.62963 | 101 | 0.68984 |
79733f62ae95ed8213f11a9bf7ff3f64928bf462 | 6,219 | py | Python | tests/test_03_dxf_layouts/test_309_query_parser.py | jkjt/ezdxf | 2acc5611b81476ea16b98063b9f55446a9182b81 | [
"MIT"
] | 515 | 2017-01-25T05:46:52.000Z | 2022-03-29T09:52:27.000Z | tests/test_03_dxf_layouts/test_309_query_parser.py | jkjt/ezdxf | 2acc5611b81476ea16b98063b9f55446a9182b81 | [
"MIT"
] | 417 | 2017-01-25T10:01:17.000Z | 2022-03-29T09:22:04.000Z | tests/test_03_dxf_layouts/test_309_query_parser.py | jkjt/ezdxf | 2acc5611b81476ea16b98063b9f55446a9182b81 | [
"MIT"
] | 149 | 2017-02-01T15:52:02.000Z | 2022-03-17T10:33:38.000Z | # Copyright (c) 2013-2019, Manfred Moitzi
# License: MIT-License
import pytest
from ezdxf.queryparser import EntityQueryParser, ParseException, InfixBoolQuery
class TestEntityQueryParserWithoutAttributes:
def test_without_wildcards(self):
result = EntityQueryParser.parseString("LINE", parseAll=True)
... | 37.920732 | 79 | 0.612478 |
79733fc3c1e6063639f1c6932e9e92a1bf3efe32 | 6,251 | py | Python | samples/cookbook/regression/custom_regression.py | zcdzcdzcd/models | a31b526a7617a152a138a865b5689bf5b59f655d | [
"Apache-2.0"
] | 79 | 2019-03-02T17:40:25.000Z | 2021-08-17T13:22:03.000Z | samples/cookbook/regression/custom_regression.py | zcdzcdzcd/models | a31b526a7617a152a138a865b5689bf5b59f655d | [
"Apache-2.0"
] | 12 | 2018-12-13T18:04:36.000Z | 2019-06-14T20:49:33.000Z | samples/cookbook/regression/custom_regression.py | zcdzcdzcd/models | a31b526a7617a152a138a865b5689bf5b59f655d | [
"Apache-2.0"
] | 44 | 2018-11-09T21:04:52.000Z | 2019-06-24T07:40:28.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 38.115854 | 94 | 0.722444 |
7973409161c12db6672f870cd3013955db8616e9 | 1,855 | py | Python | bot/test/test_bot_commands.py | Catdontpat/uitabot | bade0822e828812e2acc67ba15e51a3db3f762fe | [
"ISC"
] | 5 | 2018-05-20T17:41:08.000Z | 2022-01-16T14:23:29.000Z | bot/test/test_bot_commands.py | Catdontpat/uitabot | bade0822e828812e2acc67ba15e51a3db3f762fe | [
"ISC"
] | 8 | 2020-06-06T17:43:17.000Z | 2022-01-25T20:15:53.000Z | bot/test/test_bot_commands.py | tedle/uitabot | d4850483132d94841a58dbb349383fe9e29bcded | [
"ISC"
] | 2 | 2020-07-18T05:30:19.000Z | 2022-01-09T18:07:20.000Z | import pytest
from unittest.mock import Mock, patch
import discord
import uita.bot_commands
@pytest.fixture
def mock_message():
message = Mock(spec=discord.Message)
async def stub(*args, **kwargs): ...
message.channel.send.side_effect = stub
return message
@pytest.fixture
def patch_state():
wi... | 30.916667 | 88 | 0.70566 |
797340b8ce8d61e799376260b807764461c32157 | 405 | py | Python | charPic/charPic.py | DoubleHYH/Toys | 8ad396905e625f87b80d47185479b16c1f05ec2d | [
"MIT"
] | 1 | 2016-09-01T07:17:23.000Z | 2016-09-01T07:17:23.000Z | charPic/charPic.py | DoubleHYH/Toys | 8ad396905e625f87b80d47185479b16c1f05ec2d | [
"MIT"
] | null | null | null | charPic/charPic.py | DoubleHYH/Toys | 8ad396905e625f87b80d47185479b16c1f05ec2d | [
"MIT"
] | null | null | null | import cv2
imageName = 'big.jpg'
def get_char(gray_number):
length = len(list(r"$@&%B#=-. "))
unit = (256.0 + 1)/length
return list(r"$@&%B#=-. ")[int(gray_number/unit)]
image = cv2.resize(cv2.imread(imageName,cv2.IMREAD_GRAYSCALE),(110,85))
txt = ''
for i in range(image.shape[0]):
for j in range(image.shape[1])... | 22.5 | 71 | 0.62963 |
79734136f8e94476dd3041f3f7b04ef299a8b8a1 | 1,095 | py | Python | igs_api/igs_api/urls.py | victorbrittoferreira/igs_api_test | 1c0543f8c6c182e50b88bd0dbe1685a4e5f82ecf | [
"MIT"
] | null | null | null | igs_api/igs_api/urls.py | victorbrittoferreira/igs_api_test | 1c0543f8c6c182e50b88bd0dbe1685a4e5f82ecf | [
"MIT"
] | null | null | null | igs_api/igs_api/urls.py | victorbrittoferreira/igs_api_test | 1c0543f8c6c182e50b88bd0dbe1685a4e5f82ecf | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path
from core_api.views import(
EmployeeListAPIView,
EmployeeCreateAPIView,
EmployeeDetailAPIView,
EmployeeUpdateAPIView,
EmployeeDestroyAPIView,
EmployeeCreateAPIView,
error,
)
urlpatterns = [
path('admin/', admin.site.urls)... | 24.886364 | 75 | 0.66758 |
7973419293eb94d80a3f828a5041a4cdec967e84 | 30,551 | py | Python | test/python/oracle.py | laigor/sqlrelay-non-english-fixes- | 7803f862ddbf88bca078c50d621c64c22fc0a405 | [
"PHP-3.01",
"CC-BY-3.0"
] | 16 | 2018-04-23T09:58:33.000Z | 2022-01-31T13:40:20.000Z | test/python/oracle.py | laigor/sqlrelay-non-english-fixes- | 7803f862ddbf88bca078c50d621c64c22fc0a405 | [
"PHP-3.01",
"CC-BY-3.0"
] | null | null | null | test/python/oracle.py | laigor/sqlrelay-non-english-fixes- | 7803f862ddbf88bca078c50d621c64c22fc0a405 | [
"PHP-3.01",
"CC-BY-3.0"
] | 4 | 2020-12-23T12:17:54.000Z | 2022-01-04T20:46:34.000Z | #! /usr/bin/env python
# Copyright (c) 1999-2018 David Muse
# See the file COPYING for more information.
from SQLRelay import PySQLRClient
from decimal import *
import sys
import string
def checkSuccess(value,success):
if value==success:
print("success")
else:
print("wanted", type(success), ":", success)
pri... | 34.404279 | 201 | 0.739812 |
79734311c0dff573879fc53c9b8bfc2ff8bb3263 | 4,794 | py | Python | docs/py/load.py | 1over/autokeras | 59128d3153d38e200156b83efa5cc6ab2f75c8e6 | [
"Apache-2.0"
] | 1 | 2022-02-26T13:38:28.000Z | 2022-02-26T13:38:28.000Z | docs/py/load.py | maxpark/autokeras | 1562b1485d4d171ef0698d657723fc63a748175d | [
"Apache-2.0"
] | null | null | null | docs/py/load.py | maxpark/autokeras | 1562b1485d4d171ef0698d657723fc63a748175d | [
"Apache-2.0"
] | null | null | null | """shell
pip install autokeras
pip install git+https://github.com/keras-team/keras-tuner.git@1.0.2rc2
"""
"""
If the data is too large to put in memory all at once, we can load it batch by batch into memory from disk with tf.data.Dataset.
This [function](https://www.tensorflow.org/api_docs/python/tf/keras/preprocessin... | 28.2 | 169 | 0.687317 |
797343498f8fb00dae87be0468584a1565c3fae2 | 1,592 | py | Python | Tests/Methods/Slot/test_Notch_meth.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | 2 | 2020-08-28T14:54:55.000Z | 2021-03-13T19:34:45.000Z | Tests/Methods/Slot/test_Notch_meth.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | null | null | null | Tests/Methods/Slot/test_Notch_meth.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
from pyleecan.Classes.SlotW10 import SlotW10
from pyleecan.Classes.LamSlotWind import LamSlotWind
from pyleecan.Classes.NotchEvenDist import NotchEvenDist
from pyleecan.Methods import ParentMissingError
import pytest
@pytest.mark.METHODS
class TestNotch(object):
"""Test that ... | 27.448276 | 82 | 0.597362 |
7973445f6cfbb56f10235a31e9a94685c7cdf914 | 1,807 | py | Python | xmltojson.py | jingyanwang/dt-grade-prediction | c032ff02fcef1db4367e5cf8b38120e1ef83d369 | [
"MIT"
] | 1 | 2021-03-22T14:41:27.000Z | 2021-03-22T14:41:27.000Z | xmltojson.py | jingyanwang/dt-grade-prediction | c032ff02fcef1db4367e5cf8b38120e1ef83d369 | [
"MIT"
] | null | null | null | xmltojson.py | jingyanwang/dt-grade-prediction | c032ff02fcef1db4367e5cf8b38120e1ef83d369 | [
"MIT"
] | 2 | 2021-11-20T06:10:42.000Z | 2021-12-08T18:06:20.000Z | # MIT License
#
# Copyright (c) 2019 Mohamed-Achref MAIZA
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, ... | 40.155556 | 120 | 0.732706 |
797346c0c82985ed290a666de801b7253e6dc5e4 | 942 | py | Python | slap/slap.py | javascripto/syxactions | c9932199a49202ec133babb4c7fdc2c38cf31ba2 | [
"MIT"
] | null | null | null | slap/slap.py | javascripto/syxactions | c9932199a49202ec133babb4c7fdc2c38cf31ba2 | [
"MIT"
] | 1 | 2018-06-18T08:55:43.000Z | 2018-06-18T23:16:06.000Z | slap/slap.py | javascripto/syxactions | c9932199a49202ec133babb4c7fdc2c38cf31ba2 | [
"MIT"
] | null | null | null | from discord.ext import commands
from discord.ext.commands import errors, converter
from .utils.dataIO import fileIO
import random
import discord
class Slap:
def __init__(self, bot):
self.bot = bot
@commands.command(pass_context=True)
async def slap(self, context, member: discord.Member=None):
... | 26.914286 | 98 | 0.612527 |
797347d3e0d8e7d05fce405815370c05dfbe5b1a | 10,222 | py | Python | gapipes/gaia/utils.py | smoh/gapipes | 586fd7beef5e9b834eea2eaf66bee9b892f50ffb | [
"MIT"
] | null | null | null | gapipes/gaia/utils.py | smoh/gapipes | 586fd7beef5e9b834eea2eaf66bee9b892f50ffb | [
"MIT"
] | 7 | 2019-03-06T11:00:14.000Z | 2020-07-12T14:58:30.000Z | gapipes/gaia/utils.py | smoh/gapipes | 586fd7beef5e9b834eea2eaf66bee9b892f50ffb | [
"MIT"
] | null | null | null | """
Utilities for parsing Tap and Gaia TapPlus HTML and XML responses
"""
import io
import logging
import re
import time
import requests
from requests.exceptions import HTTPError
from bs4 import BeautifulSoup
import xml.etree.ElementTree as ET
from astropy.table import Table
import pandas as pd
import warnings
logge... | 33.514754 | 252 | 0.570338 |
797347d9a3fd2e6aa5723667ca956cc1f53fc36e | 2,304 | py | Python | tests/test_verbs/test_join.py | samukweku/clumper | 31a55c7fa3dfa4ce1080cce0d769a2a3408d8177 | [
"MIT"
] | null | null | null | tests/test_verbs/test_join.py | samukweku/clumper | 31a55c7fa3dfa4ce1080cce0d769a2a3408d8177 | [
"MIT"
] | 1 | 2020-08-12T12:49:45.000Z | 2020-08-12T12:49:45.000Z | tests/test_verbs/test_join.py | samukweku/clumper | 31a55c7fa3dfa4ce1080cce0d769a2a3408d8177 | [
"MIT"
] | null | null | null | from clumper import Clumper
def test_left_join_base_example():
d1 = [{"a": 1, "b": 1, "d": 1}, {"a": 1, "b": 2, "d": 1}, {"a": 1, "b": 5, "d": 1}]
d2 = [
{"b": 1, "c": 1, "d": 2},
{"b": 2, "c": 2, "d": 2},
{"b": 2, "c": 20, "d": 20},
]
joined = Clumper(d1).left_join(Clumper(d2)... | 30.72 | 87 | 0.371094 |
7973483b3193f92d8d794b206f9c0b9d1f0c1ce2 | 5,895 | py | Python | AdversarialSampleGeneratorV11/AdversarialSampleGeneratorV11/DefaultMethodsBuzz.py | MetaMain/BewareAdvML | 52d489b565b0df36cb588b5709c29c2e8e4d3f49 | [
"BSD-3-Clause"
] | 1 | 2022-03-25T07:53:13.000Z | 2022-03-25T07:53:13.000Z | AdversarialSampleGeneratorV11/AdversarialSampleGeneratorV11/DefaultMethodsBuzz.py | MetaMain/BewareAdvML | 52d489b565b0df36cb588b5709c29c2e8e4d3f49 | [
"BSD-3-Clause"
] | null | null | null | AdversarialSampleGeneratorV11/AdversarialSampleGeneratorV11/DefaultMethodsBuzz.py | MetaMain/BewareAdvML | 52d489b565b0df36cb588b5709c29c2e8e4d3f49 | [
"BSD-3-Clause"
] | null | null | null | #From the Buzz paper
import DataManager
import AttackWrappersBlackBox
import NetworkConstructors
import numpy
import tensorflow
import DefenseMultiModel
from tensorflow import keras
#Run every attack on the BUZZ model
def RunAllCIFAR10BUZZEightAttacks():
for i in range(0,5):
#Create a new se... | 47.926829 | 382 | 0.730619 |
797348d688f7599018c55e1df1b374c44f366ec0 | 424,649 | py | Python | deps/python/2.7/Lib/pydoc_data/topics.py | eljefedelrodeodeljefe/node-cpython | a6e5414fa4c089c30135c3a7db3eaf1e1d600f68 | [
"MIT"
] | 13 | 2015-11-12T14:43:03.000Z | 2021-04-30T07:02:11.000Z | deps/python/2.7/Lib/pydoc_data/topics.py | eljefedelrodeodeljefe/node-cpython | a6e5414fa4c089c30135c3a7db3eaf1e1d600f68 | [
"MIT"
] | 5 | 2015-05-23T13:07:01.000Z | 2016-01-06T16:23:05.000Z | deps/python/2.7/Lib/pydoc_data/topics.py | eljefedelrodeodeljefe/node-cpython | a6e5414fa4c089c30135c3a7db3eaf1e1d600f68 | [
"MIT"
] | 5 | 2015-10-30T21:25:24.000Z | 2017-03-25T15:50:55.000Z | # -*- coding: utf-8 -*-
# Autogenerated by Sphinx on Wed Jan 6 03:48:54 2016
topics = {'assert': u'\nThe "assert" statement\n**********************\n\nAssert statements are a convenient way to insert debugging assertions\ninto a program:\n\n assert_stmt ::= "assert" expression ["," expression]\n\nThe simple form, "a... | 5,178.646341 | 54,499 | 0.689287 |
797348d84823d98273ea866cddb3d7a01bcff09a | 4,351 | py | Python | venv/lib/python3.9/site-packages/google/type/money_pb2.py | qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3 | 630dcef73e6a258b6e9a52f934e2dd912ce741f8 | [
"Apache-2.0"
] | 5 | 2020-06-24T13:10:33.000Z | 2021-02-19T09:28:11.000Z | venv/lib/python3.9/site-packages/google/type/money_pb2.py | qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3 | 630dcef73e6a258b6e9a52f934e2dd912ce741f8 | [
"Apache-2.0"
] | 38 | 2020-05-15T23:28:00.000Z | 2022-03-22T16:52:08.000Z | venv/lib/python3.9/site-packages/google/type/money_pb2.py | qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3 | 630dcef73e6a258b6e9a52f934e2dd912ce741f8 | [
"Apache-2.0"
] | 10 | 2020-04-26T09:58:30.000Z | 2022-03-18T21:45:49.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google 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 o... | 32.22963 | 335 | 0.650885 |
7973496441e8fb97d2b8d18d6ebac5ea446d2227 | 40,695 | py | Python | mecode/main.py | DerAndere1/mecode | a8acb646be635be77961ad1e29c995351f2e221e | [
"MIT"
] | 2 | 2018-11-06T07:18:06.000Z | 2021-02-09T10:20:41.000Z | mecode/main.py | DerAndere1/mecode | a8acb646be635be77961ad1e29c995351f2e221e | [
"MIT"
] | null | null | null | mecode/main.py | DerAndere1/mecode | a8acb646be635be77961ad1e29c995351f2e221e | [
"MIT"
] | 2 | 2019-07-11T10:46:40.000Z | 2021-11-27T12:08:59.000Z | """
Mecode
======
### GCode for all
Mecode is designed to simplify GCode generation. It is not a slicer, thus it
can not convert CAD models to 3D printer ready code. It simply provides a
convenient, human-readable layer just above GCode. If you often find
yourself manually writing your own GCode, then mecode is ... | 39.394966 | 167 | 0.528419 |
79734967e9e67cf8dd5d2dc126369c98cf3e5954 | 5,870 | py | Python | number-letter.py | SamsterBirdies/number-letter-converter | 47b0a35bdc15d9735ac4c051c55f73d39d2f41aa | [
"Unlicense"
] | null | null | null | number-letter.py | SamsterBirdies/number-letter-converter | 47b0a35bdc15d9735ac4c051c55f73d39d2f41aa | [
"Unlicense"
] | null | null | null | number-letter.py | SamsterBirdies/number-letter-converter | 47b0a35bdc15d9735ac4c051c55f73d39d2f41aa | [
"Unlicense"
] | null | null | null | import os
class KeyContainer:
def __init__(self,string):
self.string = string
cwdir = os.getcwd() #Current Working Directory
characters = " abcdefghijklmnopqrstuvwxyz" #character string 0-26 (input)
keysentence = KeyContainer("") #output
keylist = [] #converting number string into list
#options
wsci = " ... | 33.735632 | 185 | 0.632027 |
797349ae93b885928c2190335549a05d7445d12b | 8,120 | py | Python | gantts/models.py | karkirowle/gantts | f61d2b1ecb9493980338c9f598d74fc46120afe2 | [
"MIT"
] | 513 | 2017-10-05T16:38:58.000Z | 2022-03-11T07:12:26.000Z | gantts/models.py | karkirowle/gantts | f61d2b1ecb9493980338c9f598d74fc46120afe2 | [
"MIT"
] | 44 | 2017-10-09T11:11:11.000Z | 2021-09-22T14:53:32.000Z | gantts/models.py | karkirowle/gantts | f61d2b1ecb9493980338c9f598d74fc46120afe2 | [
"MIT"
] | 132 | 2017-10-09T14:38:06.000Z | 2021-12-23T08:15:29.000Z | # coding: utf-8
import torch
from torch import nn
from torch.autograd import Variable
import numpy as np
from nnmnkwii.autograd import unit_variance_mlpg
class AbstractModel(object):
"""Interface for VC and TTS models
"""
def include_parameter_generation(self):
"""Whether model includes paramet... | 37.943925 | 82 | 0.631773 |
79734a7ad25589fbaad768a4a6245896f70dc42f | 26,098 | py | Python | sdk/python/pulumi_azure_native/web/v20201201/static_site.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/web/v20201201/static_site.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/web/v20201201/static_site.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 45.309028 | 1,079 | 0.661545 |
79734ba34164dfaba438f1ab46a357bd668341a0 | 355 | py | Python | JH/0209/2609.py | Kwak-JunYoung/154Algoritm-5weeks | fa18ae5f68a1ee722a30a05309214247f7fbfda4 | [
"MIT"
] | 3 | 2022-01-24T03:06:32.000Z | 2022-01-30T08:43:58.000Z | JH/0209/2609.py | Kwak-JunYoung/154Algoritm-5weeks | fa18ae5f68a1ee722a30a05309214247f7fbfda4 | [
"MIT"
] | null | null | null | JH/0209/2609.py | Kwak-JunYoung/154Algoritm-5weeks | fa18ae5f68a1ee722a30a05309214247f7fbfda4 | [
"MIT"
] | 2 | 2022-01-24T02:27:40.000Z | 2022-01-30T08:57:03.000Z | import sys
x, y = map(int, sys.stdin.readline().split())
def gcd(x,y):
if y==0:
return x
else:
return gcd(y, x%y)
def lcm(x,y):
g = gcd(x,y)
return int(g * (x//g) * (y//g))
print(gcd(x,y))
print(lcm(x,y))
####내장 함수 (RuntimeError)
import math
x, y = map(int, input().split())
print(... | 15.434783 | 45 | 0.543662 |
79734c267e3d66c1c5dd188dc6a1e0fd41d7e2c5 | 1,417 | py | Python | flexlate/error_handler.py | nickderobertis/flexlate | 81d6dbc2d87219a2a89266d6e8fb03310a24a3a1 | [
"MIT"
] | null | null | null | flexlate/error_handler.py | nickderobertis/flexlate | 81d6dbc2d87219a2a89266d6e8fb03310a24a3a1 | [
"MIT"
] | 25 | 2021-12-05T18:57:53.000Z | 2022-03-29T13:45:47.000Z | flexlate/error_handler.py | nickderobertis/flexlate | 81d6dbc2d87219a2a89266d6e8fb03310a24a3a1 | [
"MIT"
] | null | null | null | import sys
from contextlib import contextmanager
from functools import wraps
from types import TracebackType
from typing import Callable, Type, Tuple
from flexlate.styles import print_styled, ALERT_STYLE
def simple_output_for_exceptions(*exceptions: Type[BaseException]):
exception_handler = _create_exception_han... | 30.148936 | 86 | 0.731828 |
79734cd66661463afd9ee29c66c0567a502f26b0 | 459 | py | Python | data/scripts/templates/object/mobile/shared_dressed_commoner_old_human_male_01.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/mobile/shared_dressed_commoner_old_human_male_01.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/mobile/shared_dressed_commoner_old_human_male_01.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Creature()
result.template = "object/mobile/shared_dressed_commoner_old_human_male_01.iff"
result.attribute_templ... | 27 | 80 | 0.738562 |
79734cf457fac6fe69cf958c4870d295aba968b4 | 2,598 | py | Python | pytorch_ner/onnx.py | abdallah1097/pytorch_ner | b1729d97ccb168e5796045cf9b387b35536803eb | [
"Apache-2.0"
] | null | null | null | pytorch_ner/onnx.py | abdallah1097/pytorch_ner | b1729d97ccb168e5796045cf9b387b35536803eb | [
"Apache-2.0"
] | null | null | null | pytorch_ner/onnx.py | abdallah1097/pytorch_ner | b1729d97ccb168e5796045cf9b387b35536803eb | [
"Apache-2.0"
] | null | null | null | from warnings import filterwarnings
import numpy as np
import onnx
import onnxruntime
import torch
import torch.nn as nn
from pytorch_ner.utils import to_numpy
filterwarnings(action="ignore", category=UserWarning)
def _onnx_export(
model: nn.Module,
path_to_save: str,
):
"""
Export PyTorch model to... | 26.783505 | 88 | 0.641647 |
79734d2f675d100314fe5cb750dcdeb90c6a5d18 | 992 | py | Python | feed/migrations/0001_initial.py | kiwiheretic/logos-v2 | 22739221a6d431322c809b7e17aba54f37eb9617 | [
"Apache-2.0"
] | 4 | 2015-02-20T08:11:59.000Z | 2019-05-15T23:48:11.000Z | feed/migrations/0001_initial.py | kiwiheretic/logos-v2 | 22739221a6d431322c809b7e17aba54f37eb9617 | [
"Apache-2.0"
] | 58 | 2015-01-11T02:10:09.000Z | 2022-03-20T01:20:15.000Z | feed/migrations/0001_initial.py | kiwiheretic/logos-v2 | 22739221a6d431322c809b7e17aba54f37eb9617 | [
"Apache-2.0"
] | 1 | 2016-06-15T00:49:44.000Z | 2016-06-15T00:49:44.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.Create... | 32 | 114 | 0.578629 |
79734db2812e634335c4ae30c66849c1ba437276 | 589 | py | Python | src/utils.py | dorianbrown/shortstory_generator | 0e6ed7cf2de22a22ff89ce3f6fae621c6f97c49a | [
"MIT"
] | null | null | null | src/utils.py | dorianbrown/shortstory_generator | 0e6ed7cf2de22a22ff89ce3f6fae621c6f97c49a | [
"MIT"
] | null | null | null | src/utils.py | dorianbrown/shortstory_generator | 0e6ed7cf2de22a22ff89ce3f6fae621c6f97c49a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import re
def format_output(string):
wp, story = string.strip().split("<|startoftext|> ")
# Do all formatting rules here
story = re.sub(r"\s?<newline>\s?", "\n", story)
story = re.sub(r"``\s", r'"', story)
story = re.sub(r"\s''", r'"', story)
story = re.sub(r"\s([\.\,\!... | 24.541667 | 64 | 0.551783 |
79734dfa609c946211231e283cef48550fccba4c | 827 | bzl | Python | third_party/tf_runtime/workspace.bzl | SkyrookieYu/tensorflow | cffb513f0f4401af29c4432f8206b58bcda24d20 | [
"Apache-2.0"
] | 1 | 2022-01-10T22:07:28.000Z | 2022-01-10T22:07:28.000Z | third_party/tf_runtime/workspace.bzl | drivanov/tensorflow | c41fcf3bc507df4a0b70dd766db71ea54dc08d9e | [
"Apache-2.0"
] | null | null | null | third_party/tf_runtime/workspace.bzl | drivanov/tensorflow | c41fcf3bc507df4a0b70dd766db71ea54dc08d9e | [
"Apache-2.0"
] | null | null | null | """Provides the repository macro to import TFRT."""
load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls")
def repo():
"""Imports TFRT."""
# Attention: tools parse and update these lines.
TFRT_COMMIT = "2788d4e9538644eade36b876182fff5d8220a34a"
TFRT_SHA256 = "2d900059f8feead31c09be6f62c8... | 39.380952 | 124 | 0.698912 |
79734e173989d91920c51aa49f9986f7d727ca27 | 1,036 | py | Python | azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/registry_usage_list_result_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/registry_usage_list_result_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/registry_usage_list_result_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2018-08-28T14:36:47.000Z | 2018-08-28T14:36:47.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 ... | 34.533333 | 81 | 0.605212 |
79734f42d7a2e77bd7d69eb88c3a87e387a05d0d | 232 | py | Python | utils/debug.py | knowsWhereHisTowelIs/pi-pyth-serv-socketio | 91f85439ac7a33dc723e0614d7ebdfd3c8260ad4 | [
"MIT"
] | null | null | null | utils/debug.py | knowsWhereHisTowelIs/pi-pyth-serv-socketio | 91f85439ac7a33dc723e0614d7ebdfd3c8260ad4 | [
"MIT"
] | null | null | null | utils/debug.py | knowsWhereHisTowelIs/pi-pyth-serv-socketio | 91f85439ac7a33dc723e0614d7ebdfd3c8260ad4 | [
"MIT"
] | null | null | null | from pprint import pprint
def dump(var):
"""
Emulate php's var_dump
TODO do for any var type
Args:
var (any): the variable to dump
"""
print type(var)
pprint(vars(var))
# return (vars(var))
| 16.571429 | 39 | 0.581897 |
79734ff1db064c0c60abc99f1dfe021fdcef969d | 8,516 | py | Python | ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/applibprofile/applibflow/parameter/parameter.py | rfrye-github/ixnetwork_restpy | 23eeb24b21568a23d3f31bbd72814ff55eb1af44 | [
"MIT"
] | null | null | null | ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/applibprofile/applibflow/parameter/parameter.py | rfrye-github/ixnetwork_restpy | 23eeb24b21568a23d3f31bbd72814ff55eb1af44 | [
"MIT"
] | null | null | null | ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/applibprofile/applibflow/parameter/parameter.py | rfrye-github/ixnetwork_restpy | 23eeb24b21568a23d3f31bbd72814ff55eb1af44 | [
"MIT"
] | null | null | null | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, ... | 40.552381 | 190 | 0.665688 |
7973507053727a2e9db6c2f7740aa3ad384d7aff | 2,068 | py | Python | aws_interface/cloud/auth/find_password.py | hubaimaster/aws-interface | 162dd056546d58b6eb29afcae1c3c2d78e4309b2 | [
"Apache-2.0"
] | 53 | 2018-10-02T05:58:54.000Z | 2020-09-15T08:58:26.000Z | aws_interface/cloud/auth/find_password.py | hubaimaster/aws-interface | 162dd056546d58b6eb29afcae1c3c2d78e4309b2 | [
"Apache-2.0"
] | 52 | 2018-09-26T05:16:09.000Z | 2022-03-11T23:51:14.000Z | aws_interface/cloud/auth/find_password.py | hubaimaster/aws-interface | 162dd056546d58b6eb29afcae1c3c2d78e4309b2 | [
"Apache-2.0"
] | 10 | 2019-03-11T16:35:14.000Z | 2019-10-23T08:03:54.000Z |
from cloud.message import error
from cloud.crypto import *
from cloud.auth.get_login_method import do as get_login_method
from cloud.permission import Permission, NeedPermission
from cloud.auth.get_login_method import match_policy
import string
# Define the input output format of the function.
# This information is ... | 32.3125 | 104 | 0.663926 |
797350989327e46a55731a3c375919009db1eeba | 17,723 | py | Python | src/shillelagh/adapters/api/gsheets/parsing/pattern.py | mrdavidlaing/shillelagh | 75f2651599f807d50db00ad20869fe3f3eca1c71 | [
"MIT"
] | 107 | 2020-12-17T23:58:01.000Z | 2022-03-12T05:59:30.000Z | src/shillelagh/adapters/api/gsheets/parsing/pattern.py | mrdavidlaing/shillelagh | 75f2651599f807d50db00ad20869fe3f3eca1c71 | [
"MIT"
] | 93 | 2021-03-19T12:19:31.000Z | 2022-03-31T19:14:19.000Z | src/shillelagh/adapters/api/gsheets/parsing/pattern.py | mrdavidlaing/shillelagh | 75f2651599f807d50db00ad20869fe3f3eca1c71 | [
"MIT"
] | 14 | 2021-07-24T12:27:08.000Z | 2022-03-14T19:35:21.000Z | # pylint: disable=invalid-name, no-self-use, fixme
"""
Parse and format Google Sheet date/time patterns.
https://developers.google.com/sheets/api/guides/formats?hl=en#date_and_time_format_patterns
"""
import calendar
import re
from collections import defaultdict
from datetime import date
from datetime import datetime
... | 28.493569 | 91 | 0.57479 |
797351755ac88966887a96797346dc6bf4f7c0ab | 2,576 | py | Python | blueprints/accounts/manage/views/remove_backend.py | GetmeUK/h51 | 17d4003336857514765a42a0853995fbe3da6525 | [
"MIT"
] | null | null | null | blueprints/accounts/manage/views/remove_backend.py | GetmeUK/h51 | 17d4003336857514765a42a0853995fbe3da6525 | [
"MIT"
] | 4 | 2021-06-08T22:58:13.000Z | 2022-03-12T00:53:18.000Z | blueprints/accounts/manage/views/remove_backend.py | GetmeUK/h51 | 17d4003336857514765a42a0853995fbe3da6525 | [
"MIT"
] | null | null | null | """
Remove the public or secure backend for an account.
"""
from flask import flash, request
from manhattan.chains import Chain, ChainMgr
from manhattan.manage.views import factories, generic, utils as manage_utils
from manhattan.nav import NavItem
from mongoframes import Q
from blueprints.accounts.manage.config impo... | 25.009709 | 77 | 0.708851 |
7973528f3ab3b6de3b19cde46e4dc1e08ac0098e | 697 | py | Python | 1a/python/setup.py | leepfrog/advent-of-code-2018 | 894d8532c8414ecdc80a16673d8c6b00df5f8d76 | [
"RSA-MD"
] | null | null | null | 1a/python/setup.py | leepfrog/advent-of-code-2018 | 894d8532c8414ecdc80a16673d8c6b00df5f8d76 | [
"RSA-MD"
] | null | null | null | 1a/python/setup.py | leepfrog/advent-of-code-2018 | 894d8532c8414ecdc80a16673d8c6b00df5f8d76 | [
"RSA-MD"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="puzzle_1a",
version="0.0.1",
author="Andy Leeper",
author_email="leepfrog@mochaleaf.com",
description="Advent of code - puzzle 1a",
long_description=long_description,
long_descript... | 30.304348 | 72 | 0.66571 |
797352de14b9aa6a24d0745654322cd1816d4f1d | 330 | py | Python | utils/utils.py | ds4dm/GraphRL | b5b1519f6dd92b401625d51add9ae5829004a30b | [
"MIT"
] | 2 | 2021-02-26T18:51:01.000Z | 2021-07-12T05:20:18.000Z | utils/utils.py | pandat8/GraphRL | b5b1519f6dd92b401625d51add9ae5829004a30b | [
"MIT"
] | 3 | 2019-05-09T20:59:10.000Z | 2020-05-13T14:03:50.000Z | utils/utils.py | pandat8/GraphRL | b5b1519f6dd92b401625d51add9ae5829004a30b | [
"MIT"
] | 3 | 2018-08-13T20:43:29.000Z | 2020-05-13T14:00:57.000Z | import torch
import numpy as np
def to_sparse(dense):
x = torch.nonzero(dense)
if list(x):
indices = x.t()
values = dense[indices[0], indices[1]] #
sparse = torch.sparse.FloatTensor(indices, values, dense.size())
else:
sparse = torch.sparse.FloatTensor(dense.size())
retu... | 25.384615 | 72 | 0.627273 |
79735343af53de506b06fd76e1bc5a841f0e9be6 | 4,131 | py | Python | hashtagsv2/hashtags/views.py | lalit97/hashtags | 437c76c15baaa28d1eb8063277450dd3e8be2699 | [
"MIT"
] | null | null | null | hashtagsv2/hashtags/views.py | lalit97/hashtags | 437c76c15baaa28d1eb8063277450dd3e8be2699 | [
"MIT"
] | null | null | null | hashtagsv2/hashtags/views.py | lalit97/hashtags | 437c76c15baaa28d1eb8063277450dd3e8be2699 | [
"MIT"
] | null | null | null | import csv
from datetime import datetime, timedelta
from django.contrib import messages
from django.http import HttpResponse, JsonResponse
from django.db.models import Count
from django.views.generic import FormView, ListView, TemplateView
from .forms import SearchForm
from .helpers import split_hashtags, hashtag_que... | 36.557522 | 107 | 0.642944 |
797355ed580f8fab6c385daabc6b21621c7022f8 | 148,525 | py | Python | electrum/gui/qt/main_window.py | urantialife/electrum | 62e6ca50e1aa810b501d85b26bdc4f6fa6208f54 | [
"MIT"
] | 2 | 2019-06-25T15:24:57.000Z | 2019-07-08T12:22:30.000Z | electrum/gui/qt/main_window.py | urantialife/electrum | 62e6ca50e1aa810b501d85b26bdc4f6fa6208f54 | [
"MIT"
] | null | null | null | electrum/gui/qt/main_window.py | urantialife/electrum | 62e6ca50e1aa810b501d85b26bdc4f6fa6208f54 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2012 thomasv@gitorious
#
# 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 witho... | 42.618364 | 323 | 0.614442 |
7973561aafec300516840b58e4b97e532fe8fccc | 662 | py | Python | test_project/users/tests/test_urls.py | syadav31/cookiecutter-django | bd5dfe0d673e0d5fe65a39646df45f2065692d8a | [
"MIT"
] | 3 | 2021-04-28T13:34:35.000Z | 2021-08-20T20:40:36.000Z | test_project/users/tests/test_urls.py | syadav31/cookiecutter-django | bd5dfe0d673e0d5fe65a39646df45f2065692d8a | [
"MIT"
] | null | null | null | test_project/users/tests/test_urls.py | syadav31/cookiecutter-django | bd5dfe0d673e0d5fe65a39646df45f2065692d8a | [
"MIT"
] | 1 | 2021-04-28T09:36:57.000Z | 2021-04-28T09:36:57.000Z | import pytest
from django.urls import resolve, reverse
from test_project.users.models import User
pytestmark = pytest.mark.django_db
def test_detail(user: User):
assert (
reverse("users:detail", kwargs={"username": user.username})
== f"/users/{user.username}/"
)
assert resolve(f"/users/{... | 26.48 | 74 | 0.678248 |
7973577ec48ffbf69988d5707f74b4873ecab1a7 | 3,135 | py | Python | sofacontrol/scp/models/tpwl.py | StanfordASL/soft-robot-control | 29ade9b7b952e25e639b42767a4f09c87a0e824a | [
"MIT"
] | 5 | 2021-03-07T11:42:11.000Z | 2022-02-28T09:46:05.000Z | sofacontrol/scp/models/tpwl.py | StanfordASL/soft-robot-control | 29ade9b7b952e25e639b42767a4f09c87a0e824a | [
"MIT"
] | null | null | null | sofacontrol/scp/models/tpwl.py | StanfordASL/soft-robot-control | 29ade9b7b952e25e639b42767a4f09c87a0e824a | [
"MIT"
] | 3 | 2021-01-23T11:09:40.000Z | 2022-03-02T11:54:57.000Z | import numpy as np
import sofacontrol.utils as scutils
from .template import TemplateModel
class TPWLGuSTO(TemplateModel):
"""
Provides an interface between GuSTO's template model and the TPWL model class
defined in sofacontrol/tpwl/tpwl.py
:dyn_sys: TPWL object as defined in sofacontrol/tpwl/tpwl.p... | 32.65625 | 101 | 0.596491 |
7973585e02d43127d49ffe660dc87fc21f286e1c | 3,889 | py | Python | conan/tools/cmake/utils.py | gonssoruiz/conan | 094b3105fd344bd8cb66207913de26e75b25b082 | [
"MIT"
] | null | null | null | conan/tools/cmake/utils.py | gonssoruiz/conan | 094b3105fd344bd8cb66207913de26e75b25b082 | [
"MIT"
] | null | null | null | conan/tools/cmake/utils.py | gonssoruiz/conan | 094b3105fd344bd8cb66207913de26e75b25b082 | [
"MIT"
] | null | null | null | import os
from conans.errors import ConanException
from conans.util.log import logger
def is_multi_configuration(generator):
if not generator:
return False
return "Visual" in generator or "Xcode" in generator
def architecture_flag(settings):
"""
returns flags specific to the target architec... | 37.757282 | 103 | 0.593983 |
797358628e327903b408df8b6c0dc8dcd6df4664 | 449 | py | Python | mstrio/api/misc.py | Bartman0/mstrio-py | a2b2e352170d98707e0f8cb40d4a57cbbb46268c | [
"Apache-2.0"
] | 1 | 2021-02-17T18:39:14.000Z | 2021-02-17T18:39:14.000Z | mstrio/api/misc.py | Bartman0/mstrio-py | a2b2e352170d98707e0f8cb40d4a57cbbb46268c | [
"Apache-2.0"
] | null | null | null | mstrio/api/misc.py | Bartman0/mstrio-py | a2b2e352170d98707e0f8cb40d4a57cbbb46268c | [
"Apache-2.0"
] | 1 | 2021-02-17T18:39:15.000Z | 2021-02-17T18:39:15.000Z | import requests
def server_status(connection, verbose=False):
"""
Args:
connection: MicroStrategy REST API connection object
verbose (bool, optional): Verbosity of server responses; defaults to False.
Returns:
Complete HTTP response object
"""
response = requests.get(url=... | 23.631579 | 94 | 0.681514 |
7973589e1f840d55f03d897c5691bb15d4eb8ab0 | 11,200 | py | Python | experiments/main.py | arennax/contemporary2020 | 1da86d384a5b7e1afea0d3e309799728a0734e9f | [
"Unlicense"
] | null | null | null | experiments/main.py | arennax/contemporary2020 | 1da86d384a5b7e1afea0d3e309799728a0734e9f | [
"Unlicense"
] | null | null | null | experiments/main.py | arennax/contemporary2020 | 1da86d384a5b7e1afea0d3e309799728a0734e9f | [
"Unlicense"
] | 1 | 2021-06-14T23:56:11.000Z | 2021-06-14T23:56:11.000Z | import sys
sys.path.append(r'../')
import numpy as np
import time
from experiments.learners import *
from experiments.tuned_learners import *
from data_experiment.data_touse_new import *
from data_experiment.data_touse_old import *
def prediction_contemporary(Repo, Directory, metrics, repeats, tocsv=False):
data... | 45.528455 | 108 | 0.547321 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.