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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
28314a6aa38b202f5f8b63288cc331bac9012154 | 542 | py | Python | lebus/print_schedule.py | johnlarusic/lebus | 9e8e80e08ad6bbb38a55cb9777386a40f21e5ee0 | [
"MIT"
] | 5 | 2019-04-24T16:43:51.000Z | 2020-10-11T18:22:39.000Z | lebus/print_schedule.py | johnlarusic/lebus | 9e8e80e08ad6bbb38a55cb9777386a40f21e5ee0 | [
"MIT"
] | null | null | null | lebus/print_schedule.py | johnlarusic/lebus | 9e8e80e08ad6bbb38a55cb9777386a40f21e5ee0 | [
"MIT"
] | null | null | null | from . import *
from datetime import datetime
def print_schedule(stops):
now = datetime.now()
print "Schedule as of {}".format(now)
for stop in stops:
print stop.route,
if len(stop.next) > 0:
for s in stop.next:
val = "now"
if s > now:
... | 20.074074 | 50 | 0.429889 |
69ef8e4568a321ed84d0a0b63028c16865e08e6a | 3,675 | py | Python | migrations/versions/10e455e8d206_tables.py | knadir/microblog-nadir | 48e4ec974ffd5d1c6c75374c3e7bc8dc3d558335 | [
"MIT"
] | null | null | null | migrations/versions/10e455e8d206_tables.py | knadir/microblog-nadir | 48e4ec974ffd5d1c6c75374c3e7bc8dc3d558335 | [
"MIT"
] | null | null | null | migrations/versions/10e455e8d206_tables.py | knadir/microblog-nadir | 48e4ec974ffd5d1c6c75374c3e7bc8dc3d558335 | [
"MIT"
] | null | null | null | """tables
Revision ID: 10e455e8d206
Revises:
Create Date: 2019-05-27 09:11:35.340861
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '10e455e8d206'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated b... | 41.761364 | 99 | 0.676463 |
df62aebef854e46b8008a4e733f3ced9148dba11 | 3,289 | py | Python | share/UNCLEAN/parse_cobol.py | racker/zeroclickinfo-fathead | 600fdf04fbf47b4035cc5451f245c87979446754 | [
"Apache-2.0"
] | 1 | 2021-01-05T16:48:23.000Z | 2021-01-05T16:48:23.000Z | share/UNCLEAN/parse_cobol.py | yanirs/zeroclickinfo-fathead | c06003560ef3368da5857df301938aad549a7d6b | [
"Apache-2.0"
] | null | null | null | share/UNCLEAN/parse_cobol.py | yanirs/zeroclickinfo-fathead | c06003560ef3368da5857df301938aad549a7d6b | [
"Apache-2.0"
] | 1 | 2016-06-12T06:12:02.000Z | 2016-06-12T06:12:02.000Z | from BeautifulSoup import BeautifulSoup
import re
import os
import sys
import string
openclosetags = re.compile('''<.*?>|</.*?>''',re.DOTALL)
spaces = re.compile('''\s+''',re.DOTALL)
files = []
files.append('./docs/cobol.htm')
args = {
'ABS':'( argument-1 )',
'ACOS':'( argument-1 )',
'ANNUITY':'(... | 33.561224 | 232 | 0.543934 |
a98f6b390bfa2bb08f5758534a5a09c31d3a1b04 | 6,133 | py | Python | yt/utilities/parallel_tools/io_runner.py | tukss/yt | 8bf6fce609cad3d4b291ebd94667019ab2e18377 | [
"BSD-3-Clause-Clear"
] | null | null | null | yt/utilities/parallel_tools/io_runner.py | tukss/yt | 8bf6fce609cad3d4b291ebd94667019ab2e18377 | [
"BSD-3-Clause-Clear"
] | 8 | 2020-04-02T16:51:49.000Z | 2022-01-11T14:12:44.000Z | yt/utilities/parallel_tools/io_runner.py | tukss/yt | 8bf6fce609cad3d4b291ebd94667019ab2e18377 | [
"BSD-3-Clause-Clear"
] | 2 | 2020-08-12T15:46:11.000Z | 2021-02-09T13:09:17.000Z | import time
from contextlib import contextmanager
import numpy as np
from yt.utilities.io_handler import BaseIOHandler
from yt.utilities.logger import ytLogger as mylog
from .parallel_analysis_interface import ProcessorPool, parallel_objects
try:
from .parallel_analysis_interface import MPI
except ImportError:
... | 34.072222 | 88 | 0.576879 |
a46967909f0cc76d30618f8f3a171952c699ed78 | 500 | py | Python | pokepay/request/update_shop.py | pokepay/pokepay-partner-python-sdk | 7437370dc1cd0bde38959713015074315291b1e1 | [
"MIT"
] | null | null | null | pokepay/request/update_shop.py | pokepay/pokepay-partner-python-sdk | 7437370dc1cd0bde38959713015074315291b1e1 | [
"MIT"
] | null | null | null | pokepay/request/update_shop.py | pokepay/pokepay-partner-python-sdk | 7437370dc1cd0bde38959713015074315291b1e1 | [
"MIT"
] | 1 | 2022-01-28T03:00:12.000Z | 2022-01-28T03:00:12.000Z | # DO NOT EDIT: File is generated by code generator.
from pokepay_partner_python_sdk.pokepay.request.request import PokepayRequest
from pokepay_partner_python_sdk.pokepay.response.shop_with_accounts import ShopWithAccounts
class UpdateShop(PokepayRequest):
def __init__(self, shop_id, **rest_args):
self.pa... | 35.714286 | 91 | 0.738 |
acac95a767e449f01f3e061f3f4c85c6cabf597b | 507 | py | Python | ibsng/handler/bw/del_leaf.py | ParspooyeshFanavar/pyibsng | d48bcf4f25e3f23461528bf0ff8870cc3d537444 | [
"MIT"
] | 6 | 2018-03-06T10:16:36.000Z | 2021-12-05T12:43:10.000Z | ibsng/handler/bw/del_leaf.py | ParspooyeshFanavar/pyibsng | d48bcf4f25e3f23461528bf0ff8870cc3d537444 | [
"MIT"
] | 3 | 2018-03-06T10:27:08.000Z | 2022-01-02T15:21:27.000Z | ibsng/handler/bw/del_leaf.py | ParspooyeshFanavar/pyibsng | d48bcf4f25e3f23461528bf0ff8870cc3d537444 | [
"MIT"
] | 3 | 2018-01-06T16:28:31.000Z | 2018-09-17T19:47:19.000Z | """Delete leaf API method."""
from ibsng.handler.handler import Handler
class delLeaf(Handler):
"""Delete leaf method class."""
def control(self):
"""Validate inputs after setup method.
:return: None
:rtype: None
"""
self.is_valid(self.leaf_name, str)
def setup(s... | 20.28 | 46 | 0.583826 |
a7f40a825d6104dc655880f126b42dfea4dd1831 | 408 | py | Python | app/lcars.py | aliasmaus/rpi_lcars | 6757432a9bb5584ae351d3ff6bd4c312981b9345 | [
"MIT"
] | null | null | null | app/lcars.py | aliasmaus/rpi_lcars | 6757432a9bb5584ae351d3ff6bd4c312981b9345 | [
"MIT"
] | null | null | null | app/lcars.py | aliasmaus/rpi_lcars | 6757432a9bb5584ae351d3ff6bd4c312981b9345 | [
"MIT"
] | null | null | null | from screens.authorize import ScreenAuthorize
from screens.main import ScreenMain
from ui.ui import UserInterface
import config
if __name__ == "__main__":
#firstScreen = ScreenAuthorize()
firstScreen = ScreenMain()
ui = UserInterface(firstScreen, config.RESOLUTION, config.UI_PLACEMENT_MODE, config.FPS, con... | 29.142857 | 109 | 0.710784 |
3d9d702ee4033b6908d837c417f0044bb28c5859 | 10,459 | py | Python | tests/unit/modules/test_ssh.py | fake-name/salt | d8f04936e4407f51946e32e8166159778f6c31a5 | [
"Apache-2.0"
] | null | null | null | tests/unit/modules/test_ssh.py | fake-name/salt | d8f04936e4407f51946e32e8166159778f6c31a5 | [
"Apache-2.0"
] | null | null | null | tests/unit/modules/test_ssh.py | fake-name/salt | d8f04936e4407f51946e32e8166159778f6c31a5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# import Python Libs
from __future__ import absolute_import, unicode_literals, print_function
import subprocess
import tempfile
from textwrap import dedent
# Import Salt Testing Libs
from tests.support.mixins import LoaderModuleMockMixin
from tests.support.unit import skipIf, TestCase
from te... | 43.761506 | 457 | 0.637537 |
a5960cf1f993479f6aa2a4138f14b88dcd3daa94 | 4,687 | py | Python | bin/update_site.py | Mozilla-GitHub-Standards/d1f672f1bcefb364864bc3fcece0e1461840e6ed1ade1fe7f67552d85c28621f | d124c26bb50f8d78c032802bee1a7a5213cee762 | [
"BSD-3-Clause"
] | null | null | null | bin/update_site.py | Mozilla-GitHub-Standards/d1f672f1bcefb364864bc3fcece0e1461840e6ed1ade1fe7f67552d85c28621f | d124c26bb50f8d78c032802bee1a7a5213cee762 | [
"BSD-3-Clause"
] | null | null | null | bin/update_site.py | Mozilla-GitHub-Standards/d1f672f1bcefb364864bc3fcece0e1461840e6ed1ade1fe7f67552d85c28621f | d124c26bb50f8d78c032802bee1a7a5213cee762 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""
Usage: update_site.py [options]
Updates a server's sources, vendor libraries, packages CSS/JS
assets, migrates the database, and other nifty deployment tasks.
Options:
-h, --help show this help message and exit
-e ENVIRONMENT, --environment=ENVIRONMENT
T... | 32.324138 | 85 | 0.587583 |
6eefd9661210f2253b0b03bdcde39e792369baa9 | 19,232 | py | Python | models/stylegan2/model.py | aiksir/pixel2style2pixel | 147b29c1d4bd10229df0fdf6e67705d3401f3372 | [
"MIT"
] | 2,450 | 2020-10-01T11:04:45.000Z | 2022-03-31T09:46:00.000Z | models/stylegan2/model.py | aiksir/pixel2style2pixel | 147b29c1d4bd10229df0fdf6e67705d3401f3372 | [
"MIT"
] | 255 | 2020-10-07T02:50:39.000Z | 2022-03-29T15:07:23.000Z | models/stylegan2/model.py | aiksir/pixel2style2pixel | 147b29c1d4bd10229df0fdf6e67705d3401f3372 | [
"MIT"
] | 438 | 2020-10-01T11:06:35.000Z | 2022-03-31T10:27:00.000Z | import math
import random
import torch
from torch import nn
from torch.nn import functional as F
from models.stylegan2.op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d
class PixelNorm(nn.Module):
def __init__(self):
super().__init__()
def forward(self, input):
return input... | 28.534125 | 101 | 0.521215 |
992d996a485de94ad55305552e42c7fbc92ec64b | 3,327 | py | Python | tensorflow/contrib/data/python/kernel_tests/serialization/serialization_integration_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/data/python/kernel_tests/serialization/serialization_integration_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/data/python/kernel_tests/serialization/serialization_integration_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 26 | 2017-04-12T16:25:44.000Z | 2018-10-30T10:10:15.000Z | # Copyright 2018 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.686047 | 83 | 0.687707 |
7c5134c016677603c817258e844c77c9c00bcdd3 | 10,942 | py | Python | nodes/matlab_controller_node.py | icoderaven/slytherin_dagger | 9a12cd92c9f884c25764139f3efdb8535484cc29 | [
"BSD-3-Clause"
] | null | null | null | nodes/matlab_controller_node.py | icoderaven/slytherin_dagger | 9a12cd92c9f884c25764139f3efdb8535484cc29 | [
"BSD-3-Clause"
] | null | null | null | nodes/matlab_controller_node.py | icoderaven/slytherin_dagger | 9a12cd92c9f884c25764139f3efdb8535484cc29 | [
"BSD-3-Clause"
] | 1 | 2018-11-22T00:47:23.000Z | 2018-11-22T00:47:23.000Z | #!/usr/bin/env python
import roslib
roslib.load_manifest('slytherin_dagger')
import rospy
import numpy as np
import random as rnd
import subprocess
import shlex
import sys
import os.path
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
import src.linear_predictor as predictor
import src.visual_featu... | 43.593625 | 112 | 0.527235 |
4679751404b7d8908d666b7246c20e1745117ecf | 6,824 | py | Python | python_modules/dagster-graphql/dagster_graphql_tests/graphql/test_reexecution.py | basilvetas/dagster | b08f5534a0b0277dab38cb7b6a46d324e94b8940 | [
"Apache-2.0"
] | 2 | 2021-06-21T17:50:26.000Z | 2021-06-21T19:14:23.000Z | python_modules/dagster-graphql/dagster_graphql_tests/graphql/test_reexecution.py | basilvetas/dagster | b08f5534a0b0277dab38cb7b6a46d324e94b8940 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster-graphql/dagster_graphql_tests/graphql/test_reexecution.py | basilvetas/dagster | b08f5534a0b0277dab38cb7b6a46d324e94b8940 | [
"Apache-2.0"
] | 1 | 2021-08-18T17:21:57.000Z | 2021-08-18T17:21:57.000Z | from dagster.core.utils import make_new_run_id
from dagster_graphql.client.query import (
LAUNCH_PIPELINE_EXECUTION_MUTATION,
LAUNCH_PIPELINE_REEXECUTION_MUTATION,
)
from dagster_graphql.test.utils import execute_dagster_graphql, infer_pipeline_selector
from .graphql_context_test_suite import ExecutingGraphQLC... | 37.494505 | 99 | 0.5784 |
296145f8d3d22876ed73277e901cd3478f7e5931 | 9,139 | py | Python | utils/image_blending.py | ishitsuka-hikaru/data-augmentation-for-coco | b7d18f7ebc02102d2037835937ce2c74ad923091 | [
"MIT"
] | null | null | null | utils/image_blending.py | ishitsuka-hikaru/data-augmentation-for-coco | b7d18f7ebc02102d2037835937ce2c74ad923091 | [
"MIT"
] | null | null | null | utils/image_blending.py | ishitsuka-hikaru/data-augmentation-for-coco | b7d18f7ebc02102d2037835937ce2c74ad923091 | [
"MIT"
] | null | null | null | import cv2
import glob
import matplotlib.pyplot as plt
import numpy as np
import os
import random
def rescale_anns(anns, s, t):
for ann in anns:
ann['bbox'] = [_*s for _ in ann['bbox']]
ann['bbox'][0] += t[0]
ann['bbox'][1] += t[1]
ann['area'] *= s*s
for i, segms in enumera... | 33.973978 | 99 | 0.543714 |
ddb560bd2fd931823f4cd34fc9e8a7abe1794d5f | 9,749 | py | Python | threathunter_common_python/threathunter_common/ip_risk_repo_dao.py | threathunterX/python_lib | e2d4052de04c82cb7bccd08042f28db824cab442 | [
"Apache-2.0"
] | 2 | 2019-03-17T04:03:08.000Z | 2019-05-01T09:42:23.000Z | threathunter_common_python/threathunter_common/ip_risk_repo_dao.py | threathunterX/python_lib | e2d4052de04c82cb7bccd08042f28db824cab442 | [
"Apache-2.0"
] | null | null | null | threathunter_common_python/threathunter_common/ip_risk_repo_dao.py | threathunterX/python_lib | e2d4052de04c82cb7bccd08042f28db824cab442 | [
"Apache-2.0"
] | 4 | 2019-06-24T05:47:24.000Z | 2020-09-29T05:00:31.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import datetime,json,datetime,time,re,ipcalc,six
from .SSDB import SSDB
from .util import curr_timestamp
from .ip_opt import Ip
__author__ = "nebula"
#share
class IpRiskRepoDAO:
def __init__(self,ssdb_port,ssdb_host):
se... | 34.69395 | 97 | 0.487024 |
e66a7660d3b595476c42807ac5e4408e6f8dd7a1 | 3,491 | py | Python | evaluation-read.py | baillielab/maic | c0a91045554b1a81a4f715fbc4ef4dd8cadbba2c | [
"MIT"
] | 4 | 2020-01-15T16:17:40.000Z | 2022-02-14T10:38:56.000Z | evaluation-read.py | baillielab/maic | c0a91045554b1a81a4f715fbc4ef4dd8cadbba2c | [
"MIT"
] | 1 | 2020-02-07T15:20:41.000Z | 2020-02-13T11:38:31.000Z | evaluation-read.py | baillielab/maic | c0a91045554b1a81a4f715fbc4ef4dd8cadbba2c | [
"MIT"
] | null | null | null | # coding=utf-8
import json
import numpy as np
import string, sys, os, subprocess
import argparse
import pandas as pd
import seaborn as sns
import matplotlib.pylab as plt
#-----------------------------
scriptpath = os.path.dirname(os.path.realpath(__file__))
#-----------------------------
parser = argparse.ArgumentParse... | 31.169643 | 131 | 0.562017 |
6d8cfafbc425b16a20d0e11d634a5547d7df9f14 | 864 | py | Python | var/spack/repos/builtin/packages/rgb/package.py | robertmaynard/spack | 35d81a9006a5fa32a012a40874ac6cbdefd4a259 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2021-09-19T10:20:43.000Z | 2021-09-19T10:20:43.000Z | var/spack/repos/builtin/packages/rgb/package.py | robertmaynard/spack | 35d81a9006a5fa32a012a40874ac6cbdefd4a259 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2021-01-06T19:26:40.000Z | 2021-01-06T19:42:17.000Z | var/spack/repos/builtin/packages/rgb/package.py | shintaro-iwasaki/spack | 47998b3f4733c1264760c4a9744b1669661354b9 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Rgb(AutotoolsPackage, XorgPackage):
"""X color name database.
This package includes b... | 33.230769 | 95 | 0.741898 |
fe5bece8c5187eb7a85cf59c0f624c5c3c4f61d0 | 883 | py | Python | Medium/exist.py | a-shah8/LeetCode | a654e478f51b2254f7b49055beba6b5675bc5223 | [
"MIT"
] | 1 | 2021-06-02T15:03:41.000Z | 2021-06-02T15:03:41.000Z | Medium/exist.py | a-shah8/LeetCode | a654e478f51b2254f7b49055beba6b5675bc5223 | [
"MIT"
] | null | null | null | Medium/exist.py | a-shah8/LeetCode | a654e478f51b2254f7b49055beba6b5675bc5223 | [
"MIT"
] | null | null | null | ## Using DFS with recursion
class Solution:
def exist(self, board: List[List[str]], word: str) -> bool:
def dfs(board, i, j, word):
if len(word)==0:
return True
if i<0 or i>=len(board) or j<0 or j>=len(board[0]) or word[0]!=board[i][j]:
return ... | 26.757576 | 87 | 0.428086 |
dd684379433e31abd7ed6ab91522e37046a7a771 | 4,246 | py | Python | app.py | kethan1/full-stack-web-development-4 | 44ac5d22ae2f248add49b22e7b54e579adc03d9d | [
"MIT"
] | null | null | null | app.py | kethan1/full-stack-web-development-4 | 44ac5d22ae2f248add49b22e7b54e579adc03d9d | [
"MIT"
] | null | null | null | app.py | kethan1/full-stack-web-development-4 | 44ac5d22ae2f248add49b22e7b54e579adc03d9d | [
"MIT"
] | null | null | null | from flask import *
from flask_pymongo import PyMongo
from flask_moment import Moment
import datetime
from werkzeug.exceptions import HTTPException
app = Flask(__name__)
app.url_map.strict_slashes = False
app.config['MONGO_URI'] = "mongodb://localhost:27017/full-stack-web-development4"
app.secret_key = \
b"h\xa2\... | 35.983051 | 131 | 0.578898 |
b34c5fc9e0ba8923f44c005c6b8a0a4a1cbb79cc | 7,701 | py | Python | sdk/python/tests/compiler/component_builder_test.py | tomar27/pipelines | fc6a2761b3770cb3b854115b841c1a50876665c3 | [
"Apache-2.0"
] | 2,860 | 2018-05-24T04:55:01.000Z | 2022-03-31T13:49:56.000Z | sdk/python/tests/compiler/component_builder_test.py | tomar27/pipelines | fc6a2761b3770cb3b854115b841c1a50876665c3 | [
"Apache-2.0"
] | 7,331 | 2018-05-16T09:03:26.000Z | 2022-03-31T23:22:04.000Z | sdk/python/tests/compiler/component_builder_test.py | tomar27/pipelines | fc6a2761b3770cb3b854115b841c1a50876665c3 | [
"Apache-2.0"
] | 1,359 | 2018-05-15T11:05:41.000Z | 2022-03-31T09:42:09.000Z | # Copyright 2018 The Kubeflow 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 agreed to in... | 40.319372 | 134 | 0.662901 |
90255bd292a4394a1b517499b2e34ef5121681c4 | 1,682 | py | Python | azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_assembly_clr.py | CharaD7/azure-sdk-for-python | 9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c | [
"MIT"
] | null | null | null | azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_assembly_clr.py | CharaD7/azure-sdk-for-python | 9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c | [
"MIT"
] | null | null | null | azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_assembly_clr.py | CharaD7/azure-sdk-for-python | 9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c | [
"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 ... | 39.116279 | 110 | 0.621284 |
f4996797a541881e2bc80668110134427090ce81 | 11,478 | py | Python | UI/PlatformWin.py | MaoGreenDou/ArtisticCloudBlog | bf0608864b0b91368f0dfd3bc593bbedaa7576ef | [
"MIT"
] | 1 | 2020-07-18T10:21:36.000Z | 2020-07-18T10:21:36.000Z | UI/PlatformWin.py | MaoGreenDou/ArtisticCloudBlog | bf0608864b0b91368f0dfd3bc593bbedaa7576ef | [
"MIT"
] | null | null | null | UI/PlatformWin.py | MaoGreenDou/ArtisticCloudBlog | bf0608864b0b91368f0dfd3bc593bbedaa7576ef | [
"MIT"
] | null | null | null | import sys
import UI.Ui_PlatformWin
import BLL.FileSystem
import BLL.ClientSocket
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import QFileDialog, QMessageBox
import UI.TransferWin
import UI.CommentDialog
from PIL import Image
from UI.LoginWin import simpleMessageBox
# 用户界面类
class PlatformWin(QtWid... | 33.561404 | 115 | 0.59662 |
b31765e2371a1834a694abcf7999e8a43361d4b7 | 6,287 | py | Python | src/sage/schemes/hyperelliptic_curves/jacobian_homset.py | bopopescu/sage-5 | 9d85b34956ca2edd55af307f99c5d3859acd30bf | [
"BSL-1.0"
] | 2 | 2021-08-20T00:30:35.000Z | 2021-11-17T10:54:00.000Z | src/sage/schemes/hyperelliptic_curves/jacobian_homset.py | bopopescu/sage-5 | 9d85b34956ca2edd55af307f99c5d3859acd30bf | [
"BSL-1.0"
] | null | null | null | src/sage/schemes/hyperelliptic_curves/jacobian_homset.py | bopopescu/sage-5 | 9d85b34956ca2edd55af307f99c5d3859acd30bf | [
"BSL-1.0"
] | null | null | null | """
Rational point sets on a Jacobian
EXAMPLES::
sage: x = QQ['x'].0
sage: f = x^5 + x + 1
sage: C = HyperellipticCurve(f); C
Hyperelliptic Curve over Rational Field defined by y^2 = x^5 + x + 1
sage: C(QQ)
Set of rational points of Hyperelliptic Curve over Rational Field defined by y^2 = x^5 ... | 35.122905 | 119 | 0.501352 |
47519ae30caa6577ef3a8cc3db957bd63730687e | 460 | py | Python | photographic/users/migrations/0006_alter_user_followers.py | adrianeriksen/photographic | 5418a6a79850fa887242f273a35ef9ab585d9d1a | [
"MIT"
] | null | null | null | photographic/users/migrations/0006_alter_user_followers.py | adrianeriksen/photographic | 5418a6a79850fa887242f273a35ef9ab585d9d1a | [
"MIT"
] | 6 | 2021-04-25T08:10:51.000Z | 2021-05-25T17:58:32.000Z | photographic/users/migrations/0006_alter_user_followers.py | adrianeriksen/photographic | 5418a6a79850fa887242f273a35ef9ab585d9d1a | [
"MIT"
] | null | null | null | # Generated by Django 3.2.8 on 2021-10-24 10:28
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0005_user_followers'),
]
operations = [
migrations.AlterField(
model_name='user',
... | 23 | 96 | 0.63913 |
28bade56cfc09f456d5821ca6e41625094fa2596 | 4,992 | py | Python | users/views/permission.py | yileye/OpenSA | e935480da142d1d7d170db84360f72cc7327a77e | [
"Apache-2.0"
] | 280 | 2019-01-11T08:32:36.000Z | 2022-03-27T16:53:41.000Z | users/views/permission.py | leoiceo/opensa | 55d01427d8aa35492ea3492b042659b12959ddd6 | [
"Apache-2.0"
] | 19 | 2020-02-11T23:37:22.000Z | 2022-03-11T23:38:53.000Z | users/views/permission.py | leoiceo/opensa | 55d01427d8aa35492ea3492b042659b12959ddd6 | [
"Apache-2.0"
] | 104 | 2019-01-11T08:40:20.000Z | 2022-03-27T16:54:17.000Z | #!/usr/bin/env python
# ~*~ coding: utf-8 ~*~
# by leoiceo
from __future__ import unicode_literals
import json
from django.http import HttpResponseRedirect, HttpResponse
from django.views.generic import TemplateView, ListView, View, CreateView, UpdateView, DeleteView, DetailView
from django.utils.translation... | 33.503356 | 110 | 0.609375 |
f59d4441e39cb12dc9e48dcd3a98d4f8f7bea6fe | 2,503 | py | Python | .ci/jenkins/conf.py | ytimenkov/conan | 89eb275b9696b308aaaa1fbfaa0f8cdab284a764 | [
"MIT"
] | null | null | null | .ci/jenkins/conf.py | ytimenkov/conan | 89eb275b9696b308aaaa1fbfaa0f8cdab284a764 | [
"MIT"
] | null | null | null | .ci/jenkins/conf.py | ytimenkov/conan | 89eb275b9696b308aaaa1fbfaa0f8cdab284a764 | [
"MIT"
] | null | null | null | import argparse
import os
import platform
from contextlib import contextmanager
winpylocation = {"py27": "C:\\Python27\\python.exe",
"py34": "C:\\Python34\\python.exe",
"py36": "C:\\Python36\\python.exe"}
macpylocation = {"py27": "/usr/bin/python", # /Users/jenkins_ci/.pyenv/version... | 33.373333 | 100 | 0.596884 |
6649e91518aab9dc19b7ab454f6c00776f504eda | 99 | py | Python | enthought/tvtk/pyface/ui/wx/scene_editor.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 3 | 2016-12-09T06:05:18.000Z | 2018-03-01T13:00:29.000Z | enthought/tvtk/pyface/ui/wx/scene_editor.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 1 | 2020-12-02T00:51:32.000Z | 2020-12-02T08:48:55.000Z | enthought/tvtk/pyface/ui/wx/scene_editor.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | null | null | null | # proxy module
from __future__ import absolute_import
from tvtk.pyface.ui.wx.scene_editor import *
| 24.75 | 44 | 0.828283 |
50ec1be2ed89e801a113e86686a5d082d5560915 | 75,077 | py | Python | neutron/agent/linux/dhcp.py | tankertyp/openstack-learning | d729672663f170d0138ecf23b3c23df225c1b1b8 | [
"Apache-2.0"
] | null | null | null | neutron/agent/linux/dhcp.py | tankertyp/openstack-learning | d729672663f170d0138ecf23b3c23df225c1b1b8 | [
"Apache-2.0"
] | null | null | null | neutron/agent/linux/dhcp.py | tankertyp/openstack-learning | d729672663f170d0138ecf23b3c23df225c1b1b8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 OpenStack Foundation
# 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 requ... | 42.705916 | 79 | 0.578939 |
44666844371ff8fad62e6bbdb102cad761f74a80 | 1,826 | py | Python | oo_trees/dataset.py | asross/decision_trees | 8cbdc7a90474abbeddcfccdaadea0e67d67aec86 | [
"Apache-2.0"
] | 1 | 2021-09-18T08:42:05.000Z | 2021-09-18T08:42:05.000Z | oo_trees/dataset.py | asross/decision_trees | 8cbdc7a90474abbeddcfccdaadea0e67d67aec86 | [
"Apache-2.0"
] | null | null | null | oo_trees/dataset.py | asross/decision_trees | 8cbdc7a90474abbeddcfccdaadea0e67d67aec86 | [
"Apache-2.0"
] | null | null | null | from collections import defaultdict
from collections import Counter
from .outcome_counter import *
from .attribute import *
from .single_attribute_splitter_finder import *
import random
import numpy
class Dataset():
def __init__(self, X, y, attributes=None):
self.X = X
self.y = y
self.outco... | 38.041667 | 94 | 0.661008 |
ebb3c6612d909e8f635165731f3b91dbe29120c3 | 183 | py | Python | Python101/ep3-Datatypes.py | hemaalathank/incredible-dev-videos | ff1cb7285427d3f851fee292ece3b8838728a7f8 | [
"MIT"
] | 2 | 2021-02-23T15:33:34.000Z | 2021-03-09T06:59:02.000Z | Python101/ep3-Datatypes.py | hemaalathank/incredible-dev-videos | ff1cb7285427d3f851fee292ece3b8838728a7f8 | [
"MIT"
] | null | null | null | Python101/ep3-Datatypes.py | hemaalathank/incredible-dev-videos | ff1cb7285427d3f851fee292ece3b8838728a7f8 | [
"MIT"
] | 2 | 2021-03-09T06:20:28.000Z | 2021-03-18T10:47:11.000Z | # Basic Data types in Python
print(type(1)) # <type 'int'>
print(type(1.432)) # <type 'float'>
print(type("abcd")) # <type 'str'>
print(type(True))
print(type(False)) # <type 'bool'> | 30.5 | 35 | 0.63388 |
9a16956e5a4621656f3fd22c110ffd78b04f82ca | 3,546 | py | Python | messente_api/models/error_code_phonebook.py | messente/messente-api-python | 154abca9e6a226a5c97d8052c3f2631765503426 | [
"Apache-2.0"
] | null | null | null | messente_api/models/error_code_phonebook.py | messente/messente-api-python | 154abca9e6a226a5c97d8052c3f2631765503426 | [
"Apache-2.0"
] | null | null | null | messente_api/models/error_code_phonebook.py | messente/messente-api-python | 154abca9e6a226a5c97d8052c3f2631765503426 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Messente API
[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber, WhatsApp and Telegram messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure yo... | 31.105263 | 473 | 0.589961 |
0d1f1b447103793456d278e29a85b2da74d38e0d | 2,388 | py | Python | backend/server/backend/channels/utils.py | FlickerSoul/Graphery | 8b1390e1ba96fd2867f0cd8e5fc1d4ad6108121e | [
"MIT"
] | 5 | 2020-08-26T00:15:01.000Z | 2021-01-11T17:24:51.000Z | backend/server/backend/channels/utils.py | FlickerSoul/Graphery | 8b1390e1ba96fd2867f0cd8e5fc1d4ad6108121e | [
"MIT"
] | 69 | 2020-08-02T23:45:44.000Z | 2021-04-17T03:04:32.000Z | backend/server/backend/channels/utils.py | FlickerSoul/Graphery | 8b1390e1ba96fd2867f0cd8e5fc1d4ad6108121e | [
"MIT"
] | 4 | 2020-09-10T05:40:49.000Z | 2020-12-20T11:44:16.000Z | import json
from urllib import request
from os import getenv
from queue import Queue
from typing import Mapping
from channels.consumer import SyncConsumer
from bundle.server_utils.utils import create_error_response
from bundle.server_utils.params import VERSION
_REMOTE_URL = getenv('GRAPHERY_REMOTE_EXECUTE_URL', 'h... | 31.84 | 78 | 0.660385 |
5aff5c7d7ca94959076309b328f5a91d369ad414 | 9,123 | py | Python | app.py | shameem16/Online-Employee-Payroll-System | 32bb2375338dbcdcc22864b729b46cabb7422893 | [
"MIT"
] | null | null | null | app.py | shameem16/Online-Employee-Payroll-System | 32bb2375338dbcdcc22864b729b46cabb7422893 | [
"MIT"
] | null | null | null | app.py | shameem16/Online-Employee-Payroll-System | 32bb2375338dbcdcc22864b729b46cabb7422893 | [
"MIT"
] | null | null | null | from flask import Flask, flash, redirect, render_template, request, session, abort
import os
import json
import openpyxl
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
app = Flask(__name__, static_url_path='/static')
db=json.load(open("database/db.json"))
@app.route(... | 35.636719 | 136 | 0.600132 |
74eb84466320120efc4a2544d5ceadf4608e3e5e | 3,496 | py | Python | google/ads/google_ads/v1/proto/services/campaign_budget_service_pb2_grpc.py | jiulongw/google-ads-python | 6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e | [
"Apache-2.0"
] | 1 | 2019-11-30T23:42:39.000Z | 2019-11-30T23:42:39.000Z | google/ads/google_ads/v1/proto/services/campaign_budget_service_pb2_grpc.py | jiulongw/google-ads-python | 6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v1/proto/services/campaign_budget_service_pb2_grpc.py | jiulongw/google-ads-python | 6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e | [
"Apache-2.0"
] | 1 | 2020-03-13T00:14:31.000Z | 2020-03-13T00:14:31.000Z | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from google.ads.google_ads.v1.proto.resources import campaign_budget_pb2 as google_dot_ads_dot_googleads__v1_dot_proto_dot_resources_dot_campaign__budget__pb2
from google.ads.google_ads.v1.proto.services import campaign_budget_service_pb... | 49.942857 | 173 | 0.821224 |
cd971b815fe824e14e979b1bece0cd8a41cf0d18 | 2,632 | py | Python | examples/intermediate/build.py | rhattersley/curly-octo-journey | ba802f2545f37968b35b5f790a6ad91999caa450 | [
"MIT"
] | null | null | null | examples/intermediate/build.py | rhattersley/curly-octo-journey | ba802f2545f37968b35b5f790a6ad91999caa450 | [
"MIT"
] | null | null | null | examples/intermediate/build.py | rhattersley/curly-octo-journey | ba802f2545f37968b35b5f790a6ad91999caa450 | [
"MIT"
] | null | null | null | import os
import jinja2
import yaml
class _StackOutput:
def __init__(self, stack, output):
self.stack = stack
self.output = output
def __repr__(self):
return '!Ref {}.{}'.format(self.stack, self.output)
@staticmethod
def constructor(loader, node):
value = loader.cons... | 29.244444 | 80 | 0.565729 |
350e0c8b8328c6070d453302b793c1ecd8fe083f | 13,406 | py | Python | main_al.py | osimeoni/RethinkingDeepActiveLearning | 8a0056f47605276b1c9d8338d423433dae73f5e9 | [
"MIT"
] | 4 | 2021-03-01T17:43:48.000Z | 2022-03-24T11:28:48.000Z | main_al.py | osimeoni/RethinkingDeepActiveLearning | 8a0056f47605276b1c9d8338d423433dae73f5e9 | [
"MIT"
] | null | null | null | main_al.py | osimeoni/RethinkingDeepActiveLearning | 8a0056f47605276b1c9d8338d423433dae73f5e9 | [
"MIT"
] | null | null | null | # Authors: O. Simeoni, M. Budnik, Y. Avrithis, G. Gravier, 2019
import os
import time
import random
import pickle
import numpy as np
import torch
import pdb
from tqdm import tqdm
from time import gmtime, strftime
from lib import checkpoints, parse_args, training, label_propagation, pretraining
from lib import model... | 41.76324 | 111 | 0.575638 |
24dc9a02fef34dc7ea018096854223f61d41a4f8 | 198 | py | Python | virtual/lib/python3.6/site-packages/pylint/test/data/suppliermodule_test.py | drewheathens/The-Moringa-Tribune | 98ee4d63c9df6f1f7497fc6876960a822d914500 | [
"MIT"
] | 463 | 2015-01-15T08:17:42.000Z | 2022-03-28T15:10:20.000Z | virtual/lib/python3.6/site-packages/pylint/test/data/suppliermodule_test.py | drewheathens/The-Moringa-Tribune | 98ee4d63c9df6f1f7497fc6876960a822d914500 | [
"MIT"
] | 52 | 2015-01-06T02:43:59.000Z | 2022-03-14T11:15:21.000Z | virtual/lib/python3.6/site-packages/pylint/test/data/suppliermodule_test.py | drewheathens/The-Moringa-Tribune | 98ee4d63c9df6f1f7497fc6876960a822d914500 | [
"MIT"
] | 249 | 2015-01-07T22:49:49.000Z | 2022-03-18T02:32:06.000Z | """ file suppliermodule.py """
class Interface:
def get_value(self):
raise NotImplementedError
def set_value(self, value):
raise NotImplementedError
class DoNothing: pass
| 18 | 33 | 0.691919 |
965443b2d0dcec9cef3ec596434e9f92aea243b0 | 18,916 | py | Python | pandas/core/indexes/period.py | ChuliangXiao/pandas | 29094b6aaeae74794d1745c2f73ea04195acaa16 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/core/indexes/period.py | ChuliangXiao/pandas | 29094b6aaeae74794d1745c2f73ea04195acaa16 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/core/indexes/period.py | ChuliangXiao/pandas | 29094b6aaeae74794d1745c2f73ea04195acaa16 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | from __future__ import annotations
from datetime import (
datetime,
timedelta,
)
from typing import Hashable
import warnings
import numpy as np
from pandas._libs import (
index as libindex,
lib,
)
from pandas._libs.tslibs import (
BaseOffset,
NaT,
Period,
Resolution,
Tick,
)
from ... | 32.170068 | 96 | 0.592779 |
a8a5269abad3ae1adb7dbcf4ca223178370310e9 | 9,823 | py | Python | src/ashpy/models/convolutional/decoders.py | zurutech/ashpy | 16d53100c943abf4b051b27cfd025df0a6e7c8c9 | [
"Apache-2.0"
] | 89 | 2019-07-05T11:57:24.000Z | 2021-11-22T04:25:11.000Z | src/ashpy/models/convolutional/decoders.py | zurutech/ashpy | 16d53100c943abf4b051b27cfd025df0a6e7c8c9 | [
"Apache-2.0"
] | 58 | 2019-07-09T09:59:19.000Z | 2021-05-21T15:29:53.000Z | src/ashpy/models/convolutional/decoders.py | zurutech/ashpy | 16d53100c943abf4b051b27cfd025df0a6e7c8c9 | [
"Apache-2.0"
] | 11 | 2019-07-08T08:39:06.000Z | 2021-08-23T12:15:16.000Z | # Copyright 2019 Zuru Tech HK Limited. 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 la... | 33.989619 | 100 | 0.56612 |
b42b9db56ae8cdb927ef96a0f57e6e2d406488e2 | 335,215 | py | Python | run_unittests.py | smxia/mason_minigui | d79c20065e85fcb625fc01e00fe107c311c10703 | [
"Apache-2.0"
] | null | null | null | run_unittests.py | smxia/mason_minigui | d79c20065e85fcb625fc01e00fe107c311c10703 | [
"Apache-2.0"
] | null | null | null | run_unittests.py | smxia/mason_minigui | d79c20065e85fcb625fc01e00fe107c311c10703 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2016-2017 The Meson development team
# 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 ... | 46.077663 | 199 | 0.583563 |
82d2bf864523d911226f35fa8aac37cf10e20580 | 790 | py | Python | markov_chain/fetch_data.py | anthonycomfort/markov_chain | 56dc89651a963b73411f47d66fbf5858189aa8b0 | [
"MIT"
] | null | null | null | markov_chain/fetch_data.py | anthonycomfort/markov_chain | 56dc89651a963b73411f47d66fbf5858189aa8b0 | [
"MIT"
] | 2 | 2016-08-29T18:22:06.000Z | 2016-08-29T18:23:01.000Z | markov_chain/fetch_data.py | anthonycomfort/markov_chain | 56dc89651a963b73411f47d66fbf5858189aa8b0 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
import urllib2
import re
def createSoup(URL):
response = urllib2.urlopen(URL)
raw_html = response.read()
soup = BeautifulSoup(raw_html, 'html.parser')
new_soup = soup.find('div', {'class' : re.compile('post-content')})
#creates a variable that contains all content within a div t... | 46.470588 | 108 | 0.73038 |
ee5beacb409148cde4bd62e9a89659ded08c9140 | 667 | py | Python | minifold/singleton.py | vishalbelsare/minifold | f1d90999cef46715a556f93dbead6ed987c4fdd0 | [
"BSD-3-Clause"
] | 15 | 2018-09-03T09:40:59.000Z | 2021-07-16T16:14:46.000Z | src/singleton.py | Infinite-Blue-1042/minifold | cd0aa9207f9e1819ed2ecbb24373cdcfe27abd16 | [
"BSD-3-Clause"
] | null | null | null | src/singleton.py | Infinite-Blue-1042/minifold | cd0aa9207f9e1819ed2ecbb24373cdcfe27abd16 | [
"BSD-3-Clause"
] | 8 | 2019-01-25T07:18:59.000Z | 2021-04-07T17:54:54.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file is part of the minifold project.
# https://github.com/nokia/minifold
__author__ = "Marc-Olivier Buob"
__maintainer__ = "Marc-Olivier Buob"
__email__ = "marc-olivier.buob@nokia-bell-labs.com"
__copyright__ = "Copyright (C) 2018, Nokia"
__license__ ... | 30.318182 | 85 | 0.68066 |
1609a1a1bc83eda5c52f46b8007388c80b7b293e | 19,307 | py | Python | photonpy/smlm/ui/app.py | qnano/photonpy | 9c03a1c9f4c2177c9c6fb3f2f16dfec2306006d4 | [
"MIT"
] | 5 | 2021-04-29T21:06:05.000Z | 2022-03-23T03:45:25.000Z | photonpy/smlm/ui/app.py | qnano/photonpy | 9c03a1c9f4c2177c9c6fb3f2f16dfec2306006d4 | [
"MIT"
] | null | null | null | photonpy/smlm/ui/app.py | qnano/photonpy | 9c03a1c9f4c2177c9c6fb3f2f16dfec2306006d4 | [
"MIT"
] | 1 | 2021-06-18T12:39:28.000Z | 2021-06-18T12:39:28.000Z |
import sys,os
import numpy as np
import tqdm
from PyQt5.QtWidgets import QApplication, QLineEdit, QFileDialog, QDialog,QVBoxLayout,QMessageBox,QCheckBox
from PyQt5 import QtGui
from PyQt5 import QtCore, QtWidgets
import matplotlib
matplotlib.use('Qt5Agg')
import matplotlib.pyplot as plt
from matplotlib.backends.backe... | 34.476786 | 167 | 0.589838 |
87906f7865b973ee8c57d001dc04343448f48083 | 245 | py | Python | flow/core/kernel/vehicle/__init__.py | syuntoku14/flow | 3a1157cde31d0b7d6a3cc2f91eef0ec9ea53575e | [
"MIT"
] | null | null | null | flow/core/kernel/vehicle/__init__.py | syuntoku14/flow | 3a1157cde31d0b7d6a3cc2f91eef0ec9ea53575e | [
"MIT"
] | null | null | null | flow/core/kernel/vehicle/__init__.py | syuntoku14/flow | 3a1157cde31d0b7d6a3cc2f91eef0ec9ea53575e | [
"MIT"
] | null | null | null | from flow.core.kernel.vehicle.base import KernelVehicle
from flow.core.kernel.vehicle.traci import TraCIVehicle
from flow.core.kernel.vehicle.aimsun import AimsunKernelVehicle
__all__ = ['KernelVehicle', 'TraCIVehicle', 'AimsunKernelVehicle']
| 35 | 66 | 0.828571 |
46d25ec0a5b0380ed71f1616648f248db607d049 | 8,586 | py | Python | docs/conf.py | pyarnold/asyncio-redis | 2da0328e21855ddac2c97d664b4a2dc237d3f5a6 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2020-12-18T01:07:51.000Z | 2020-12-18T01:07:51.000Z | docs/conf.py | pyarnold/asyncio-redis | 2da0328e21855ddac2c97d664b4a2dc237d3f5a6 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | docs/conf.py | pyarnold/asyncio-redis | 2da0328e21855ddac2c97d664b4a2dc237d3f5a6 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | # -*- coding: utf-8 -*-
#
# asyncio_redis documentation build configuration file, created by
# sphinx-quickstart on Thu Oct 31 08:50:13 2013.
#
# 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 file.
#... | 31.8 | 80 | 0.717447 |
f7359e904faa026a802269f620739354e64f4bbc | 62 | py | Python | app/tests.py | nibinn/Rnd | e306b3da3af5e9da66d11436bc7abf3a77f50573 | [
"MIT"
] | 1 | 2022-03-30T15:28:33.000Z | 2022-03-30T15:28:33.000Z | authentication/tests.py | piyushjain-pj/pneumonia_and_covid_prediction_tool | b5f503b1672b1093c4bd6f9e053d6024e4f73f9d | [
"MIT"
] | 14 | 2020-06-05T18:37:13.000Z | 2022-03-11T23:26:12.000Z | authentication/tests.py | piyushjain-pj/pneumonia_and_covid_prediction_tool | b5f503b1672b1093c4bd6f9e053d6024e4f73f9d | [
"MIT"
] | null | null | null |
from django.test import TestCase
# Create your tests here.
| 10.333333 | 32 | 0.758065 |
cf2665144a589fd50b589a84367c9bda251884a7 | 957 | py | Python | src/Sanga/media/peoplenews.py | allenyummy/Sanga | ff4cc60e0fd05cac49bdf15ad8a57dfedcf75fd0 | [
"MIT"
] | 2 | 2021-09-01T13:39:58.000Z | 2021-09-01T13:41:49.000Z | src/Sanga/media/peoplenews.py | allenyummy/Sanga | ff4cc60e0fd05cac49bdf15ad8a57dfedcf75fd0 | [
"MIT"
] | 3 | 2021-08-31T06:00:23.000Z | 2021-09-01T08:52:41.000Z | src/Sanga/media/peoplenews.py | allenyummy/Sanga | ff4cc60e0fd05cac49bdf15ad8a57dfedcf75fd0 | [
"MIT"
] | null | null | null | # encoding=utf-8
# Author: Yu-Lun Chiang
# Description: Get news
import logging
from typing import Dict, List, Union
from bs4 import BeautifulSoup
from .base import BaseMediaNewsCrawler
from ..struct import NewsStruct
logger = logging.getLogger(__name__)
class PeopleNews(BaseMediaNewsCrawler):
"""Web Crawler ... | 23.341463 | 77 | 0.657262 |
c1594310272d009b4034dbd4ded7d50bda72aa7b | 10,852 | py | Python | tests/test_onnx_v2.py | Fcc-Roy/transformers | 0fe17f375a4f0fdd9aea260d0645ccfd4896e958 | [
"Apache-2.0"
] | null | null | null | tests/test_onnx_v2.py | Fcc-Roy/transformers | 0fe17f375a4f0fdd9aea260d0645ccfd4896e958 | [
"Apache-2.0"
] | null | null | null | tests/test_onnx_v2.py | Fcc-Roy/transformers | 0fe17f375a4f0fdd9aea260d0645ccfd4896e958 | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
from tempfile import NamedTemporaryFile
from unittest import TestCase
from unittest.mock import patch
from parameterized import parameterized
from transformers import AutoConfig, AutoTokenizer, is_torch_available
from transformers.onnx import (
EXTERNAL_DATA_FORMAT_SIZE_LIMIT,
OnnxConf... | 41.262357 | 119 | 0.686694 |
c54b0cb56af0ff40c2ef523746b702e6ea2ab4d3 | 476 | py | Python | distributed_run.py | semantic-multimedia-caddy/ImageCaptioning.pytorch | 085402901dafe9b169783d7ad2b30f95284c9a98 | [
"MIT"
] | null | null | null | distributed_run.py | semantic-multimedia-caddy/ImageCaptioning.pytorch | 085402901dafe9b169783d7ad2b30f95284c9a98 | [
"MIT"
] | null | null | null | distributed_run.py | semantic-multimedia-caddy/ImageCaptioning.pytorch | 085402901dafe9b169783d7ad2b30f95284c9a98 | [
"MIT"
] | null | null | null | import argparse
import torch
import time
from torch import multiprocessing as mp
import captioning.utils.opts as opts
from distributed_utils import setup, cleanup
from train_distributed import train
def run():
opt = opts.parse_opt()
# mp.spawn(train, args=(opt, opt.world_size), nprocs=1, join=True)
now =... | 20.695652 | 70 | 0.682773 |
d74f5c890d947990b760a9958b529d98e0c9191f | 998 | py | Python | gopatch/packages/urls.py | porala/python | 41213189a9b35b5b8c40c048f4d6cd3f8e5f25f4 | [
"DOC"
] | 1 | 2020-01-15T11:04:16.000Z | 2020-01-15T11:04:16.000Z | gopatch/packages/urls.py | porala/python | 41213189a9b35b5b8c40c048f4d6cd3f8e5f25f4 | [
"DOC"
] | 2 | 2021-03-31T19:36:19.000Z | 2021-06-10T22:29:26.000Z | gopatch/packages/urls.py | porala/python | 41213189a9b35b5b8c40c048f4d6cd3f8e5f25f4 | [
"DOC"
] | null | null | null | # Copyright 2012 VPAC, http://www.vpac.org
# Copyright 2013-2016 Marcus Furlong <furlongm@gmail.com>
#
# This file is part of Patchman.
#
# Patchman is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 on... | 32.193548 | 70 | 0.741483 |
b3f8a077b8e6766b6f0d083703698f48f2e1e6f9 | 5,849 | py | Python | saminda/cipres-airavata/sdk/scripts/remote_resource/trestles/gordon_submit_v2.py | SciGaP/DEPRECATED-Cipres-Airavata-POC | a2f3dce75ce6c8e23c8cdde14ece708b5a0ad4ab | [
"Apache-2.0"
] | null | null | null | saminda/cipres-airavata/sdk/scripts/remote_resource/trestles/gordon_submit_v2.py | SciGaP/DEPRECATED-Cipres-Airavata-POC | a2f3dce75ce6c8e23c8cdde14ece708b5a0ad4ab | [
"Apache-2.0"
] | null | null | null | saminda/cipres-airavata/sdk/scripts/remote_resource/trestles/gordon_submit_v2.py | SciGaP/DEPRECATED-Cipres-Airavata-POC | a2f3dce75ce6c8e23c8cdde14ece708b5a0ad4ab | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import gordon_lib_v2 as lib
import sys
import os
def main(argv=None):
"""
Usage is:
submit.py [--account <chargecode>] [--url <url>] -- <commandline>
Run from the working dir of the job which must contain (in addition
to the job files) a file named scheduler.conf with schedul... | 32.675978 | 174 | 0.672252 |
e9a7c425c6d96042020e87b132d5731f717cffe6 | 6,532 | py | Python | spinup/my_env/rtd/grid_mdp_v1.py | muzi2018/DRL_RTD | 518100c4c48f66fd38ef9877f3e4903c9cc2a237 | [
"MIT"
] | null | null | null | spinup/my_env/rtd/grid_mdp_v1.py | muzi2018/DRL_RTD | 518100c4c48f66fd38ef9877f3e4903c9cc2a237 | [
"MIT"
] | null | null | null | spinup/my_env/rtd/grid_mdp_v1.py | muzi2018/DRL_RTD | 518100c4c48f66fd38ef9877f3e4903c9cc2a237 | [
"MIT"
] | null | null | null | import logging
import random
import gym
logger = logging.getLogger(__name__)
class GridEnv1(gym.Env):
metadata = {
'render.modes': ['human', 'rgb_array'],
'video.frames_per_second': 2
}
def __init__(self):
self.states = range(1,17) #状态空间
self.x=[150,250,350,450] * 4
... | 30.523364 | 83 | 0.535977 |
2f9d794d55aee981a0585b3d8653978dfe907f2e | 3,296 | py | Python | lifelib/projects/solvency2/model/PV/__init__.py | fumitoh/lifelib | 01b6fec4453b309808c1c7ca6867c7dce50668dc | [
"MIT"
] | 77 | 2018-03-02T05:21:43.000Z | 2022-03-26T20:29:59.000Z | lifelib/projects/solvency2/model/PV/__init__.py | dayeoni-1376/lifelib | e65ba42843e8ae5f00ea795a8bb29ccd6e99ba54 | [
"MIT"
] | 10 | 2018-02-17T03:07:20.000Z | 2021-11-15T13:40:15.000Z | lifelib/projects/solvency2/model/PV/__init__.py | dayeoni-1376/lifelib | e65ba42843e8ae5f00ea795a8bb29ccd6e99ba54 | [
"MIT"
] | 24 | 2018-03-12T20:01:06.000Z | 2022-03-07T06:06:18.000Z | """Present Value mix-in Space
This Space serves as a base Space for :mod:`~model.simplelife.Projection`
Space, and it contains Cells to take the present value of projected cashflows.
.. blockdiag::
blockdiag {
default_node_color="#D5E8D4";
default_linecolor="#628E47";
BaseProj[style=dotted]
Ba... | 22.888889 | 78 | 0.583738 |
0f8ed425472f6cd48fcd9945072e112ebb52c762 | 1,001 | py | Python | d2lbook/rst_test.py | AnirudhDagar/d2l-book | c168ec5b4a1a8b440f8bf79bb2a588d3c28c40f5 | [
"Apache-2.0"
] | 115 | 2019-04-20T01:10:40.000Z | 2022-03-23T21:19:53.000Z | d2lbook/rst_test.py | AnirudhDagar/d2l-book | c168ec5b4a1a8b440f8bf79bb2a588d3c28c40f5 | [
"Apache-2.0"
] | 21 | 2019-07-26T12:35:48.000Z | 2022-03-31T08:39:32.000Z | d2lbook/rst_test.py | AnirudhDagar/d2l-book | c168ec5b4a1a8b440f8bf79bb2a588d3c28c40f5 | [
"Apache-2.0"
] | 63 | 2019-04-20T17:12:03.000Z | 2022-03-14T15:01:36.000Z | from d2lbook import notebook
from d2lbook import rst
import unittest
import nbconvert
_markdown_src = r'''
# Test
:label:`test`
first para
python is good
another para
This is :eqref:`sec_1`
```python2
1+2+3
```
python3 is better
- here
- haha
```{.input .python}
1+2+3
```
```{.input .python}
#@tab python2
1+... | 12.5125 | 67 | 0.6004 |
a21f5d252f714a953a47e269efe996a05bd36d5e | 23,404 | py | Python | typeclasses/accounts.py | dvoraen/arxcode | a89f2004fca10e0b1f1995c2420dd3ffbf08774b | [
"MIT"
] | 42 | 2018-08-12T00:55:24.000Z | 2021-12-24T15:16:08.000Z | typeclasses/accounts.py | dvoraen/arxcode | a89f2004fca10e0b1f1995c2420dd3ffbf08774b | [
"MIT"
] | 312 | 2018-10-22T23:03:27.000Z | 2022-02-06T13:02:58.000Z | typeclasses/accounts.py | dvoraen/arxcode | a89f2004fca10e0b1f1995c2420dd3ffbf08774b | [
"MIT"
] | 42 | 2018-08-12T00:41:48.000Z | 2022-01-27T14:03:16.000Z | """
Player
The Player represents the game "account" and each login has only one
Player object. A Player is what chats on default channels but has no
other in-game-world existance. Rather the Player puppets Objects (such
as Characters) in order to actually participate in the game world.
Guest
Guest players are simpl... | 33.820809 | 115 | 0.596009 |
2da3a022d1cb591baa7975a8c0ce369b245c0eed | 2,338 | py | Python | app/consumer/consumer.py | guhuajun/rabbitmq-ha-demo | 4fd31d9eaf769c7179360c268c3888af28801219 | [
"MIT"
] | null | null | null | app/consumer/consumer.py | guhuajun/rabbitmq-ha-demo | 4fd31d9eaf769c7179360c268c3888af28801219 | [
"MIT"
] | null | null | null | app/consumer/consumer.py | guhuajun/rabbitmq-ha-demo | 4fd31d9eaf769c7179360c268c3888af28801219 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# pylint: disable=
# Ref: https://pika.readthedocs.io/en/stable/examples/blocking_consume_recover_multiple_hosts.html
import re
import random
import os
import logging
import time
from datetime import datetime
import pika
from retry import retry
if __name__ == "__main__":
# change loggin... | 34.382353 | 132 | 0.652267 |
a6019e9806260fce7b6c50516d7de9e96e238718 | 4,568 | py | Python | patchsim_experiment/new_exp/91_exp/pylib/tracer.py | poracle100/poracle-experiments | 2582e7a0b0380bac810d49a75eb33f7a0626d6d8 | [
"Apache-2.0"
] | null | null | null | patchsim_experiment/new_exp/91_exp/pylib/tracer.py | poracle100/poracle-experiments | 2582e7a0b0380bac810d49a75eb33f7a0626d6d8 | [
"Apache-2.0"
] | null | null | null | patchsim_experiment/new_exp/91_exp/pylib/tracer.py | poracle100/poracle-experiments | 2582e7a0b0380bac810d49a75eb33f7a0626d6d8 | [
"Apache-2.0"
] | 2 | 2021-03-29T08:13:34.000Z | 2021-04-23T08:51:18.000Z | import time
import os
from unidiff import PatchSet
btrace_home=os.path.abspath("./lib/btrace")
def extract_trace(src,tgt,start,end):
s=''
f=open(src)
for line in f:
if line.startswith('---'):
cur=line.strip().split(':')[1]
cur=int(cur)
if cur>=start and cur<=end... | 41.908257 | 169 | 0.635508 |
e566b81eb31b83ccd21721f17d0cf94440b9df6f | 6,831 | py | Python | utils.py | duxinkang/WS-DAN.PyTorch | 87779124f619ceeb445ddfb0246c8a22ff324db4 | [
"MIT"
] | 1 | 2021-12-14T01:05:19.000Z | 2021-12-14T01:05:19.000Z | utils.py | duxinkang/WS-DAN.PyTorch | 87779124f619ceeb445ddfb0246c8a22ff324db4 | [
"MIT"
] | null | null | null | utils.py | duxinkang/WS-DAN.PyTorch | 87779124f619ceeb445ddfb0246c8a22ff324db4 | [
"MIT"
] | null | null | null | """Utils
Created: Nov 11,2019 - Yuchong Gu
Revised: Dec 03,2019 - Yuchong Gu
"""
import torch
import random
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
import torchvision.transforms as transforms
##############################################
# Center Loss for Attention Regularization
###... | 33.160194 | 121 | 0.556141 |
b4679889ff7ee1000ac255d7caaccac85ff1f4b0 | 442 | py | Python | flask_app.py | hbradleyiii/spa-base | ac79535d63778dc0793b1e2d7ecac5547927798d | [
"MIT"
] | null | null | null | flask_app.py | hbradleyiii/spa-base | ac79535d63778dc0793b1e2d7ecac5547927798d | [
"MIT"
] | null | null | null | flask_app.py | hbradleyiii/spa-base | ac79535d63778dc0793b1e2d7ecac5547927798d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
flask_app.py
~~~~~~~~~~~~~~
The app entry point for `flask` commands.
"""
from app import cli, create_app
from app.models import db, Email, User
app = create_app()
cli.init_app(app)
@app.shell_context_processor
def make_shell_context():
"""Shell context for the command line environ... | 17 | 57 | 0.604072 |
3ed8975aaf940fecd400cc9ead705172473b0467 | 7,565 | py | Python | tests/infer/mcmc/test_nuts.py | mashrikt/pyro | 144771db63d5f72e2fec6f5a6d866f1f153e7b80 | [
"MIT"
] | null | null | null | tests/infer/mcmc/test_nuts.py | mashrikt/pyro | 144771db63d5f72e2fec6f5a6d866f1f153e7b80 | [
"MIT"
] | null | null | null | tests/infer/mcmc/test_nuts.py | mashrikt/pyro | 144771db63d5f72e2fec6f5a6d866f1f153e7b80 | [
"MIT"
] | 1 | 2018-10-02T18:50:33.000Z | 2018-10-02T18:50:33.000Z | from __future__ import absolute_import, division, print_function
import logging
import os
import pytest
import torch
import pyro
import pyro.distributions as dist
from pyro.infer import EmpiricalMarginal
from pyro.infer.mcmc.mcmc import MCMC
from pyro.infer.mcmc.nuts import NUTS
from tests.common import assert_equal... | 41.565934 | 104 | 0.669795 |
7d8fecaa80a91efc168185ee6eca487ee376086c | 291 | py | Python | bookContent/bookContent/pipelines.py | hello-chenchen/ebook_scrapy | c64e845c8054e60ecfedeb097b4024bcd575cd1b | [
"MIT"
] | null | null | null | bookContent/bookContent/pipelines.py | hello-chenchen/ebook_scrapy | c64e845c8054e60ecfedeb097b4024bcd575cd1b | [
"MIT"
] | null | null | null | bookContent/bookContent/pipelines.py | hello-chenchen/ebook_scrapy | c64e845c8054e60ecfedeb097b4024bcd575cd1b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
class BookcontentPipeline(object):
def process_item(self, item, spider):
return item
| 24.25 | 65 | 0.714777 |
3921a3534e66b4c61a3f9b63a505d607bf74c412 | 6,028 | py | Python | changes/api/project_commit_index.py | bowlofstew/changes | ebd393520e0fdb07c240a8d4e8747281b6186e28 | [
"Apache-2.0"
] | null | null | null | changes/api/project_commit_index.py | bowlofstew/changes | ebd393520e0fdb07c240a8d4e8747281b6186e28 | [
"Apache-2.0"
] | null | null | null | changes/api/project_commit_index.py | bowlofstew/changes | ebd393520e0fdb07c240a8d4e8747281b6186e28 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import, division, unicode_literals
import itertools
from collections import defaultdict
from flask.ext.restful import reqparse
from sqlalchemy.orm import joinedload, contains_eager
from changes.api.base import APIView, error
from changes.config import db
from changes.constants import ... | 36.533333 | 87 | 0.593729 |
6378ed0590c564f04b180a319cdd0a520944cbf9 | 10,069 | py | Python | modules/tools/navigation/simulator/navigation_view_backend.py | BaiduXLab/apollo | 2764e934b6d0da1342be781447348288ac84c5e9 | [
"Apache-2.0"
] | 22 | 2018-10-10T14:46:32.000Z | 2022-02-28T12:43:43.000Z | modules/tools/navigation/simulator/navigation_view_backend.py | BaiduXLab/apollo | 2764e934b6d0da1342be781447348288ac84c5e9 | [
"Apache-2.0"
] | 5 | 2020-06-13T00:36:33.000Z | 2022-02-10T17:50:43.000Z | modules/tools/navigation/simulator/navigation_view_backend.py | BaiduXLab/apollo | 2764e934b6d0da1342be781447348288ac84c5e9 | [
"Apache-2.0"
] | 12 | 2018-12-24T02:17:19.000Z | 2021-12-06T01:54:09.000Z | #!/usr/bin/env python
###############################################################################
# Copyright 2017 The Apollo 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 ... | 34.248299 | 84 | 0.637402 |
e3326ca8d7b7f34946af23656578298378330c65 | 1,627 | py | Python | intro/part03-08_string_multiplied/test/test_string_multiplied.py | Hannah-Abi/python-pro-21 | 2ce32c4bf118054329d19afdf83c50561be1ada8 | [
"MIT"
] | null | null | null | intro/part03-08_string_multiplied/test/test_string_multiplied.py | Hannah-Abi/python-pro-21 | 2ce32c4bf118054329d19afdf83c50561be1ada8 | [
"MIT"
] | null | null | null | intro/part03-08_string_multiplied/test/test_string_multiplied.py | Hannah-Abi/python-pro-21 | 2ce32c4bf118054329d19afdf83c50561be1ada8 | [
"MIT"
] | null | null | null | import unittest
from unittest.mock import patch
from tmc import points
from tmc.utils import load_module, reload_module, get_stdout
from functools import reduce
from random import randint
exercise = 'src.string_multiplied'
def format_tuple(d : tuple):
return str(d).replace("'","")
@points('2.string_multiplied')... | 43.972973 | 197 | 0.634911 |
813468b63734c3dcd1e63f0b36eab73e3210827f | 1,251 | py | Python | .mywaflib/waflib/Tools/gdc.py | nkuhlen/log-transform-kernel-density | 377e9196b95cfdc2d53db50796a030eb5d0f019a | [
"BSD-3-Clause"
] | null | null | null | .mywaflib/waflib/Tools/gdc.py | nkuhlen/log-transform-kernel-density | 377e9196b95cfdc2d53db50796a030eb5d0f019a | [
"BSD-3-Clause"
] | null | null | null | .mywaflib/waflib/Tools/gdc.py | nkuhlen/log-transform-kernel-density | 377e9196b95cfdc2d53db50796a030eb5d0f019a | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
# Carlos Rafael Giani, 2007 (dv)
from waflib.Tools import ar, d
from waflib.Configure import conf
@conf
def find_gdc(conf):
"""
Find the program gdc and set the variable *D*
"""
conf.find_program('gdc', var='D')
out = conf.cmd_and_log(conf.env.D + ['--version'])
if out.f... | 20.85 | 58 | 0.580336 |
ca4e4807abed2c0d84900a691560c8d54eaa62e7 | 7,309 | py | Python | examples/pwr_run/checkpointing/throughput/random/job38.py | boringlee24/keras_old | 1e1176c45c4952ba1b9b9e58e9cc4df027ab111d | [
"MIT"
] | null | null | null | examples/pwr_run/checkpointing/throughput/random/job38.py | boringlee24/keras_old | 1e1176c45c4952ba1b9b9e58e9cc4df027ab111d | [
"MIT"
] | null | null | null | examples/pwr_run/checkpointing/throughput/random/job38.py | boringlee24/keras_old | 1e1176c45c4952ba1b9b9e58e9cc4df027ab111d | [
"MIT"
] | null | null | null | """
#Trains a ResNet on the CIFAR10 dataset.
"""
from __future__ import print_function
import keras
from keras.layers import Dense, Conv2D, BatchNormalization, Activation
from keras.layers import AveragePooling2D, Input, Flatten
from keras.optimizers import Adam
from keras.callbacks import ModelCheckpoint, LearningRa... | 32.057018 | 118 | 0.692024 |
3318840eabfecd85eec607be21c142b208c94e01 | 2,199 | py | Python | text_models/text_manipulator.py | TheLampshady/cnn_text | 009fce83335550255e63baf9b579a42cce3f5eb6 | [
"MIT"
] | null | null | null | text_models/text_manipulator.py | TheLampshady/cnn_text | 009fce83335550255e63baf9b579a42cce3f5eb6 | [
"MIT"
] | null | null | null | text_models/text_manipulator.py | TheLampshady/cnn_text | 009fce83335550255e63baf9b579a42cce3f5eb6 | [
"MIT"
] | null | null | null | from collections import Counter
import numpy as np
class TextClassifier(object):
def __init__(self, train_data, train_target, test_data, test_target, batch_size=10):
self.train_data = train_data
self.train_target = train_target
self.test_data = test_data
self.test_target = test_ta... | 27.148148 | 88 | 0.552069 |
bd0f92e0d759204b33b6cb9b261531d61134605e | 2,018 | py | Python | ppocr/metrics/rec_metric.py | vinhtq115/PaddleOCR | 5730d5cd48b38b163ff06d0f3c57da5991aa9448 | [
"Apache-2.0"
] | 5 | 2021-01-19T13:27:31.000Z | 2021-01-27T12:55:23.000Z | ppocr/metrics/rec_metric.py | happy0709/PaddleOCR | c3e5522c38fb42ad721de2bae40425589f48b646 | [
"Apache-2.0"
] | 1 | 2021-02-24T05:24:32.000Z | 2021-03-15T06:45:34.000Z | ppocr/metrics/rec_metric.py | happy0709/PaddleOCR | c3e5522c38fb42ad721de2bae40425589f48b646 | [
"Apache-2.0"
] | null | null | null | # copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# 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... | 33.633333 | 74 | 0.604559 |
b9050089219f9433948dcbed98a4f3150a6666b1 | 18,060 | py | Python | pytorch3d/transforms/rotation_conversions.py | Len-Li/pytorch3d | 95029e7a1211904814b3919cf12fe9d1952fb415 | [
"BSD-3-Clause"
] | 1 | 2021-06-30T14:10:26.000Z | 2021-06-30T14:10:26.000Z | pytorch3d/transforms/rotation_conversions.py | Len-Li/pytorch3d | 95029e7a1211904814b3919cf12fe9d1952fb415 | [
"BSD-3-Clause"
] | null | null | null | pytorch3d/transforms/rotation_conversions.py | Len-Li/pytorch3d | 95029e7a1211904814b3919cf12fe9d1952fb415 | [
"BSD-3-Clause"
] | 1 | 2021-07-29T12:11:44.000Z | 2021-07-29T12:11:44.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
import functools
from typing import Optional
import torch
import torch.nn.functional as F
"""
The transformation matrices returned from the functions in this file assume
the points on which the transformation will be applied are column vectors.... | 32.77677 | 84 | 0.616888 |
b99025d0c1e26503cbaedec76f05e38dd6015d81 | 5,435 | py | Python | sknano/core/geometric_regions/tests/test_funcs.py | haidi-ustc/scikit-nano | ef9b24165ba37918b3f520657f7311ba139b3e7d | [
"BSD-2-Clause"
] | 21 | 2016-06-08T18:27:20.000Z | 2022-03-22T08:27:46.000Z | sknano/core/geometric_regions/tests/test_funcs.py | haidi-ustc/scikit-nano | ef9b24165ba37918b3f520657f7311ba139b3e7d | [
"BSD-2-Clause"
] | 8 | 2016-06-24T19:45:58.000Z | 2021-03-25T21:42:29.000Z | sknano/core/geometric_regions/tests/test_funcs.py | scikit-nano/scikit-nano | ef9b24165ba37918b3f520657f7311ba139b3e7d | [
"BSD-2-Clause"
] | 9 | 2016-12-08T16:35:52.000Z | 2021-06-23T17:13:44.000Z | #! /usr/bin/env python
from __future__ import absolute_import, division, print_function
from __future__ import unicode_literals
import nose
from nose.tools import assert_true, assert_equal
import numpy as np
from sknano.core.geometric_regions import Parallelepiped, Cuboid, \
generate_bounding_box
from sknano.cor... | 39.384058 | 73 | 0.663661 |
6d71245abad56aa70c5eab855c9d89b7180222d4 | 4,497 | py | Python | creational/prototype.py | prateeksan/python-design-patterns | f9c6fc3501a5a2c8467980aaf1ba7a9839bf07cf | [
"MIT"
] | 61 | 2017-06-07T22:48:38.000Z | 2022-02-25T01:06:37.000Z | creational/prototype.py | smohant/python-design-patterns | f9c6fc3501a5a2c8467980aaf1ba7a9839bf07cf | [
"MIT"
] | 2 | 2017-06-25T21:08:58.000Z | 2021-04-20T00:41:49.000Z | creational/prototype.py | smohant/python-design-patterns | f9c6fc3501a5a2c8467980aaf1ba7a9839bf07cf | [
"MIT"
] | 12 | 2017-06-08T15:34:52.000Z | 2022-02-24T09:01:05.000Z | """ The Prototye Pattern
Notes:
In the prototype pattern, rather than creating new instances of an object, only
one instance (the breeder) of a class (the prototype) is created and deep-copied
whenever the need arises. This pattern is particularly useful when:
+ The cost of initialization is high.
+ Many objects of ... | 35.409449 | 81 | 0.694241 |
d1617d5baab296e71473be3f044cc115998be9b0 | 15,159 | py | Python | ircodec/command.py | kentwait/ircodec | 9558e33475b964b10cedf592b7a4cf2b65456c5a | [
"MIT"
] | 9 | 2019-12-06T06:58:55.000Z | 2021-06-10T21:06:22.000Z | ircodec/command.py | kentwait/ircodec | 9558e33475b964b10cedf592b7a4cf2b65456c5a | [
"MIT"
] | 1 | 2020-05-20T09:08:26.000Z | 2020-05-21T12:47:55.000Z | ircodec/command.py | kentwait/ircodec | 9558e33475b964b10cedf592b7a4cf2b65456c5a | [
"MIT"
] | 1 | 2021-03-07T16:49:07.000Z | 2021-03-07T16:49:07.000Z | """
IR command class and functions
"""
import time
import json
import pigpio
from ircodec.signal import Pulse, Gap, PulseClass, GapClass
from ircodec.signal import group_signals
from ircodec.utils import carrier_square_wave_generator
class Command(object):
"""Represents an IR command
"""
def __init__(self... | 34.768349 | 120 | 0.588825 |
267242d3cae02fedebcdd5ff2b7c45a5f3ac8913 | 1,198 | py | Python | Triggering-Lambda-from-SQS/send_message.py | Kunal-Karnik/content-lambda-boto3 | 0bde85c1bc036c8000505ff9969be5f7666a12c2 | [
"MIT"
] | null | null | null | Triggering-Lambda-from-SQS/send_message.py | Kunal-Karnik/content-lambda-boto3 | 0bde85c1bc036c8000505ff9969be5f7666a12c2 | [
"MIT"
] | null | null | null | Triggering-Lambda-from-SQS/send_message.py | Kunal-Karnik/content-lambda-boto3 | 0bde85c1bc036c8000505ff9969be5f7666a12c2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3.7
# -*- coding: utf-8 -*-
import argparse
import logging
import sys
from time import sleep
import boto3
from faker import Faker
parser = argparse.ArgumentParser()
parser.add_argument("--queue-name", "-q", required=True,
help="SQS queue name")
parser.add_argument("--interval"... | 24.44898 | 62 | 0.656093 |
45b04d72707911e508ba26b2d4d0baf7005311df | 348 | py | Python | stu_manage/views.py | DreamingNight/Student-Manage-System | 62245500e080318328b822a21b01db5b77b56685 | [
"MIT"
] | 1 | 2020-09-02T07:33:09.000Z | 2020-09-02T07:33:09.000Z | stu_manage/views.py | DreamingNight/Student-Manalyze-System | 62245500e080318328b822a21b01db5b77b56685 | [
"MIT"
] | null | null | null | stu_manage/views.py | DreamingNight/Student-Manalyze-System | 62245500e080318328b822a21b01db5b77b56685 | [
"MIT"
] | 1 | 2020-09-02T07:22:20.000Z | 2020-09-02T07:22:20.000Z | from django.shortcuts import render
# Create your views here.
from .models import Student
def index(request):
# 主页
return render(request, 'stu_manage/index.html')
def students(request):
# 显示学生名单
stu = Student.objects.order_by('stu_id')
context = {'stu': stu}
return render(request, 'stu_mana... | 20.470588 | 63 | 0.701149 |
f8e98854a12123438e63e6fd87a44801cfc5c9a1 | 6,475 | py | Python | py-polars/polars/datatypes.py | LemonPy29/polars | 381fe0205cab64c88b985bb0fe50b566f7bf7c82 | [
"MIT"
] | 1 | 2022-01-13T15:49:06.000Z | 2022-01-13T15:49:06.000Z | py-polars/polars/datatypes.py | bfeif/polars | 062172166e4b9e05a51fa29208990ee4ddb21272 | [
"MIT"
] | null | null | null | py-polars/polars/datatypes.py | bfeif/polars | 062172166e4b9e05a51fa29208990ee4ddb21272 | [
"MIT"
] | 1 | 2021-10-12T12:19:37.000Z | 2021-10-12T12:19:37.000Z | import ctypes
import typing as tp
from typing import Any, Callable, Dict, Sequence, Type
import numpy as np
import pyarrow as pa
from _ctypes import _SimpleCData
try:
from polars.polars import PySeries
_DOCUMENTING = False
except ImportError:
_DOCUMENTING = True
__all__ = [
"DataType",
"Int8",
... | 19.156805 | 82 | 0.632278 |
4ac73c76dc0d57811e09f4d041d3eafa9c529b7d | 9,288 | py | Python | tools/deploy/export_model.py | mmabrouk/detectron2 | 158e395acdb8ca6ed6d488b43475f9ef9d200405 | [
"Apache-2.0"
] | 99 | 2022-03-22T23:54:57.000Z | 2022-03-31T17:05:37.000Z | tools/deploy/export_model.py | mmabrouk/detectron2 | 158e395acdb8ca6ed6d488b43475f9ef9d200405 | [
"Apache-2.0"
] | 3 | 2022-03-23T03:53:16.000Z | 2022-03-26T11:00:55.000Z | tools/deploy/export_model.py | mmabrouk/detectron2 | 158e395acdb8ca6ed6d488b43475f9ef9d200405 | [
"Apache-2.0"
] | 6 | 2022-03-25T02:26:06.000Z | 2022-03-31T02:17:53.000Z | #!/usr/bin/env python
# Copyright (c) Facebook, Inc. and its affiliates.
import argparse
import os
from typing import Dict, List, Tuple
import torch
from torch import Tensor, nn
import detectron2.data.transforms as T
from detectron2.checkpoint import DetectionCheckpointer
from detectron2.config import get_cfg
from det... | 38.539419 | 97 | 0.685078 |
ed7fe4bf9410e742a417aa55671e662fdb02ecdb | 8,427 | py | Python | StockCluster.py | ruthgoon/StockRanker | bd5be3ce0964296684bdd37ed768898f0283b794 | [
"MIT"
] | null | null | null | StockCluster.py | ruthgoon/StockRanker | bd5be3ce0964296684bdd37ed768898f0283b794 | [
"MIT"
] | null | null | null | StockCluster.py | ruthgoon/StockRanker | bd5be3ce0964296684bdd37ed768898f0283b794 | [
"MIT"
] | 1 | 2021-09-28T23:03:10.000Z | 2021-09-28T23:03:10.000Z | from numpy.lib.arraysetops import isin
from numpy.lib.index_tricks import nd_grid
from sklearn.cluster import DBSCAN
from sklearn.neighbors import NearestNeighbors
from kneebow.rotor import Rotor
import numpy as np
import datetime
class StockCluster():
def __init__(self, cluster_input=False):
"""
... | 38.655963 | 114 | 0.540762 |
949dee42503a9e1799008b467c997a46b85268d6 | 345 | py | Python | dev/Gems/Blast/houdini/python2.7libs/blastExport/lib/fbxSdk/__init__.py | brianherrera/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | [
"AML"
] | 1,738 | 2017-09-21T10:59:12.000Z | 2022-03-31T21:05:46.000Z | dev/Gems/Blast/houdini/python2.7libs/blastExport/lib/fbxSdk/__init__.py | ArchitectureStudios/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | [
"AML"
] | 427 | 2017-09-29T22:54:36.000Z | 2022-02-15T19:26:50.000Z | dev/Gems/Blast/houdini/python2.7libs/blastExport/lib/fbxSdk/__init__.py | ArchitectureStudios/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | [
"AML"
] | 671 | 2017-09-21T08:04:01.000Z | 2022-03-29T14:30:07.000Z | import sys
import os
print('Fbx imported from application %s using the %s interpreter' % (sys.executable, sys.version))
__bitDepth = 'win64'
__pythonVersion = sys.winver.replace('.', '')
__thisDirectory = os.path.dirname(__file__).replace('\\', '/')
__pydPath = '%s/sdk_2018_%s' % (__thisDirectory, __pythonVersion)
sy... | 31.363636 | 98 | 0.733333 |
62b2295e26a7d3b392cb4d1a89e5f4549b284178 | 2,107 | py | Python | pi/rc_control.py | w84264423/raspi-driving-car | a291d33a68315921d589de3b5c502040118faf2e | [
"MIT"
] | 44 | 2017-04-04T13:14:57.000Z | 2021-12-03T16:36:00.000Z | pi/rc_control.py | w84264423/raspi-driving-car | a291d33a68315921d589de3b5c502040118faf2e | [
"MIT"
] | 3 | 2018-11-08T18:30:46.000Z | 2020-03-20T00:33:41.000Z | pi/rc_control.py | w84264423/raspi-driving-car | a291d33a68315921d589de3b5c502040118faf2e | [
"MIT"
] | 18 | 2017-12-06T23:45:02.000Z | 2020-04-01T14:57:08.000Z | import socket
# from rpiGPIO import *
import RPi.GPIO as GPIO
import time
left = 13
right = 15
forward = 11
reverse = 7
t = 0.03
GPIO.setmode(GPIO.BOARD) # Numbers pins by physical location
GPIO.setup(left, GPIO.OUT)
GPIO.output(left, GPIO.HIGH)
GPIO.setup(right, GPIO.OUT)
GPIO.output(right, GPIO.HIGH)
GPIO.s... | 19.154545 | 63 | 0.578073 |
164eb4ab279abef27824b9af3a5304281d36b82a | 18,773 | py | Python | dace/codegen/tools/type_inference.py | noah95/dace | 7d5f28d210b2db3fdb112030d5f2b0be0540384b | [
"BSD-3-Clause"
] | null | null | null | dace/codegen/tools/type_inference.py | noah95/dace | 7d5f28d210b2db3fdb112030d5f2b0be0540384b | [
"BSD-3-Clause"
] | null | null | null | dace/codegen/tools/type_inference.py | noah95/dace | 7d5f28d210b2db3fdb112030d5f2b0be0540384b | [
"BSD-3-Clause"
] | 1 | 2021-03-04T13:01:48.000Z | 2021-03-04T13:01:48.000Z | # Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
"""
Type inference: traverses code and returns types for all undefined symbols according to C semantics
infer() has a lenient implementation: if something it not inferred (for example an unsupported construct) it will not
return... | 30.525203 | 126 | 0.680126 |
f4692bad3ca86b0470ac848726f18bf09b057839 | 5,860 | py | Python | run_tests_resilience.py | cag-uconn/graphite_multiprog | fc89341c0681fe4d54ddc1dee0b9e110aad8b4be | [
"MIT"
] | null | null | null | run_tests_resilience.py | cag-uconn/graphite_multiprog | fc89341c0681fe4d54ddc1dee0b9e110aad8b4be | [
"MIT"
] | null | null | null | run_tests_resilience.py | cag-uconn/graphite_multiprog | fc89341c0681fe4d54ddc1dee0b9e110aad8b4be | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
import os
sys.path.append("./tools/")
from schedule import *
from config_64 import *
# job info
# Do not use 'localhost' or '127.0.0.1', use the machine name
machines = [
# "cag1",
"cag2",
# "cag3",
# "cag4",
# "cag5",
# "cag6",
# "cag7",
# "cag8",
]
r... | 35.95092 | 176 | 0.601195 |
9c22fa6cff535b5540c1108706a7e385d6f60d85 | 6,750 | py | Python | python/node.py | yds05238/Chord-DHT | de4ce5f2e81f4a4528b6e5f4d90559fd37ddfbff | [
"MIT"
] | null | null | null | python/node.py | yds05238/Chord-DHT | de4ce5f2e81f4a4528b6e5f4d90559fd37ddfbff | [
"MIT"
] | null | null | null | python/node.py | yds05238/Chord-DHT | de4ce5f2e81f4a4528b6e5f4d90559fd37ddfbff | [
"MIT"
] | null | null | null | import asyncio
from hashlib import sha1
from typing import Any
import logging
import rpc
from abcchord import INode, INodeServer
from errors import InvalidRPC, NodeLeaveError
from network import is_between_ids, ChordNetwork, CHORD_PORT, MAINTENANCE_FREQUENCY
# set up logger
logger = logging.getLogger()
handler = l... | 34.263959 | 98 | 0.643852 |
98c74c924d0210dec12cf6f37804b73bcf5e3349 | 312 | py | Python | mytools/test_gaussian.py | abcxs/polyrnn | 92eee689fe62585529deb1c44fbf1c889f414fa2 | [
"Apache-2.0"
] | 4 | 2021-06-01T08:33:56.000Z | 2022-02-12T14:54:09.000Z | mytools/test_gaussian.py | abcxs/polyrnn | 92eee689fe62585529deb1c44fbf1c889f414fa2 | [
"Apache-2.0"
] | null | null | null | mytools/test_gaussian.py | abcxs/polyrnn | 92eee689fe62585529deb1c44fbf1c889f414fa2 | [
"Apache-2.0"
] | 1 | 2021-06-01T08:34:00.000Z | 2021-06-01T08:34:00.000Z | # %%
import matplotlib.pyplot as plt
import torch
from mmdet.models.utils import gen_gaussian_target
img = torch.zeros(10, 10, dtype=torch.float32)
centers = [[0, 0], [3, 3], [7, 8]]
for center in centers:
img = gen_gaussian_target(img, center, 1)
img = img.numpy()
print(img)
plt.imshow(img)
plt.show
# %%
| 20.8 | 50 | 0.698718 |
8777493f6029f0c7a50460d927a75903eb90b76b | 94 | py | Python | hw3/hw3-code/python/test.py | zyhhhhhhh/cs446-machine-learning | b07cc86ca6630c7cab72e79a9e22f665dd71f809 | [
"MIT"
] | null | null | null | hw3/hw3-code/python/test.py | zyhhhhhhh/cs446-machine-learning | b07cc86ca6630c7cab72e79a9e22f665dd71f809 | [
"MIT"
] | null | null | null | hw3/hw3-code/python/test.py | zyhhhhhhh/cs446-machine-learning | b07cc86ca6630c7cab72e79a9e22f665dd71f809 | [
"MIT"
] | null | null | null | MAX = 2 ** 63 - 1
MIN = -2 ** 63
result = int((MAX-5)/10)+1
val = 5
print(result>(MAX-val)/10) | 18.8 | 26 | 0.553191 |
3708c714bd909f41d3c06cba89b0943422d339dd | 1,713 | py | Python | StarterApp/Main.py | jepierre/python_apps | ce3350480aed9c091bb92281d13711337b40b2dd | [
"MIT"
] | null | null | null | StarterApp/Main.py | jepierre/python_apps | ce3350480aed9c091bb92281d13711337b40b2dd | [
"MIT"
] | null | null | null | StarterApp/Main.py | jepierre/python_apps | ce3350480aed9c091bb92281d13711337b40b2dd | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Starter App
"""
import traceback
import termcolor
__appname__ = "Starter"
import logging
import os
import sys
from PyQt5 import uic
from PyQt5.QtWidgets import QApplication, QMainWindow
app_path = os.path.dirname(__file__)
app_log_path = os.path.join(app_path, "logs")
if not os.pat... | 22.84 | 103 | 0.657326 |
e74bb594a7e325139b95531ab84996df61cc8d83 | 4,180 | py | Python | deeppavlov/core/common/params.py | xbodx/DeepPavlov | 4b60bf162df4294b8b0db3b72786cdd699c674fa | [
"Apache-2.0"
] | 5,893 | 2018-02-01T18:13:20.000Z | 2022-03-31T19:22:21.000Z | deeppavlov/core/common/params.py | xbodx/DeepPavlov | 4b60bf162df4294b8b0db3b72786cdd699c674fa | [
"Apache-2.0"
] | 749 | 2018-01-31T11:36:02.000Z | 2022-03-30T07:24:22.000Z | deeppavlov/core/common/params.py | xbodx/DeepPavlov | 4b60bf162df4294b8b0db3b72786cdd699c674fa | [
"Apache-2.0"
] | 1,155 | 2018-02-01T10:52:15.000Z | 2022-03-29T02:12:15.000Z | # Copyright 2017 Neural Networks and Deep Learning lab, MIPT
#
# 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 applicab... | 34.545455 | 119 | 0.632536 |
c87aa162d56cb08501697c9f4840be3f6e8f1f10 | 820 | py | Python | get_prod_ipv4.py | ddiguy/dns-soa-check | 705d37803d6e61b906f6e71b1e0b299d488626c1 | [
"MIT"
] | null | null | null | get_prod_ipv4.py | ddiguy/dns-soa-check | 705d37803d6e61b906f6e71b1e0b299d488626c1 | [
"MIT"
] | null | null | null | get_prod_ipv4.py | ddiguy/dns-soa-check | 705d37803d6e61b906f6e71b1e0b299d488626c1 | [
"MIT"
] | null | null | null | #!/usr/local/bin/python3.6
import json
import requests
# Gets next available IP address in network using Infoblox REST API
# Ignoring SSL warnings
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
ib_prod_user = 'username'
ib... | 28.275862 | 124 | 0.753659 |
497302362f828795a82c1fa563e7e10a4561f3f8 | 56,119 | py | Python | ax/plot/scatter.py | mpolson64/Ax-1 | cf9e12cc1253efe0fc893f2620e99337e0927a26 | [
"MIT"
] | 1 | 2022-02-10T10:51:40.000Z | 2022-02-10T10:51:40.000Z | ax/plot/scatter.py | mpolson64/Ax-1 | cf9e12cc1253efe0fc893f2620e99337e0927a26 | [
"MIT"
] | null | null | null | ax/plot/scatter.py | mpolson64/Ax-1 | cf9e12cc1253efe0fc893f2620e99337e0927a26 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import numbers
import warnings
from collections import OrderedDict
from typing import Any, Callable, Dict, Iterable, ... | 34.878185 | 88 | 0.520555 |
fa77cbed1eed92dacd9aa7bb30fe2d387cd941d6 | 17,985 | py | Python | bob/db/swan/create.py | bioidiap/bob.db.swan | 676510d47cb08b65be04f51d45746127c36bf2ce | [
"BSD-3-Clause"
] | null | null | null | bob/db/swan/create.py | bioidiap/bob.db.swan | 676510d47cb08b65be04f51d45746127c36bf2ce | [
"BSD-3-Clause"
] | null | null | null | bob/db/swan/create.py | bioidiap/bob.db.swan | 676510d47cb08b65be04f51d45746127c36bf2ce | [
"BSD-3-Clause"
] | null | null | null | from os.path import join
import re
import pkg_resources
from bob.io.base import create_directories_safe
from .common import swan_file_metadata
def create_subparser(subparsers):
parser = subparsers.add_parser(
'create', help="Creates the PAD file lists of the dataset.")
parser.set_defaults(func=_create... | 45.075188 | 105 | 0.56208 |
32f4870fa68fb1669217869cecd13238035d7113 | 85,129 | py | Python | core/controllers/admin_test.py | queencai/oppia | c9a36db9c258588b04be9bc26f3d2efef7d21abc | [
"Apache-2.0"
] | null | null | null | core/controllers/admin_test.py | queencai/oppia | c9a36db9c258588b04be9bc26f3d2efef7d21abc | [
"Apache-2.0"
] | null | null | null | core/controllers/admin_test.py | queencai/oppia | c9a36db9c258588b04be9bc26f3d2efef7d21abc | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 The Oppia 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 applicable ... | 39.835751 | 114 | 0.646983 |
305ea83c120c251ef5dfaebf4eb25262b3accd29 | 29,232 | py | Python | numpyro/distributions/discrete.py | quattro/numpyro | b7b6e937297ea47c55760446134f84fc82936a9d | [
"Apache-2.0"
] | null | null | null | numpyro/distributions/discrete.py | quattro/numpyro | b7b6e937297ea47c55760446134f84fc82936a9d | [
"Apache-2.0"
] | null | null | null | numpyro/distributions/discrete.py | quattro/numpyro | b7b6e937297ea47c55760446134f84fc82936a9d | [
"Apache-2.0"
] | null | null | null | # Copyright Contributors to the Pyro project.
# SPDX-License-Identifier: Apache-2.0
# The implementation largely follows the design in PyTorch's `torch.distributions`
#
# Copyright (c) 2016- Facebook, Inc (Adam Paszke)
# Copyright (c) 2014- Facebook, Inc (Soumith Chintala)
# Copyright (c)... | 34.883055 | 108 | 0.663896 |
f0b4af9ec5e2b348dd2e62e3b3ab2d6b6991c3b4 | 255 | py | Python | scripts/slack_messages.py | nguyenanhtuan1008/Machine-Learning | 15eb109c0704f607af229d171aebe42ab84b9892 | [
"MIT"
] | null | null | null | scripts/slack_messages.py | nguyenanhtuan1008/Machine-Learning | 15eb109c0704f607af229d171aebe42ab84b9892 | [
"MIT"
] | null | null | null | scripts/slack_messages.py | nguyenanhtuan1008/Machine-Learning | 15eb109c0704f607af229d171aebe42ab84b9892 | [
"MIT"
] | null | null | null | import requests
import json
import os
data = {
"text": "hi, this is a test"
}
webhook = 'https://hooks.slack.com/services/6ZHCF86A/B011ATP3S2J/ycN6xM2SkxgN99WJ1Zv1y5Nm'
# webhook = os.getenv("webhook_slack")
requests.post(webhook, json.dumps(data)) | 21.25 | 90 | 0.741176 |
251ed4eee5877dfae9e88103f631b3150193af33 | 113 | py | Python | office365/sharepoint/webs/web_info_creation_information.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | 544 | 2016-08-04T17:10:16.000Z | 2022-03-31T07:17:20.000Z | office365/sharepoint/webs/web_info_creation_information.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | 438 | 2016-10-11T12:24:22.000Z | 2022-03-31T19:30:35.000Z | office365/sharepoint/webs/web_info_creation_information.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | 202 | 2016-08-22T19:29:40.000Z | 2022-03-30T20:26:15.000Z | from office365.runtime.client_value import ClientValue
class WebInfoCreationInformation(ClientValue):
pass
| 18.833333 | 54 | 0.840708 |
b08badc8d11ef2e437ea5b86c90c95e8aa253a36 | 3,971 | py | Python | grr/core/grr_response_core/lib/parsers/chrome_history_test.py | tsehori/grr | 048506f22f74642bfe61749069a45ddf496fdab3 | [
"Apache-2.0"
] | 1 | 2021-07-01T01:43:06.000Z | 2021-07-01T01:43:06.000Z | grr/core/grr_response_core/lib/parsers/chrome_history_test.py | tsehori/grr | 048506f22f74642bfe61749069a45ddf496fdab3 | [
"Apache-2.0"
] | 44 | 2021-05-14T22:49:24.000Z | 2022-03-13T21:54:02.000Z | grr/core/grr_response_core/lib/parsers/chrome_history_test.py | tsehori/grr | 048506f22f74642bfe61749069a45ddf496fdab3 | [
"Apache-2.0"
] | 1 | 2020-06-25T14:25:54.000Z | 2020-06-25T14:25:54.000Z | #!/usr/bin/env python
# Lint as: python3
# Copyright 2011 Google Inc. All Rights Reserved.
"""Tests for grr.parsers.chrome_history."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import datetime
import io
import os
from absl import app
from grr_resp... | 33.369748 | 79 | 0.691765 |
9d205fb63a1701f4ce7ec86a057723d55fc8bc28 | 2,571 | py | Python | django_markdown_newsletter/views.py | SamyMe/django-markdown-newsletter | 4b0ad63d703afcba4d561b6f69b761d0609d1ed9 | [
"MIT"
] | null | null | null | django_markdown_newsletter/views.py | SamyMe/django-markdown-newsletter | 4b0ad63d703afcba4d561b6f69b761d0609d1ed9 | [
"MIT"
] | null | null | null | django_markdown_newsletter/views.py | SamyMe/django-markdown-newsletter | 4b0ad63d703afcba4d561b6f69b761d0609d1ed9 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from .models import Subscribe
from .forms import NewsletterForm, SubscribeForm
import sendmail
from markdown import markdown
from django.http import HttpResponseRedirect
def newsletter(request):
if request.user.is_authenticated():
form=NewsletterForm(request.POST, request.FILES)
... | 27.351064 | 106 | 0.676391 |
32ec29844662439ceec0bc03eb5b3e2fe8755b06 | 5,090 | py | Python | src/azure-cli-core/azure/cli/core/commands/client_factory.py | henrypan/azure-cli | 8de0ab5216ed3dc700546ae9a3c485710322376b | [
"MIT"
] | null | null | null | src/azure-cli-core/azure/cli/core/commands/client_factory.py | henrypan/azure-cli | 8de0ab5216ed3dc700546ae9a3c485710322376b | [
"MIT"
] | 2 | 2021-03-25T21:38:56.000Z | 2021-11-15T17:46:45.000Z | src/azure-cli-core/azure/cli/core/commands/client_factory.py | Visual-Studio-China/azure-cli-int | 48c7c7f371a0ecc4ebfd4dcfdc72764beddf5c31 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 40.07874 | 130 | 0.684086 |
fe96be2a417e342d752008d8c7433f2deed77808 | 778 | py | Python | Pywikibot/category/category.py | Ketho/WowpediaDoc | 4c9388157f3311e1be4c4f8bc5983dd28ab171c4 | [
"MIT"
] | null | null | null | Pywikibot/category/category.py | Ketho/WowpediaDoc | 4c9388157f3311e1be4c4f8bc5983dd28ab171c4 | [
"MIT"
] | null | null | null | Pywikibot/category/category.py | Ketho/WowpediaDoc | 4c9388157f3311e1be4c4f8bc5983dd28ab171c4 | [
"MIT"
] | null | null | null | from importlib import util
import pywikibot
site = pywikibot.Site("en", "wowpedia")
def load_file_as_module(name, location):
spec = util.spec_from_file_location(name, location)
module = util.module_from_spec(spec)
spec.loader.exec_module(module)
return module
mod = load_file_as_module("mymodule", "wowpedia/categ... | 29.923077 | 79 | 0.732648 |
ca97813f702760b23eea59dfe38a3eed9f791e4a | 2,560 | py | Python | aliyun-python-sdk-mts/aliyunsdkmts/request/v20140618/UpdateMediaWorkflowTriggerModeRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-mts/aliyunsdkmts/request/v20140618/UpdateMediaWorkflowTriggerModeRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-mts/aliyunsdkmts/request/v20140618/UpdateMediaWorkflowTriggerModeRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.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... | 40 | 89 | 0.769531 |
9caa2f63b9650989f8037f646bb7080bffa6f1cf | 12,459 | py | Python | TA-zscaler-api/bin/input_module_zscaler_zpa_configurations.py | LetMeR00t/TA-zscaler-api | 9a2cee3954bf75a814bb057cf36eb2b2b4c093f6 | [
"MIT"
] | 4 | 2022-03-04T11:11:30.000Z | 2022-03-07T09:55:07.000Z | TA-zscaler-api/bin/input_module_zscaler_zpa_configurations.py | LetMeR00t/TA-zscaler-api | 9a2cee3954bf75a814bb057cf36eb2b2b4c093f6 | [
"MIT"
] | null | null | null | TA-zscaler-api/bin/input_module_zscaler_zpa_configurations.py | LetMeR00t/TA-zscaler-api | 9a2cee3954bf75a814bb057cf36eb2b2b4c093f6 | [
"MIT"
] | null | null | null |
# encoding = utf-8
import os
import sys
import time
import datetime
import json
import hashlib
# Import custom librairies
from pyzscaler import ZPA
import restfly
INPUT_UID = None
ZSCALER_INSTANCE = None
'''
IMPORTANT
Edit only the validate_input and collect_events functions.
Do not edit any other part... | 43.715789 | 175 | 0.658078 |
b8a1361d8282e0beae13093f3872a6a825a9219e | 460 | py | Python | baby_book/accounts/migrations/0009_auto_20201205_1509.py | Martin-Atanasov/Python_Web_Framework_Project | 2d37f9ab10fbaea40aa8ec4cd690dc24178389e3 | [
"MIT"
] | null | null | null | baby_book/accounts/migrations/0009_auto_20201205_1509.py | Martin-Atanasov/Python_Web_Framework_Project | 2d37f9ab10fbaea40aa8ec4cd690dc24178389e3 | [
"MIT"
] | null | null | null | baby_book/accounts/migrations/0009_auto_20201205_1509.py | Martin-Atanasov/Python_Web_Framework_Project | 2d37f9ab10fbaea40aa8ec4cd690dc24178389e3 | [
"MIT"
] | 1 | 2020-12-07T12:26:23.000Z | 2020-12-07T12:26:23.000Z | # Generated by Django 3.1.3 on 2020-12-05 15:09
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0008_auto_20201205_1502'),
]
operations = [
migrations.AlterField(
model_name='userprofile',
name='profi... | 24.210526 | 109 | 0.636957 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.