hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9f514a9af593f0be206ac89710f6f10e51760c0c | 1,112 | py | Python | BeautyWorld/urls.py | leoniknik/BeautyWorldDjango | 93c44cd7ebf283b663020f166ec7075ceeb070c8 | [
"MIT"
] | null | null | null | BeautyWorld/urls.py | leoniknik/BeautyWorldDjango | 93c44cd7ebf283b663020f166ec7075ceeb070c8 | [
"MIT"
] | null | null | null | BeautyWorld/urls.py | leoniknik/BeautyWorldDjango | 93c44cd7ebf283b663020f166ec7075ceeb070c8 | [
"MIT"
] | null | null | null | from django.conf.urls import url, include
from BeautyWorld.views import api_category, sign_up, sign_in, api_salon, api_cart, api_orders, api_offers, api_choose_offer,api_create_order, getfile, login
urlpatterns = [
#url(r'^signin$', signin), # POST
#url(r'^signup$', signup), # POST
#url(r'^edit_user$', ed... | 48.347826 | 156 | 0.667266 |
8ed93dbd35c78800f001b35ce84682de3169c04f | 1,126 | py | Python | examples/vedirect_mqtt.py | NickNothom/vedirect | 9219b75d18640b2bd7e5bbe5ab1df3cb21e8d89f | [
"MIT"
] | 59 | 2016-06-14T18:03:07.000Z | 2022-03-26T10:25:33.000Z | examples/vedirect_mqtt.py | NickNothom/vedirect | 9219b75d18640b2bd7e5bbe5ab1df3cb21e8d89f | [
"MIT"
] | 8 | 2019-01-19T21:11:07.000Z | 2022-03-28T20:17:54.000Z | examples/vedirect_mqtt.py | NickNothom/vedirect | 9219b75d18640b2bd7e5bbe5ab1df3cb21e8d89f | [
"MIT"
] | 30 | 2016-05-26T14:48:34.000Z | 2022-03-26T10:20:19.000Z | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import argparse, os
import paho.mqtt.client as mqtt
from vedirect import Vedirect
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Process VE.Direct protocol')
parser.add_argument('--port', help='Serial port')
parser.add_argument('--timeo... | 38.827586 | 107 | 0.694494 |
f09a1109c79327fb8f0575413ce51f995cd6104f | 1,250 | py | Python | applications/experimental/pipelines/pipelines/nodes/__init__.py | SunYanCN/PaddleNLP | 31deea6c989f399b4552ee711d9f7d62768d645f | [
"Apache-2.0"
] | null | null | null | applications/experimental/pipelines/pipelines/nodes/__init__.py | SunYanCN/PaddleNLP | 31deea6c989f399b4552ee711d9f7d62768d645f | [
"Apache-2.0"
] | null | null | null | applications/experimental/pipelines/pipelines/nodes/__init__.py | SunYanCN/PaddleNLP | 31deea6c989f399b4552ee711d9f7d62768d645f | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022 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... | 40.322581 | 74 | 0.8024 |
ff364b21424309db83018d192f67cf61996debfa | 2,562 | py | Python | receive_email.py | iamywang/gtk_email | 2bee07b851a830ec76603baa8f0b2460a5dc06a8 | [
"MIT"
] | null | null | null | receive_email.py | iamywang/gtk_email | 2bee07b851a830ec76603baa8f0b2460a5dc06a8 | [
"MIT"
] | null | null | null | receive_email.py | iamywang/gtk_email | 2bee07b851a830ec76603baa8f0b2460a5dc06a8 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: UTF-8 -*-
from email.parser import Parser
from email.header import decode_header
from email.utils import parseaddr
import poplib
# 输入邮件地址, 口令和POP3服务器地址:
email = input('Email: ')
password = input('Password: ')
pop3_server = input('POP3 server: ')
def guess_charset(msg):
charset = ... | 28.466667 | 71 | 0.578845 |
2609197ee0f113173c7e6231d8f22b0277068c6a | 9,366 | py | Python | server/models/shape/__init__.py | jirsat/PlanarAlly | 8c3ed434f3a1d83aa89216b3daded916096f8acd | [
"MIT"
] | null | null | null | server/models/shape/__init__.py | jirsat/PlanarAlly | 8c3ed434f3a1d83aa89216b3daded916096f8acd | [
"MIT"
] | null | null | null | server/models/shape/__init__.py | jirsat/PlanarAlly | 8c3ed434f3a1d83aa89216b3daded916096f8acd | [
"MIT"
] | null | null | null | import json
from peewee import BooleanField, FloatField, ForeignKeyField, IntegerField, TextField
from playhouse.shortcuts import model_to_dict, update_model_from_dict
from typing import Any, Dict, List, Tuple
from utils import logger
from ..asset import Asset
from ..base import BaseModel
from ..campaign import Layer... | 30.508143 | 89 | 0.647128 |
fa31cc1e7dde45f7fe8905e46d960d04e407c152 | 1,006 | py | Python | src/gimelstudio/api/api.py | yonMaor/GimelStudio | 7ed7db429e61e0413791ad261583c7018f888953 | [
"Apache-2.0"
] | null | null | null | src/gimelstudio/api/api.py | yonMaor/GimelStudio | 7ed7db429e61e0413791ad261583c7018f888953 | [
"Apache-2.0"
] | null | null | null | src/gimelstudio/api/api.py | yonMaor/GimelStudio | 7ed7db429e61e0413791ad261583c7018f888953 | [
"Apache-2.0"
] | null | null | null | # ----------------------------------------------------------------------------
# Gimel Studio Copyright 2019-2022 by the Gimel Studio project contributors
#
# 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... | 40.24 | 78 | 0.619284 |
b0d9522651744807cd30e6d36c14a6868d46401d | 2,994 | py | Python | lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py | dan-zheng/llvm-project | 6b792850da0345274758c9260fda5df5e57ab486 | [
"Apache-2.0"
] | 765 | 2015-12-03T16:44:59.000Z | 2022-03-07T12:41:10.000Z | lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py | dan-zheng/llvm-project | 6b792850da0345274758c9260fda5df5e57ab486 | [
"Apache-2.0"
] | 1,815 | 2015-12-11T23:56:05.000Z | 2020-01-10T19:28:43.000Z | lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py | dan-zheng/llvm-project | 6b792850da0345274758c9260fda5df5e57ab486 | [
"Apache-2.0"
] | 284 | 2015-12-03T16:47:25.000Z | 2022-03-12T05:39:48.000Z | """
Test lldb data formatter subsystem.
"""
from __future__ import print_function
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class LibcxxUnorderedDataFormatterTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
de... | 36.962963 | 95 | 0.560454 |
ea6255e1350834ec3b2d09ac0e0b4520eaff3b17 | 2,177 | py | Python | test/SConsGnu/AcProgChecks/AcCheckProgs/sconstest-accheckprogs-example1.py | ptomulik/scons-gnu-build | 9c46908eed50679d7aaaaf472e324c97545ac837 | [
"Unlicense"
] | null | null | null | test/SConsGnu/AcProgChecks/AcCheckProgs/sconstest-accheckprogs-example1.py | ptomulik/scons-gnu-build | 9c46908eed50679d7aaaaf472e324c97545ac837 | [
"Unlicense"
] | 1 | 2015-02-13T04:30:45.000Z | 2015-02-13T04:30:45.000Z | test/SConsGnu/AcProgChecks/AcCheckProgs/sconstest-accheckprogs-example1.py | ptomulik/scons-gnu-build | 9c46908eed50679d7aaaaf472e324c97545ac837 | [
"Unlicense"
] | null | null | null | #
# Copyright (c) 2012-2014 by Pawel Tomulik
#
# 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, merge, publ... | 36.283333 | 80 | 0.666973 |
a8ede3bdf51aeb17dd862db5cf94ba84155756f5 | 355 | py | Python | spikeforest/sf_batch/__init__.py | tjd2002/spikeforest2 | 2e393564b858b2995aa2ccccd9bd73065681b5de | [
"Apache-2.0"
] | null | null | null | spikeforest/sf_batch/__init__.py | tjd2002/spikeforest2 | 2e393564b858b2995aa2ccccd9bd73065681b5de | [
"Apache-2.0"
] | null | null | null | spikeforest/sf_batch/__init__.py | tjd2002/spikeforest2 | 2e393564b858b2995aa2ccccd9bd73065681b5de | [
"Apache-2.0"
] | null | null | null | # from .sf_batch import sf_batch_prepare, sf_batch_run, sf_batch_assemble
from .sf_summarize_recording import sf_summarize_recording
from .sf_sort_recording import sf_sort_recording
# from .sf_batch2 import clear_job_results, download_recordings, run_jobs, assemble_job_results
from .compute_units_info import compute_un... | 59.166667 | 95 | 0.884507 |
a2d519139b574801e88a1d639d68724c35b5e514 | 3,221 | py | Python | test/unit/ggrc/models/test_json_comparator.py | MikalaiMikalalai/ggrc-core | f0f83b3638574bb64de474f3b70ed27436ca812a | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-01-12T23:46:00.000Z | 2019-01-12T23:46:00.000Z | test/unit/ggrc/models/test_json_comparator.py | MikalaiMikalalai/ggrc-core | f0f83b3638574bb64de474f3b70ed27436ca812a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | test/unit/ggrc/models/test_json_comparator.py | MikalaiMikalalai/ggrc-core | f0f83b3638574bb64de474f3b70ed27436ca812a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (C) 2020 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Test module for with_custom_restrictions mixin"""
import unittest
from datetime import datetime, date
import ddt
from ggrc.utils import json_comparator
@ddt.ddt
class TestJsonComparator(unittest.TestC... | 21.61745 | 78 | 0.427197 |
a3240832a0826cb0c82dbfc510e7a41c68c18900 | 8,803 | py | Python | test/tool_shed/functional/test_0120_simple_repository_dependency_multiple_owners.py | bopopescu/phyG | 023f505b705ab953f502cbc55e90612047867583 | [
"CC-BY-3.0"
] | 84 | 2017-10-25T15:49:21.000Z | 2021-11-28T21:25:54.000Z | data/test/python/a3240832a0826cb0c82dbfc510e7a41c68c18900test_0120_simple_repository_dependency_multiple_owners.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 5 | 2018-03-29T11:50:46.000Z | 2021-04-26T13:33:18.000Z | data/test/python/a3240832a0826cb0c82dbfc510e7a41c68c18900test_0120_simple_repository_dependency_multiple_owners.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 24 | 2017-11-22T08:31:00.000Z | 2022-03-27T01:22:31.000Z | from tool_shed.base.twilltestcase import ShedTwillTestCase, common, os
import tool_shed.base.test_db_util as test_db_util
datatypes_repository_name = 'blast_datatypes_0120'
datatypes_repository_description = 'Galaxy applicable datatypes for BLAST'
datatypes_repository_long_description = 'Galaxy datatypes for the BLAST... | 58.686667 | 150 | 0.667841 |
73472552390074553cb5b142681d0af102a1843d | 1,213 | bzl | Python | for_workspace/repositories.bzl | ktf/rules_foreign_cc | fe335ece190e5971432fb806cdb459047e577a42 | [
"Apache-2.0"
] | null | null | null | for_workspace/repositories.bzl | ktf/rules_foreign_cc | fe335ece190e5971432fb806cdb459047e577a42 | [
"Apache-2.0"
] | null | null | null | for_workspace/repositories.bzl | ktf/rules_foreign_cc | fe335ece190e5971432fb806cdb459047e577a42 | [
"Apache-2.0"
] | null | null | null | """ Remote repositories, used by this project itself """
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
def repositories():
_all_content = """filegroup(name = "all", srcs = glob(["**"]), visibility = ["//visibility:public"])"""
http_archive(
name = "bazel_skylib",
sha256... | 34.657143 | 126 | 0.618302 |
e6d71d8cc2c4365ede785ddd146a1944b28da486 | 4,441 | py | Python | calf/lexer.py | arrdem/calf | c8e83157c60eb9a14e2bdf39e14cec8bf3a827ae | [
"MIT"
] | null | null | null | calf/lexer.py | arrdem/calf | c8e83157c60eb9a14e2bdf39e14cec8bf3a827ae | [
"MIT"
] | null | null | null | calf/lexer.py | arrdem/calf | c8e83157c60eb9a14e2bdf39e14cec8bf3a827ae | [
"MIT"
] | null | null | null | """
Calf lexer.
Provides machinery for lexing sources of text into sequences of tokens with textual information, as
well as buffer position information appropriate for either full AST parsing, lossless syntax tree
parsing, linting or other use.
"""
import io
import re
import sys
from calf.token import CalfToken
from... | 32.416058 | 100 | 0.635893 |
bc85437feeb63076fa7920a32b626f36134cd617 | 103 | py | Python | my_study/mm/getpass_mima.py | zhangyage/Python-oldboy | a95c1b465929e2be641e425fcb5e15b366800831 | [
"Apache-2.0"
] | 1 | 2020-06-04T08:44:09.000Z | 2020-06-04T08:44:09.000Z | my_study/mm/getpass_mima.py | zhangyage/Python-oldboy | a95c1b465929e2be641e425fcb5e15b366800831 | [
"Apache-2.0"
] | null | null | null | my_study/mm/getpass_mima.py | zhangyage/Python-oldboy | a95c1b465929e2be641e425fcb5e15b366800831 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import getpass
pwd = getpass.getpass("请输入密码:")
#列表增删改查 | 11.444444 | 31 | 0.640777 |
d2871b8e017ff780f82b70b3f6ea524dd2d089ca | 321 | py | Python | data_src/city_sight/to_dict.py | z1514/OpenRichpedia | 0ded4b2c9414160b5b39914d43e42168e4d0762c | [
"MIT"
] | 31 | 2021-08-29T13:38:17.000Z | 2022-03-12T04:46:01.000Z | data_src/city_sight/to_dict.py | z1514/OpenRichpedia | 0ded4b2c9414160b5b39914d43e42168e4d0762c | [
"MIT"
] | null | null | null | data_src/city_sight/to_dict.py | z1514/OpenRichpedia | 0ded4b2c9414160b5b39914d43e42168e4d0762c | [
"MIT"
] | 8 | 2021-08-29T02:26:31.000Z | 2022-03-10T12:37:19.000Z | import json
from os import write
w = open("json.txt","r",encoding="utf-8")
f = open("dict.txt","w",encoding="utf-8")
arr = json.load(w)
s = dict()
f.write('{')
for item in arr:
s[item["value"]] = item["key"]
print(s)
for key in s:
f.write('"'+str(key)+'"'+':')
f.write('"'+str(s[key])+'"'+',\n')
f.write("}"... | 22.928571 | 41 | 0.548287 |
8ec4201f48ece0e9541b6992197c86862ecdb5be | 5,269 | py | Python | run_specific/weakEps.py | kolbt/whingdingdilly | 4c17b594ebc583750fe7565d6414f08678ea7882 | [
"BSD-3-Clause"
] | 4 | 2017-09-04T14:36:57.000Z | 2022-03-28T23:24:58.000Z | run_specific/weakEps.py | kolbt/whingdingdilly | 4c17b594ebc583750fe7565d6414f08678ea7882 | [
"BSD-3-Clause"
] | null | null | null | run_specific/weakEps.py | kolbt/whingdingdilly | 4c17b594ebc583750fe7565d6414f08678ea7882 | [
"BSD-3-Clause"
] | null | null | null | '''
# This is an 80 character line #
Purpose: run MONODISPERSE hard spheres to approximate the reentrant effect
observed for soft particles. Note that the actual activity of these particles
is much higher than is being reported (we maintain units in terms of the larger
di... | 34.89404 | 81 | 0.595749 |
01392e82cafcdfcd4ba3cf3ecd58e6acad5702e4 | 323 | py | Python | Tests/testSpikeComm.py | paccionesawyer/CS133-HRI-RobotDogStudy | 5ea35245419082b57c2427d63e057f8d187545c7 | [
"MIT"
] | null | null | null | Tests/testSpikeComm.py | paccionesawyer/CS133-HRI-RobotDogStudy | 5ea35245419082b57c2427d63e057f8d187545c7 | [
"MIT"
] | null | null | null | Tests/testSpikeComm.py | paccionesawyer/CS133-HRI-RobotDogStudy | 5ea35245419082b57c2427d63e057f8d187545c7 | [
"MIT"
] | null | null | null | import subprocess
import time
import RPi.GPIO as GPIO
import serial
#Connect to Spike
ser = serial.Serial(
port='/dev/ttyACM0',
baudrate=115200,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS,
timeout=1
)
while True:
print(ser.readline())
time.sleep... | 17.944444 | 33 | 0.708978 |
dc62da9675f5be4309fafd0a12f555549cd2c34a | 5,640 | py | Python | build/pyDcon/VSPaths.py | dconnet/AgilityBook | 4804c79079d6109294a6d377fb6ebda70bcb30a1 | [
"MIT"
] | 1 | 2020-11-23T20:33:41.000Z | 2020-11-23T20:33:41.000Z | build/pyDcon/VSPaths.py | dconnet/AgilityBook | 4804c79079d6109294a6d377fb6ebda70bcb30a1 | [
"MIT"
] | null | null | null | build/pyDcon/VSPaths.py | dconnet/AgilityBook | 4804c79079d6109294a6d377fb6ebda70bcb30a1 | [
"MIT"
] | 3 | 2020-05-04T19:42:26.000Z | 2022-03-08T09:36:54.000Z | # coding=utf-8
# Above line is for python
#
# GetCompilerPaths(c)
# c: vc9, vc9x64, etc...
# returns tuple (vcDir, vcvarsall cmd, platformDir, platform)
# baseDir, baseDir+r'\VC\vcvarsall.bat target', vcNNN, x64/x86
#
# 2020-11-28 Make target names case insensitive.
# 2020-09-13 Changed Win32 target to x86
# 2019-... | 27.647059 | 99 | 0.665957 |
fe9a1401a1e8485c9815dcc33f961541158c4c21 | 10,622 | py | Python | metabench/models/statistics/statistics_recorder.py | ComeBertrand/metabench | e5eaa32b94239b8fa475eda940b8086eec178cfe | [
"MIT"
] | null | null | null | metabench/models/statistics/statistics_recorder.py | ComeBertrand/metabench | e5eaa32b94239b8fa475eda940b8086eec178cfe | [
"MIT"
] | 15 | 2018-03-07T21:47:56.000Z | 2018-05-12T08:45:20.000Z | metabench/models/statistics/statistics_recorder.py | ComeBertrand/metabench | e5eaa32b94239b8fa475eda940b8086eec178cfe | [
"MIT"
] | null | null | null | """
File: statistics_recorder.py
Author: Come Bertrand
Email: bertrand.cosme@gmail.com
Github: https://github.com/ComeBertrand
Description: Statistics computation tools that will be the result of the
benchmark computation.
"""
import numpy as np
class StatisticsRecorder(object):
"""Compilation of statistics on a... | 36.754325 | 79 | 0.564489 |
634e34defdb37edcd7e9295ff3c2a46e9f84b24b | 3,565 | py | Python | huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/revoke_request_body.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 64 | 2020-06-12T07:05:07.000Z | 2022-03-30T03:32:50.000Z | huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/revoke_request_body.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 11 | 2020-07-06T07:56:54.000Z | 2022-01-11T11:14:40.000Z | huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/revoke_request_body.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 24 | 2020-06-08T11:42:13.000Z | 2022-03-04T06:44:08.000Z | # coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class RevokeRequestBody:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key ... | 25.464286 | 79 | 0.547826 |
4ca345e786ba4dce2b119db64c53eeca4cbcfb1a | 43 | py | Python | src/kan_alexandria/__version__.py | joaodath/kan_alexandria | b96ec9caf49a9372af715715275238fbaa10cc02 | [
"Apache-2.0"
] | null | null | null | src/kan_alexandria/__version__.py | joaodath/kan_alexandria | b96ec9caf49a9372af715715275238fbaa10cc02 | [
"Apache-2.0"
] | null | null | null | src/kan_alexandria/__version__.py | joaodath/kan_alexandria | b96ec9caf49a9372af715715275238fbaa10cc02 | [
"Apache-2.0"
] | null | null | null | __version__ = '0.0.6'
__release__ = 'beta'
| 14.333333 | 21 | 0.674419 |
359327ff8128820880b0d1cb017ded1bb163e996 | 812 | py | Python | tests/unit/forms/widget_tests.py | ahmetdaglarbas/e-commerce | ff190244ccd422b4e08d7672f50709edcbb6ebba | [
"BSD-3-Clause"
] | 1 | 2015-07-16T15:00:25.000Z | 2015-07-16T15:00:25.000Z | tests/unit/forms/widget_tests.py | ahmetdaglarbas/e-commerce | ff190244ccd422b4e08d7672f50709edcbb6ebba | [
"BSD-3-Clause"
] | null | null | null | tests/unit/forms/widget_tests.py | ahmetdaglarbas/e-commerce | ff190244ccd422b4e08d7672f50709edcbb6ebba | [
"BSD-3-Clause"
] | null | null | null | import nose
from oscar.forms import widgets
def compare_date_format(format, expected):
nose.tools.eq_(
widgets.datetime_format_to_js_date_format(format), expected)
def test_datetime_to_date_format_conversion():
format_testcases = (
('%Y-%m-%d', 'yyyy-mm-dd'),
('%Y-%m-%d %H:%M', 'yyy... | 25.375 | 68 | 0.667488 |
9927985cf14808924d914a44478132539a6a2300 | 3,872 | py | Python | doc/examples/auto_csfle_example.py | blink1073/motor | 92b4d51ecb7b3aa87d979ed83524b879ec5515e4 | [
"Apache-2.0"
] | null | null | null | doc/examples/auto_csfle_example.py | blink1073/motor | 92b4d51ecb7b3aa87d979ed83524b879ec5515e4 | [
"Apache-2.0"
] | null | null | null | doc/examples/auto_csfle_example.py | blink1073/motor | 92b4d51ecb7b3aa87d979ed83524b879ec5515e4 | [
"Apache-2.0"
] | null | null | null | import asyncio
import os
from bson import json_util
from bson.codec_options import CodecOptions
from pymongo.encryption import Algorithm
from pymongo.encryption_options import AutoEncryptionOpts
from motor.motor_asyncio import AsyncIOMotorClient, AsyncIOMotorClientEncryption
async def create_json_schema_file(kms_pr... | 37.960784 | 99 | 0.707903 |
642756ca6c083b4e5cb45a2a0585caf4ec3beaf7 | 3,084 | py | Python | tests/lr_schedulers/test_exponential_scheduler.py | HiromuHota/emmental | eb1e29b3406fc0ac301b2d29e06db5e6774eb9f0 | [
"MIT"
] | null | null | null | tests/lr_schedulers/test_exponential_scheduler.py | HiromuHota/emmental | eb1e29b3406fc0ac301b2d29e06db5e6774eb9f0 | [
"MIT"
] | null | null | null | tests/lr_schedulers/test_exponential_scheduler.py | HiromuHota/emmental | eb1e29b3406fc0ac301b2d29e06db5e6774eb9f0 | [
"MIT"
] | null | null | null | import logging
import shutil
import torch.nn as nn
import emmental
from emmental import Meta
from emmental.learner import EmmentalLearner
logger = logging.getLogger(__name__)
def test_exponential_scheduler(caplog):
"""Unit test of exponential scheduler"""
caplog.set_level(logging.INFO)
lr_scheduler =... | 32.125 | 79 | 0.672503 |
17e2747b7e13819f59653089033fed40d62e5df1 | 4,236 | py | Python | tyrell/dsl/builder.py | Lukas-Dresel/Trinity | f8c5c8356acb8142aad626ba7c24e4daa9531089 | [
"Apache-2.0"
] | 22 | 2019-04-04T14:01:18.000Z | 2022-01-07T19:42:15.000Z | tyrell/dsl/builder.py | Lukas-Dresel/Trinity | f8c5c8356acb8142aad626ba7c24e4daa9531089 | [
"Apache-2.0"
] | 3 | 2019-01-26T07:14:35.000Z | 2019-03-05T16:28:40.000Z | tyrell/dsl/builder.py | Lukas-Dresel/Trinity | f8c5c8356acb8142aad626ba7c24e4daa9531089 | [
"Apache-2.0"
] | 13 | 2019-03-27T18:37:19.000Z | 2021-09-23T20:54:44.000Z | from typing import Union
import sexpdata
from .node import *
from ..spec import TyrellSpec, Production, EnumType
from ..visitor import GenericVisitor
class ProductionVisitor(GenericVisitor):
_children: List[Node]
def __init__(self, children: List[Node]):
self._children = children
def visit_enum_... | 35.3 | 112 | 0.609065 |
e05e114bb7117e1f576ed07e643cc281b9408dd5 | 804 | py | Python | pyshop/pyshop/urls.py | Fahad-Hafeez/PyShop | 825e55e4da9b9661f91562669c9b2599531fdc3c | [
"Apache-2.0"
] | null | null | null | pyshop/pyshop/urls.py | Fahad-Hafeez/PyShop | 825e55e4da9b9661f91562669c9b2599531fdc3c | [
"Apache-2.0"
] | null | null | null | pyshop/pyshop/urls.py | Fahad-Hafeez/PyShop | 825e55e4da9b9661f91562669c9b2599531fdc3c | [
"Apache-2.0"
] | null | null | null | """pyshop URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based ... | 36.545455 | 77 | 0.706468 |
2092626a4b4d74dcc28ae9ce862b5fd3fd636b69 | 6,206 | py | Python | data_steward/cdr_cleaner/cleaning_rules/missing_concept_record_suppression.py | lrwb-aou/curation | e80447e56d269dc2c9c8bc79e78218d4b0dc504c | [
"MIT"
] | 16 | 2017-06-30T20:05:05.000Z | 2022-03-08T21:03:19.000Z | data_steward/cdr_cleaner/cleaning_rules/missing_concept_record_suppression.py | lrwb-aou/curation | e80447e56d269dc2c9c8bc79e78218d4b0dc504c | [
"MIT"
] | 342 | 2017-06-23T21:37:40.000Z | 2022-03-30T16:44:16.000Z | data_steward/cdr_cleaner/cleaning_rules/missing_concept_record_suppression.py | lrwb-aou/curation | e80447e56d269dc2c9c8bc79e78218d4b0dc504c | [
"MIT"
] | 33 | 2017-07-01T00:12:20.000Z | 2022-01-26T18:06:53.000Z | """
Remove records that contain concept_ids that do not belong in the vocabulary.
Original Issues: DC1601
"""
# Python imports
import logging
# Third party imports
from google.cloud.exceptions import GoogleCloudError
# Project imports
from cdr_cleaner.cleaning_rules.deid.concept_suppression import AbstractBqLookupT... | 37.385542 | 105 | 0.672897 |
839ac3ce9db060bad7f334a21904c8fc05075aff | 44,949 | py | Python | snkrfinder/model/cvae.py | ergonyc/snkrfinder | d8ddc6f20cf9c1ac2eec460f0e7bab9ab03c6791 | [
"Apache-2.0"
] | null | null | null | snkrfinder/model/cvae.py | ergonyc/snkrfinder | d8ddc6f20cf9c1ac2eec460f0e7bab9ab03c6791 | [
"Apache-2.0"
] | null | null | null | snkrfinder/model/cvae.py | ergonyc/snkrfinder | d8ddc6f20cf9c1ac2eec460f0e7bab9ab03c6791 | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/02c_model.cvae.ipynb (unless otherwise specified).
__all__ = ['prep_df_for_datablocks', 'get_ae_btfms', 'get_ae_no_aug', 'TensorPoint', 'Tensor2Vect', 'LatentsTensor',
'df_get_x', 'df_get_y', 'LatentsTensorBlock', 'df_ae_x', 'df_ae_y', 'LatentTupleBlock', 'get... | 32.761662 | 130 | 0.6078 |
a2650f14eeff11acfb48e5fc2ae1f58d08729539 | 14,951 | py | Python | google/ads/google_ads/v3/proto/resources/bidding_strategy_pb2.py | andy0937/google-ads-python | cb5da7f4a75076828d1fc3524b08cc167670435a | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v3/proto/resources/bidding_strategy_pb2.py | andy0937/google-ads-python | cb5da7f4a75076828d1fc3524b08cc167670435a | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v3/proto/resources/bidding_strategy_pb2.py | andy0937/google-ads-python | cb5da7f4a75076828d1fc3524b08cc167670435a | [
"Apache-2.0"
] | 1 | 2020-03-13T00:14:31.000Z | 2020-03-13T00:14:31.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/ads/googleads_v3/proto/resources/bidding_strategy.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf im... | 64.167382 | 2,003 | 0.790917 |
9087ea119282e62a36ef2014624cd3e608c47ce4 | 2,046 | py | Python | datawire/model/forms.py | arc64/datawi.re | adb95e974ee776617530348ead735db7b623273c | [
"MIT"
] | 2 | 2016-04-09T23:36:32.000Z | 2016-07-18T23:27:34.000Z | datawire/model/forms.py | arc64/datawi.re | adb95e974ee776617530348ead735db7b623273c | [
"MIT"
] | null | null | null | datawire/model/forms.py | arc64/datawi.re | adb95e974ee776617530348ead735db7b623273c | [
"MIT"
] | 1 | 2018-12-27T22:10:41.000Z | 2018-12-27T22:10:41.000Z | import colander
from colander import Invalid # noqa
PERSON = 'Person'
COMPANY = 'Company'
ORGANIZATION = 'Organization'
OTHER = 'Other'
CATEGORIES = [PERSON, COMPANY, ORGANIZATION, OTHER]
class Ref(object):
def deserialize(self, node, cstruct):
if cstruct is colander.null:
return colander.nu... | 27.648649 | 72 | 0.655425 |
aacd4dd3418c279bc6886ab5653e5478d6cfa0c7 | 10,865 | py | Python | PVGeo/filters/voxelize.py | banesullivan/PVGeophysics | 1ce6311c4e5b195a4a31e3e0b1eb968f44aa34d2 | [
"BSD-3-Clause"
] | 1 | 2017-08-17T17:38:46.000Z | 2017-08-17T17:38:46.000Z | PVGeo/filters/voxelize.py | banesullivan/PVGeophysics | 1ce6311c4e5b195a4a31e3e0b1eb968f44aa34d2 | [
"BSD-3-Clause"
] | null | null | null | PVGeo/filters/voxelize.py | banesullivan/PVGeophysics | 1ce6311c4e5b195a4a31e3e0b1eb968f44aa34d2 | [
"BSD-3-Clause"
] | 1 | 2018-06-06T05:56:17.000Z | 2018-06-06T05:56:17.000Z | """This module provides a complicated algorithm for making voxels out of regularly
gridded points. Considering that this algorithm is rather complex, we are keeping
it in its own module until we can simplify it, clean up the code, and make it
capable of handling non-uniformly gridded points
"""
__all__ = [
'Voxeli... | 35.048387 | 88 | 0.562632 |
e899e3c50d64f528d791584d14d1c8dc2afe943c | 3,608 | py | Python | eval/embed_files_with_issues.py | TobiasGleissner/embed_modal | 746e3efb6f4c6cf70cc5b67f9c8f2ea3657328ec | [
"BSD-3-Clause"
] | 5 | 2018-06-20T14:52:55.000Z | 2022-02-21T15:51:56.000Z | eval/embed_files_with_issues.py | TobiasGleissner/embed_modal | 746e3efb6f4c6cf70cc5b67f9c8f2ea3657328ec | [
"BSD-3-Clause"
] | 5 | 2017-12-08T12:27:46.000Z | 2018-03-27T06:32:49.000Z | eval/embed_files_with_issues.py | leoprover/embed_modal | 746e3efb6f4c6cf70cc5b67f9c8f2ea3657328ec | [
"BSD-3-Clause"
] | 1 | 2018-04-05T20:02:31.000Z | 2018-04-05T20:02:31.000Z | from common import embed,accumulate_csv,create_dict_from_problems,iterate_dict,filename_to_path
from check_consistency import check_consistency_iteration_callback
from starexec_create_configurations import get_transformation_abbreviation
import sys
from pathlib import Path
def main(qmltp_dir,out_dir,csv_file_list):
... | 58.193548 | 178 | 0.668792 |
ddc69f5423d8baf1799f81ef5ac2159fc95581fd | 548 | py | Python | cowrie/commands/__init__.py | johnfoo/cowrie | d74d96a2d5355f0fb790ad8041e97420fb61371d | [
"BSD-3-Clause"
] | 3 | 2018-11-15T07:20:24.000Z | 2021-06-10T03:34:56.000Z | cowrie/commands/__init__.py | johnfoo/cowrie | d74d96a2d5355f0fb790ad8041e97420fb61371d | [
"BSD-3-Clause"
] | null | null | null | cowrie/commands/__init__.py | johnfoo/cowrie | d74d96a2d5355f0fb790ad8041e97420fb61371d | [
"BSD-3-Clause"
] | 8 | 2015-12-17T05:41:51.000Z | 2019-09-27T05:06:37.000Z | # Copyright (c) 2009 Upi Tamminen <desaster@gmail.com>
# See the COPYRIGHT file for more information
__all__ = [
'adduser',
'apt',
'base',
'busybox',
'curl',
'dd',
'env',
'ethtool',
'free',
'fs',
'ftpget',
'gcc',
'ifconfig',
'iptables',
'last',
'ls',
... | 13.7 | 54 | 0.441606 |
1be3b18524360cf0e3aeb82804d6276040e4a64e | 1,023 | py | Python | tools/dev/position_control.py | gbalke/bldc-controller | 99e4e71d5bdc0c7c7901d886aa7709c66db8b718 | [
"MIT"
] | null | null | null | tools/dev/position_control.py | gbalke/bldc-controller | 99e4e71d5bdc0c7c7901d886aa7709c66db8b718 | [
"MIT"
] | null | null | null | tools/dev/position_control.py | gbalke/bldc-controller | 99e4e71d5bdc0c7c7901d886aa7709c66db8b718 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
import numpy as np
from comms import *
import serial
import time
port = sys.argv[1]
s = serial.Serial(port=port, baudrate=COMM_DEFAULT_BAUD_RATE, timeout=0.001)
print s.BAUDRATES
client = BLDCControllerClient(s)
client.leaveBootloader(0x01)
print("hello")
s.flush()
time.sleep(0.1)
p... | 25.575 | 76 | 0.684262 |
df2c1601232d98489d178a10df9a0e0462c92af3 | 20,954 | py | Python | tests/acceptance/steps/multi_file_steps.py | aoxiangflysky/onedata | 5fe5783f4fb23e90e6567d638a165a0bfcc2f663 | [
"Apache-2.0"
] | 61 | 2016-04-19T23:51:37.000Z | 2022-01-02T22:28:53.000Z | tests/acceptance/steps/multi_file_steps.py | aoxiangflysky/onedata | 5fe5783f4fb23e90e6567d638a165a0bfcc2f663 | [
"Apache-2.0"
] | 57 | 2016-08-23T13:36:47.000Z | 2022-02-08T14:30:30.000Z | tests/acceptance/steps/multi_file_steps.py | aoxiangflysky/onedata | 5fe5783f4fb23e90e6567d638a165a0bfcc2f663 | [
"Apache-2.0"
] | 7 | 2016-08-26T06:08:58.000Z | 2019-11-16T19:22:28.000Z | """Module implements common steps for operation on files (both regular files
and directories)in multi-client environment.
"""
__author__ = "Jakub Kudzia"
__copyright__ = "Copyright (C) 2015 ACK CYFRONET AGH"
__license__ = "This software is released under the MIT license cited in " \
"LICENSE.txt"
from t... | 36.441739 | 88 | 0.61215 |
f19c979551f66f87619c440dc266e8d9cef9102a | 3,632 | py | Python | sprokit/tests/bindings/python/modules/test-pymodules.py | neal-siekierski/kwiver | 1c97ad72c8b6237cb4b9618665d042be16825005 | [
"BSD-3-Clause"
] | null | null | null | sprokit/tests/bindings/python/modules/test-pymodules.py | neal-siekierski/kwiver | 1c97ad72c8b6237cb4b9618665d042be16825005 | [
"BSD-3-Clause"
] | null | null | null | sprokit/tests/bindings/python/modules/test-pymodules.py | neal-siekierski/kwiver | 1c97ad72c8b6237cb4b9618665d042be16825005 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#ckwg +28
# Copyright 2012-2013 by Kitware, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,... | 32.141593 | 87 | 0.746421 |
b042aeab3d0561e24508dc8e20978d6f21b6f58b | 10,047 | py | Python | tests/beem/test_amount.py | abitmore/beem | 2026833a836007e45f16395a9ca3b31d02e98f87 | [
"MIT"
] | 118 | 2018-03-06T07:26:19.000Z | 2022-03-21T20:16:04.000Z | tests/beem/test_amount.py | abitmore/beem | 2026833a836007e45f16395a9ca3b31d02e98f87 | [
"MIT"
] | 248 | 2018-03-20T18:03:39.000Z | 2022-03-28T16:38:09.000Z | tests/beem/test_amount.py | abitmore/beem | 2026833a836007e45f16395a9ca3b31d02e98f87 | [
"MIT"
] | 81 | 2018-04-27T15:27:52.000Z | 2021-10-31T06:14:25.000Z | # -*- coding: utf-8 -*-
import unittest
from parameterized import parameterized
from beem import Steem
from beem.amount import Amount
from beem.asset import Asset
from beem.instance import set_shared_blockchain_instance, SharedInstance
from decimal import Decimal
from .nodes import get_hive_nodes, get_steem_nodes
cla... | 34.057627 | 137 | 0.564646 |
16f9893add6e55b3ebbdce92c19e9a3b51fb5287 | 799 | py | Python | 0028-implement-strstr/solution.py | radelman/leetcode | 379aede2b84050a9452bea0452c4ffc8a156b9de | [
"BSD-2-Clause"
] | null | null | null | 0028-implement-strstr/solution.py | radelman/leetcode | 379aede2b84050a9452bea0452c4ffc8a156b9de | [
"BSD-2-Clause"
] | null | null | null | 0028-implement-strstr/solution.py | radelman/leetcode | 379aede2b84050a9452bea0452c4ffc8a156b9de | [
"BSD-2-Clause"
] | null | null | null | class Solution:
def strStr(self, haystack: str, needle: str) -> int:
if len(needle) == 0:
return 0
cumsum = [ord(c) for c in haystack]
for i in range(1, len(cumsum)):
cumsum[i] = cumsum[i - 1] + cumsum[i]
target = sum([ord(c) for c in needle])
for i in range(len(haystack) - len(needle) + 1):
... | 19.487805 | 53 | 0.579474 |
4bf667f64bf55711ee869cf9acac3a8e4ffe42cf | 6,663 | py | Python | tools/tiny-test-fw/IDF/IDFApp.py | ulfalizer/esp-idf-1 | 6835bfc741bf15e98fb7971293913f770df6081f | [
"Apache-2.0"
] | 14 | 2018-04-23T20:34:38.000Z | 2022-02-03T05:06:57.000Z | lib/third_party/mcu_vendor/espressif/esp-idf/tools/tiny-test-fw/IDF/IDFApp.py | dyg540/amazon-freertos | 3d61ed00f018ac6ec0df2031556dbb71bf03617d | [
"MIT"
] | 19 | 2018-12-07T03:41:15.000Z | 2020-02-05T14:42:04.000Z | lib/third_party/mcu_vendor/espressif/esp-idf/tools/tiny-test-fw/IDF/IDFApp.py | dyg540/amazon-freertos | 3d61ed00f018ac6ec0df2031556dbb71bf03617d | [
"MIT"
] | 11 | 2018-08-03T10:15:33.000Z | 2020-12-07T03:26:10.000Z | # Copyright 2015-2017 Espressif Systems (Shanghai) PTE LTD
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:#www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 36.60989 | 109 | 0.575867 |
0498ab15cdc44c9270e1df2952701af2ce2e520a | 1,593 | py | Python | detailsScrape/senmoistd/senmoistd26.py | Asyikin98/SkinFerm | 72fd1ad6339c96adf5ec154bde566de9eb1472c3 | [
"MIT"
] | null | null | null | detailsScrape/senmoistd/senmoistd26.py | Asyikin98/SkinFerm | 72fd1ad6339c96adf5ec154bde566de9eb1472c3 | [
"MIT"
] | 2 | 2021-02-03T01:55:13.000Z | 2021-04-30T12:46:33.000Z | detailsScrape/senmoistd/senmoistd26.py | Asyikin98/SkinFerm | 72fd1ad6339c96adf5ec154bde566de9eb1472c3 | [
"MIT"
] | null | null | null | import urllib.request
import random
from bs4 import BeautifulSoup
from requests import get
import mysql.connector
conn = mysql.connector.connect(user="root", passwd="",host="localhost", database="product")
cursor = conn.cursor()
sql = """INSERT INTO senmoistd (about, rate, top, comment, dari) VALUES (%s, %s, %s, %s,... | 36.204545 | 148 | 0.624608 |
49a626ea1ecb299d07ce918b79729b1630fc007a | 29,432 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/_service_endpoint_policies_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/_service_endpoint_policies_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/_service_endpoint_policies_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"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 may ... | 49.217391 | 214 | 0.667165 |
373e5b8337b3d95d6a3b3e235086c1678b41e361 | 7,875 | py | Python | custom_components/acthor/acthor/pymodbus_vendor/pdu.py | jatty/hass-acthor | 9d5aaed3f01e9288fef031b47b0808e6e80c22d3 | [
"MIT"
] | null | null | null | custom_components/acthor/acthor/pymodbus_vendor/pdu.py | jatty/hass-acthor | 9d5aaed3f01e9288fef031b47b0808e6e80c22d3 | [
"MIT"
] | null | null | null | custom_components/acthor/acthor/pymodbus_vendor/pdu.py | jatty/hass-acthor | 9d5aaed3f01e9288fef031b47b0808e6e80c22d3 | [
"MIT"
] | null | null | null | """
Contains base classes for modbus request/response/error packets
"""
# --------------------------------------------------------------------------- #
# Logging
# --------------------------------------------------------------------------- #
import logging
from .compat import byte2int, int2byte, iteritems
from .consta... | 31.5 | 79 | 0.605079 |
281963f3f5c1860a91dd55b88a65955859bf51bc | 42,425 | py | Python | django/db/models/fields/__init__.py | t11e/django | 447f5375d378dba3bac1ded0306fa0d1b8ab55a4 | [
"BSD-3-Clause"
] | 1 | 2016-05-08T13:32:33.000Z | 2016-05-08T13:32:33.000Z | django/db/models/fields/__init__.py | t11e/django | 447f5375d378dba3bac1ded0306fa0d1b8ab55a4 | [
"BSD-3-Clause"
] | null | null | null | django/db/models/fields/__init__.py | t11e/django | 447f5375d378dba3bac1ded0306fa0d1b8ab55a4 | [
"BSD-3-Clause"
] | null | null | null | import datetime
import decimal
import re
import time
import math
import django.utils.copycompat as copy
from django.db import connection
from django.db.models.fields.subclassing import LegacyConnection
from django.db.models.query_utils import QueryWrapper
from django.conf import settings
from django import forms
from... | 38.083483 | 166 | 0.629063 |
4ad676c629fc36ee0274a2fa06940c591bb575a1 | 1,385 | py | Python | chrome/browser/resources/ssl/tls_error_assistant/gen_tls_error_assistant_proto.py | google-ar/chromium | 2441c86a5fd975f09a6c30cddb57dfb7fc239699 | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 777 | 2017-08-29T15:15:32.000Z | 2022-03-21T05:29:41.000Z | chrome/browser/resources/ssl/tls_error_assistant/gen_tls_error_assistant_proto.py | harrymarkovskiy/WebARonARCore | 2441c86a5fd975f09a6c30cddb57dfb7fc239699 | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 66 | 2017-08-30T18:31:18.000Z | 2021-08-02T10:59:35.000Z | chrome/browser/resources/ssl/tls_error_assistant/gen_tls_error_assistant_proto.py | harrymarkovskiy/WebARonARCore | 2441c86a5fd975f09a6c30cddb57dfb7fc239699 | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 123 | 2017-08-30T01:19:34.000Z | 2022-03-17T22:55:31.000Z | #!/usr/bin/python
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Convert the ASCII tls_error_assistant.asciipb proto into a binary resource.
"""
import os
import sys
# Import the binary proto gener... | 30.777778 | 79 | 0.762455 |
f9bac9fca57b57f57ff8768b78286267e011e3eb | 3,612 | py | Python | legistar/old/people.py | datamade/python-legistar-scraper | ac379c6bd0437db85cecf469f34b02baedb1ae7e | [
"BSD-3-Clause"
] | 1 | 2021-12-27T12:07:20.000Z | 2021-12-27T12:07:20.000Z | legistar/old/people.py | datamade/python-legistar-scraper | ac379c6bd0437db85cecf469f34b02baedb1ae7e | [
"BSD-3-Clause"
] | null | null | null | legistar/old/people.py | datamade/python-legistar-scraper | ac379c6bd0437db85cecf469f34b02baedb1ae7e | [
"BSD-3-Clause"
] | 2 | 2019-05-01T20:09:29.000Z | 2019-05-16T19:35:14.000Z | class MembershipAdapter(Adapter):
'''Convert a legistar scraper's membership into a pupa-compliant membership. '''
pupa_model = pupa.scrape.Membership
extras_keys = ['appointed_by']
def stringify_date(self, dt):
'''Given a datetime string, stringify it to a date,
assuming there is no t... | 29.606557 | 85 | 0.59856 |
deb864a0273f8422e76021dd44d19bc628b6b567 | 2,208 | py | Python | networkx/algorithms/bipartite/covering.py | KyleBenson/networkx | 26ccb4a380ba0e5304d7bbff53eb9859c6e4c93a | [
"BSD-3-Clause"
] | null | null | null | networkx/algorithms/bipartite/covering.py | KyleBenson/networkx | 26ccb4a380ba0e5304d7bbff53eb9859c6e4c93a | [
"BSD-3-Clause"
] | null | null | null | networkx/algorithms/bipartite/covering.py | KyleBenson/networkx | 26ccb4a380ba0e5304d7bbff53eb9859c6e4c93a | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 NetworkX developers.
# Copyright (C) 2016 by
# Nishant Nikhil <nishantiam@gmail.com>
# All rights reserved.
# BSD license.
""" Functions related to graph covers."""
import networkx as nx
from networkx.utils import not_implemented_for, arbitrary_element
from networkx.algorithms.bipartit... | 36.196721 | 78 | 0.717391 |
5277d3e155d6597e1092c5598a21434ea5af901c | 17,029 | py | Python | diffkemp/llvm_ir/kernel_source.py | nikopatrik/diffkemp | 460257b2c09b84ab492019f2ae1592b7b0a0b4c0 | [
"Apache-2.0"
] | null | null | null | diffkemp/llvm_ir/kernel_source.py | nikopatrik/diffkemp | 460257b2c09b84ab492019f2ae1592b7b0a0b4c0 | [
"Apache-2.0"
] | null | null | null | diffkemp/llvm_ir/kernel_source.py | nikopatrik/diffkemp | 460257b2c09b84ab492019f2ae1592b7b0a0b4c0 | [
"Apache-2.0"
] | null | null | null | """
Browsing kernel sources.
Functions for searching function definitions, kernel modules, etc.
"""
from diffkemp.llvm_ir.build_llvm import LlvmKernelBuilder, BuildException
from diffkemp.llvm_ir.kernel_module import LlvmKernelModule
from diffkemp.llvm_ir.llvm_sysctl_module import LlvmSysctlModule
import errno
import o... | 40.353081 | 79 | 0.578542 |
f19701610bea794151a15cf055abfdf35c39f262 | 4,473 | py | Python | packages/sdk/odahuflow/sdk/models/inference_job_status.py | odahu/odahuflow | 58c3220a266a61bb893cf79c4b994569e3445097 | [
"ECL-2.0",
"Apache-2.0"
] | 12 | 2020-10-13T15:39:52.000Z | 2021-10-11T17:13:42.000Z | packages/sdk/odahuflow/sdk/models/inference_job_status.py | odahu/odahuflow | 58c3220a266a61bb893cf79c4b994569e3445097 | [
"ECL-2.0",
"Apache-2.0"
] | 475 | 2019-11-18T12:40:47.000Z | 2022-03-29T21:17:38.000Z | packages/sdk/odahuflow/sdk/models/inference_job_status.py | odahu/odahuflow | 58c3220a266a61bb893cf79c4b994569e3445097 | [
"ECL-2.0",
"Apache-2.0"
] | 4 | 2020-02-25T11:26:10.000Z | 2021-03-10T12:01:00.000Z | # coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from odahuflow.sdk.models.base_model_ import Model
from odahuflow.sdk.models import util
class InferenceJobStatus(Model):
"""NOTE: This class is auto generated by... | 29.622517 | 138 | 0.625531 |
7caa12f6a9c569942db12519b581ac444f5621d0 | 21,471 | py | Python | angrmanagement/ui/views/disassembly_view.py | novafacing/angr-management | e7c94376736836094e247ca0dec73cede726408b | [
"BSD-2-Clause"
] | null | null | null | angrmanagement/ui/views/disassembly_view.py | novafacing/angr-management | e7c94376736836094e247ca0dec73cede726408b | [
"BSD-2-Clause"
] | null | null | null | angrmanagement/ui/views/disassembly_view.py | novafacing/angr-management | e7c94376736836094e247ca0dec73cede726408b | [
"BSD-2-Clause"
] | null | null | null | import logging
from typing import Union, Optional, TYPE_CHECKING
from PySide2.QtWidgets import QHBoxLayout, QVBoxLayout, QMenu, QApplication, QMessageBox
from PySide2.QtCore import Qt, QSize
from ...data.instance import ObjectContainer
from ...utils import locate_function
from ...data.function_graph import FunctionGr... | 33.600939 | 124 | 0.645662 |
c61795106f044b30258d1de96e78591da9525122 | 653 | py | Python | Atividade 01/sem-07-T1-Q3.py | daianasousa/Atividade-Remota-Semana-07 | 1c4a28bf052057e921730ba79dfb0cdaa74576e0 | [
"MIT"
] | null | null | null | Atividade 01/sem-07-T1-Q3.py | daianasousa/Atividade-Remota-Semana-07 | 1c4a28bf052057e921730ba79dfb0cdaa74576e0 | [
"MIT"
] | null | null | null | Atividade 01/sem-07-T1-Q3.py | daianasousa/Atividade-Remota-Semana-07 | 1c4a28bf052057e921730ba79dfb0cdaa74576e0 | [
"MIT"
] | null | null | null | def main():
tempo = 1
taxa_A = (2 / 100)
taxa_B = (3 / 100)
p_1 = int(input('Digite a população do país: '))
p_2 = int(input('Digite a população do país: '))
if p_1 > p_2:
pais_A = p_1
pais_B = p_2
elif p_2 > p_1:
pais_A = p_2
pais_B = p_1
populacao_A ... | 22.517241 | 52 | 0.502297 |
7ea2180d0894f3578696d3a48a79fc300c7fbbe5 | 49,918 | py | Python | nums/numpy/api.py | yangkevin2/nums | fbd8f680b8e4b292d18bd5fa1b49e3cd216f9d0f | [
"Apache-2.0"
] | null | null | null | nums/numpy/api.py | yangkevin2/nums | fbd8f680b8e4b292d18bd5fa1b49e3cd216f9d0f | [
"Apache-2.0"
] | null | null | null | nums/numpy/api.py | yangkevin2/nums | fbd8f680b8e4b292d18bd5fa1b49e3cd216f9d0f | [
"Apache-2.0"
] | 1 | 2021-06-22T21:11:25.000Z | 2021-06-22T21:11:25.000Z | # coding=utf-8
# Copyright (C) 2020 NumS 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 applicable... | 37.673962 | 98 | 0.516026 |
68c02fdc8fa5307347e604d9debceb6bae7717fc | 4,172 | py | Python | api/serializers.py | chop-dbhi/biorepo-portal | 7db13c40b2b9d62af43a28e4af08c2472b98fc96 | [
"BSD-2-Clause"
] | 6 | 2016-10-26T19:51:11.000Z | 2021-03-18T16:05:55.000Z | api/serializers.py | chop-dbhi/biorepo-portal | 7db13c40b2b9d62af43a28e4af08c2472b98fc96 | [
"BSD-2-Clause"
] | 207 | 2015-09-24T17:41:37.000Z | 2021-05-18T18:14:08.000Z | api/serializers.py | chop-dbhi/biorepo-portal | 7db13c40b2b9d62af43a28e4af08c2472b98fc96 | [
"BSD-2-Clause"
] | 8 | 2016-04-27T19:04:50.000Z | 2020-08-24T02:33:05.000Z | from django.contrib.auth.models import User, Group
from rest_framework import serializers
from api.models.protocols import Organization, DataSource, Protocol,\
ProtocolDataSource, ProtocolDataSourceLink, ProtocolUser,\
ProtocolUserCredentials
class UserSerializer(serializers.HyperlinkedModelSerializer):
... | 35.65812 | 110 | 0.751198 |
3514fb375cf588ce1ca3d1f580a08c93313caa5c | 568 | py | Python | ABC/abc201-abc250/abc226/c/main.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | 2 | 2020-06-12T09:54:23.000Z | 2021-05-04T01:34:07.000Z | ABC/abc201-abc250/abc226/c/main.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | 961 | 2020-06-23T07:26:22.000Z | 2022-03-31T21:34:52.000Z | ABC/abc201-abc250/abc226/c/main.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
def main():
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
n = int(input())
b = [list(map(int, input().split())) for _ in range(n)]
ans = list()
master = [False] * n
def dfs(m, ans):
if not master[m]:
master[m] = True... | 17.75 | 59 | 0.454225 |
88542708b09974d1b002314fbfe441303f0fca8a | 3,512 | py | Python | ucsmsdk/mometa/bios/BiosVfEnhancedIntelSpeedStepTech.py | anoop1984/python_sdk | c4a226bad5e10ad233eda62bc8f6d66a5a82b651 | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/bios/BiosVfEnhancedIntelSpeedStepTech.py | anoop1984/python_sdk | c4a226bad5e10ad233eda62bc8f6d66a5a82b651 | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/bios/BiosVfEnhancedIntelSpeedStepTech.py | anoop1984/python_sdk | c4a226bad5e10ad233eda62bc8f6d66a5a82b651 | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for BiosVfEnhancedIntelSpeedStepTech ManagedObject."""
import sys, os
from ...ucsmo import ManagedObject
from ...ucscoremeta import UcsVersion, MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class BiosVfEnhancedIntelSpeedStepTechConsts():
SUPPORTED_BY_DE... | 59.525424 | 315 | 0.703588 |
44599aa1324bcae8bde4e518d5e63e291abebfc0 | 1,372 | py | Python | python/dune/xt/common/test.py | ftschindler-work/dune-xt-common | 1748530e13dbf683b5bf14289bf3e134485755a8 | [
"BSD-2-Clause"
] | 2 | 2016-01-05T14:54:52.000Z | 2020-02-08T04:09:13.000Z | python/dune/xt/common/test.py | ftschindler-work/dune-xt-common | 1748530e13dbf683b5bf14289bf3e134485755a8 | [
"BSD-2-Clause"
] | 119 | 2016-01-06T16:32:14.000Z | 2020-03-25T08:28:53.000Z | python/dune/xt/common/test.py | ftschindler-work/dune-xt-common | 1748530e13dbf683b5bf14289bf3e134485755a8 | [
"BSD-2-Clause"
] | 5 | 2016-04-13T08:03:45.000Z | 2020-03-13T10:59:17.000Z | # ~~~
# This file is part of the dune-xt-common project:
# https://github.com/dune-community/dune-xt-common
# Copyright 2009-2018 dune-xt-common developers and contributors. All rights reserved.
# License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
# or GPL-2.0+ (http://... | 35.179487 | 100 | 0.663994 |
1dd6b5a8029d41c238008fc78b5ee7889301e2b9 | 17,428 | py | Python | disfv1.py | ndf-zz/disfv1 | dc47ab93ced580989e65fc0e9d1be4808c932070 | [
"MIT"
] | 5 | 2019-09-18T08:57:24.000Z | 2020-09-29T05:16:32.000Z | disfv1.py | ndf-zz/disfv1 | dc47ab93ced580989e65fc0e9d1be4808c932070 | [
"MIT"
] | 2 | 2020-12-16T18:33:27.000Z | 2022-01-21T21:31:52.000Z | disfv1.py | ndf-zz/disfv1 | dc47ab93ced580989e65fc0e9d1be4808c932070 | [
"MIT"
] | 1 | 2019-11-26T09:40:07.000Z | 2019-11-26T09:40:07.000Z | #
# disfv1: FV-1 Disassembler
# Copyright (C) 2019-2021 Nathan Fraser
#
# A disassembler for the Spin Semiconductor FV-1 DSP.
# Python2 > 2.6 support
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import absolute_import
# Imports
import ar... | 33.070209 | 86 | 0.493115 |
4aeb507dcab73eaa19fed6706746abc134ecc9ff | 610 | gyp | Python | v8_4_5/build/all.gyp | wenfeifei/miniblink49 | 2ed562ff70130485148d94b0e5f4c343da0c2ba4 | [
"Apache-2.0"
] | 5,964 | 2016-09-27T03:46:29.000Z | 2022-03-31T16:25:27.000Z | v8_4_5/build/all.gyp | w4454962/miniblink49 | b294b6eacb3333659bf7b94d670d96edeeba14c0 | [
"Apache-2.0"
] | 479 | 2016-02-10T00:21:41.000Z | 2020-11-26T09:40:03.000Z | v8_4_5/build/all.gyp | w4454962/miniblink49 | b294b6eacb3333659bf7b94d670d96edeeba14c0 | [
"Apache-2.0"
] | 1,006 | 2016-09-27T05:17:27.000Z | 2022-03-30T02:46:51.000Z | # Copyright 2011 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'targets': [
{
'target_name': 'All',
'type': 'none',
'dependencies': [
'../samples/samples.gyp:*',
'../src/d8.gyp... | 23.461538 | 72 | 0.513115 |
e6810bfd1f4e481c1f92b1f7b34392a590d1852b | 412 | py | Python | regular_expression.py | keerthana1502/python_practice | 8c0499e014826af78f9a88730551ace3fa79686d | [
"bzip2-1.0.6"
] | null | null | null | regular_expression.py | keerthana1502/python_practice | 8c0499e014826af78f9a88730551ace3fa79686d | [
"bzip2-1.0.6"
] | null | null | null | regular_expression.py | keerthana1502/python_practice | 8c0499e014826af78f9a88730551ace3fa79686d | [
"bzip2-1.0.6"
] | null | null | null | import re
a="hello world"
x=re.findall("he..o",a)
print(x)
y=re.findall("[a-z]",a)
print(y)
z=re.findall("^h",a)
print(z)
b=re.findall("d$",a)
print(b)
c=re.findall("h.*o",a)
print(c)
d=re.findall("h.+o",a)
print(d)
e=re.findall("h.?",a)
print(e)
f=re.findall("h.{3}o",a)
print(f)
g=re.findall("hello/world",a)
print(g)
... | 15.846154 | 29 | 0.616505 |
b27838f3e4db1a0f021ac12e661a8d9c98f15091 | 621 | py | Python | setup.py | demonCoder95/Gerrit-to-Github-Issues | 268be3f5a2865c67caa9778b80f242f15792e55c | [
"Apache-2.0"
] | 2 | 2020-02-26T21:00:44.000Z | 2020-04-17T20:16:57.000Z | setup.py | demonCoder95/Gerrit-to-Github-Issues | 268be3f5a2865c67caa9778b80f242f15792e55c | [
"Apache-2.0"
] | 7 | 2020-05-04T19:31:16.000Z | 2021-03-24T19:09:50.000Z | setup.py | airshipit/gerrit-to-github-bot | 3c62ac1eefe07343c7525733b4096307d1a3ebcd | [
"Apache-2.0"
] | 2 | 2020-04-18T13:29:06.000Z | 2020-04-30T00:04:19.000Z | # 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 writing, software
# distributed under th... | 41.4 | 74 | 0.763285 |
6d254bf4731044195ff76da6dcb415af1902a773 | 13,524 | py | Python | tests/test_data/test_datasets/test_s3dis_dataset.py | Guangyun-Xu/mmdetection3d | 75c5c6cd590386bd1539a686c5fd2cc45c5480d5 | [
"Apache-2.0"
] | 2,216 | 2020-07-09T19:10:11.000Z | 2022-03-31T12:39:26.000Z | tests/test_data/test_datasets/test_s3dis_dataset.py | Guangyun-Xu/mmdetection3d | 75c5c6cd590386bd1539a686c5fd2cc45c5480d5 | [
"Apache-2.0"
] | 1,174 | 2020-07-10T07:02:28.000Z | 2022-03-31T12:38:56.000Z | tests/test_data/test_datasets/test_s3dis_dataset.py | Guangyun-Xu/mmdetection3d | 75c5c6cd590386bd1539a686c5fd2cc45c5480d5 | [
"Apache-2.0"
] | 681 | 2020-07-09T19:40:06.000Z | 2022-03-31T11:02:24.000Z | # Copyright (c) OpenMMLab. All rights reserved.
import numpy as np
import pytest
import torch
from mmdet3d.datasets import S3DISDataset, S3DISSegDataset
def test_getitem():
np.random.seed(0)
root_path = './tests/data/s3dis/'
ann_file = './tests/data/s3dis/s3dis_infos.pkl'
class_names = ('table', 'cha... | 38.862069 | 79 | 0.58533 |
e109d7bbbe3073feedfbac6428381a98f90aad94 | 1,742 | py | Python | app/user/serializers.py | tejasvadgama5/recipe-app-api | 670ec021fb75f99f490079baa105b7c4e58050ab | [
"MIT"
] | null | null | null | app/user/serializers.py | tejasvadgama5/recipe-app-api | 670ec021fb75f99f490079baa105b7c4e58050ab | [
"MIT"
] | null | null | null | app/user/serializers.py | tejasvadgama5/recipe-app-api | 670ec021fb75f99f490079baa105b7c4e58050ab | [
"MIT"
] | 1 | 2021-11-12T12:39:36.000Z | 2021-11-12T12:39:36.000Z | from django.contrib.auth import get_user_model, authenticate
from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
class UserSerializer(serializers.ModelSerializer):
"""Serializer for users objects"""
class Meta:
model = get_user_model()
fields = ('em... | 31.672727 | 78 | 0.64868 |
099d274b7f1d96166eca8ad57af371f0e3951dcc | 3,168 | py | Python | tests/misc/test_SetValueTransformer.py | bissoligiulia/tubular | 878fa0d484ab1e8688e40680f51b2dcaa15abe2e | [
"BSD-3-Clause"
] | 32 | 2021-04-26T13:04:26.000Z | 2022-03-18T16:22:13.000Z | tests/misc/test_SetValueTransformer.py | bissoligiulia/tubular | 878fa0d484ab1e8688e40680f51b2dcaa15abe2e | [
"BSD-3-Clause"
] | 15 | 2021-05-08T09:46:48.000Z | 2021-11-23T11:40:15.000Z | tests/misc/test_SetValueTransformer.py | bissoligiulia/tubular | 878fa0d484ab1e8688e40680f51b2dcaa15abe2e | [
"BSD-3-Clause"
] | 6 | 2021-05-05T08:48:00.000Z | 2021-08-17T12:31:32.000Z | import pytest
import test_aide as ta
import tests.test_data as d
import tubular
from tubular.misc import SetValueTransformer
class TestInit:
"""Tests for the SetValueTransformer.__init__ method."""
def test_arguments(self):
"""Test that init has expected arguments."""
ta.functions.test_func... | 29.607477 | 98 | 0.621212 |
56cd75421b190a5055e27abb7a8c56321a12ad87 | 576 | py | Python | elections/migrations/0053_presidentcandidate_is_active.py | zinaukarenku/zkr-platform | 8daf7d1206c482f1f8e0bcd54d4fde783e568774 | [
"Apache-2.0"
] | 2 | 2018-11-16T21:45:17.000Z | 2019-02-03T19:55:46.000Z | elections/migrations/0053_presidentcandidate_is_active.py | zinaukarenku/zkr-platform | 8daf7d1206c482f1f8e0bcd54d4fde783e568774 | [
"Apache-2.0"
] | 13 | 2018-08-17T19:12:11.000Z | 2022-03-11T23:27:41.000Z | elections/migrations/0053_presidentcandidate_is_active.py | zinaukarenku/zkr-platform | 8daf7d1206c482f1f8e0bcd54d4fde783e568774 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.1.7 on 2019-05-21 00:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('elections', '0052_europarliamentcandidateconviction_country'),
]
operations = [
migrations.AddField(
model_name='presidentcandid... | 30.315789 | 202 | 0.685764 |
b4d50258a9f6148346a7ebfb5135e91cdad12ede | 9,125 | py | Python | misc/doc/sources/conf.py | pyghassen/jasmin | d6bf0b40bb72e406bcb0dd3a56064a28efd7c6b3 | [
"Apache-2.0"
] | null | null | null | misc/doc/sources/conf.py | pyghassen/jasmin | d6bf0b40bb72e406bcb0dd3a56064a28efd7c6b3 | [
"Apache-2.0"
] | null | null | null | misc/doc/sources/conf.py | pyghassen/jasmin | d6bf0b40bb72e406bcb0dd3a56064a28efd7c6b3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import sys, os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))... | 32.130282 | 215 | 0.71463 |
7164a761484071cad13378d533dabd21bf1ef622 | 11,248 | py | Python | spark_fhir_schemas/r4/complex_types/chargeitemdefinition_propertygroup.py | imranq2/SparkFhirSchemas | 24debae6980fb520fe55aa199bdfd43c0092eb9c | [
"Apache-2.0"
] | 2 | 2020-10-31T23:25:01.000Z | 2021-06-09T14:12:42.000Z | spark_fhir_schemas/r4/complex_types/chargeitemdefinition_propertygroup.py | imranq2/SparkFhirSchemas | 24debae6980fb520fe55aa199bdfd43c0092eb9c | [
"Apache-2.0"
] | null | null | null | spark_fhir_schemas/r4/complex_types/chargeitemdefinition_propertygroup.py | imranq2/SparkFhirSchemas | 24debae6980fb520fe55aa199bdfd43c0092eb9c | [
"Apache-2.0"
] | null | null | null | from typing import Union, List, Optional
from pyspark.sql.types import StructType, StructField, StringType, ArrayType, DataType
# This file is auto-generated by generate_schema so do not edit it manually
# noinspection PyPep8Naming
class ChargeItemDefinition_PropertyGroupSchema:
"""
The ChargeItemDefinition ... | 51.59633 | 104 | 0.595484 |
c9d696262109491d489db9e26bc567a8c8e1475f | 734 | py | Python | examples/script_matplotlib.py | kwagstyl/matplotlib_surface_plotting | 5949e0a221eb63f53672b9a9dd297920f4de51a0 | [
"MIT"
] | 21 | 2020-03-23T11:56:16.000Z | 2022-03-18T04:37:04.000Z | examples/script_matplotlib.py | kwagstyl/matplotlib_surface_plotting | 5949e0a221eb63f53672b9a9dd297920f4de51a0 | [
"MIT"
] | null | null | null | examples/script_matplotlib.py | kwagstyl/matplotlib_surface_plotting | 5949e0a221eb63f53672b9a9dd297920f4de51a0 | [
"MIT"
] | 3 | 2020-03-24T16:23:55.000Z | 2021-03-10T13:02:47.000Z | import os, sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from matplotlib_surface_plotting import plot_surf
import nibabel as nb
import numpy as np
vertices, faces=nb.freesurfer.io.read_geometry('../data/lh.inflated')
overlay = nb.freesurfer.io.read_morph_data('../data/lh.thickness')... | 36.7 | 80 | 0.750681 |
f129f490c0b6e782db1e0d0da7cabb13b617e567 | 3,041 | py | Python | tools/wafadmin/3rdparty/go.py | rohankumardubey/node | d49d53fd499f7cf68fdfcc7d0c9d401e4e4407fb | [
"MIT"
] | 3 | 2015-11-08T08:52:16.000Z | 2022-03-19T07:35:26.000Z | tools/wafadmin/3rdparty/go.py | rohankumardubey/node | d49d53fd499f7cf68fdfcc7d0c9d401e4e4407fb | [
"MIT"
] | null | null | null | tools/wafadmin/3rdparty/go.py | rohankumardubey/node | d49d53fd499f7cf68fdfcc7d0c9d401e4e4407fb | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
# go.py - Waf tool for the Go programming language
# By: Tom Wambold <tom5760@gmail.com>
import platform
import Task
import Utils
from TaskGen import feature, extension, after
Task.simple_task_type('gocompile', '${GOC} ${GOCFLAGS} -o ${TGT} ${SRC}', shell=False)
Task.simple_ta... | 31.030612 | 86 | 0.730352 |
920ccf45e6b42ac11c66d6fc58806bcefda15104 | 219 | py | Python | Chap04/04_02.py | elishahyousaf/linkedin-exercise-files | d79692fd4594d5b6f70253f78e7c4822e7659a00 | [
"MIT"
] | null | null | null | Chap04/04_02.py | elishahyousaf/linkedin-exercise-files | d79692fd4594d5b6f70253f78e7c4822e7659a00 | [
"MIT"
] | null | null | null | Chap04/04_02.py | elishahyousaf/linkedin-exercise-files | d79692fd4594d5b6f70253f78e7c4822e7659a00 | [
"MIT"
] | 5 | 2021-01-15T04:13:50.000Z | 2021-02-06T02:52:42.000Z |
print("Hi!")
name = input("What's your name? ")
print("It's nice to meet you,", name)
answer = input("Are you enjoying the course? ")
if answer == "Yes":
print("That's good to hear!")
print("Final statement")
| 15.642857 | 47 | 0.630137 |
b3908c1c5d44d8061adc96e75d3b2ff298ab0b00 | 9,939 | py | Python | auth0/v3/test/management/test_users.py | Sytten/auth0-python | 59c1942acbd9723adaf587ac4bc94c9583fe38a0 | [
"MIT"
] | null | null | null | auth0/v3/test/management/test_users.py | Sytten/auth0-python | 59c1942acbd9723adaf587ac4bc94c9583fe38a0 | [
"MIT"
] | null | null | null | auth0/v3/test/management/test_users.py | Sytten/auth0-python | 59c1942acbd9723adaf587ac4bc94c9583fe38a0 | [
"MIT"
] | null | null | null | import unittest
import mock
from ...management.users import Users
class TestUsers(unittest.TestCase):
@mock.patch('auth0.v3.management.users.RestClient')
def test_list(self, mock_rc):
mock_instance = mock_rc.return_value
u = Users(domain='domain', token='jwttoken')
u.list()
... | 34.272414 | 82 | 0.596941 |
2f7139db9f37f4086a35725290d154a4e7af5353 | 1,278 | py | Python | tests/platforms/windows/msi/test_run.py | junefish/python-briefcase | 93f5c22304b3914b3c20b82e01d0a5914119faef | [
"BSD-3-Clause"
] | 917 | 2019-03-30T15:45:39.000Z | 2022-03-31T05:32:02.000Z | tests/platforms/windows/msi/test_run.py | junefish/python-briefcase | 93f5c22304b3914b3c20b82e01d0a5914119faef | [
"BSD-3-Clause"
] | 429 | 2019-04-07T19:03:20.000Z | 2022-03-31T23:47:42.000Z | tests/platforms/windows/msi/test_run.py | junefish/python-briefcase | 93f5c22304b3914b3c20b82e01d0a5914119faef | [
"BSD-3-Clause"
] | 166 | 2019-04-02T01:56:55.000Z | 2022-03-28T19:10:02.000Z | import os
from unittest import mock
import pytest
from briefcase.exceptions import BriefcaseCommandError
from briefcase.platforms.windows.msi import WindowsMSIRunCommand
def test_run_app(first_app_config, tmp_path):
"A windows MSI can be started"
command = WindowsMSIRunCommand(base_path=tmp_path)
comman... | 29.72093 | 103 | 0.679186 |
72d91f5bd001e18848e19e82dbf9abdc17a98ba9 | 6,438 | py | Python | pwrball info compile.py | mnewls/LSTM-Practice | 4666b59a43cf0b4fd1db760413afc98fcb45ef85 | [
"MIT"
] | null | null | null | pwrball info compile.py | mnewls/LSTM-Practice | 4666b59a43cf0b4fd1db760413afc98fcb45ef85 | [
"MIT"
] | null | null | null | pwrball info compile.py | mnewls/LSTM-Practice | 4666b59a43cf0b4fd1db760413afc98fcb45ef85 | [
"MIT"
] | null | null | null | from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException, NoSuchElementException
from selenium.webdriver.common.keys imp... | 27.991304 | 137 | 0.536036 |
6d3cba4796d4fc31908258729a6464beedfec6d1 | 481 | py | Python | Views.py | SarankumarJ/serversideprocessing | 3cde30613b361c88b71f91779c5001d8ad34a585 | [
"BSD-3-Clause"
] | null | null | null | Views.py | SarankumarJ/serversideprocessing | 3cde30613b361c88b71f91779c5001d8ad34a585 | [
"BSD-3-Clause"
] | null | null | null | Views.py | SarankumarJ/serversideprocessing | 3cde30613b361c88b71f91779c5001d8ad34a585 | [
"BSD-3-Clause"
] | null | null | null | from django.shortcuts import render
# Create your views here.
def areacalculation(request):
context = {}
context["area"] = "0"
context["l"] = "0"
context["b"] = "0"
if request.method == 'POST':
l= request.POST.get('length','0')
b= request.POST.get('breadth','0')
a... | 28.294118 | 52 | 0.540541 |
39a15f889dc5784e1e360b19b3027bf53c22ff90 | 1,603 | py | Python | interlink/management/commands/subscribe_members.py | czue/nadine | 61fbfcac4d0c3159aa73500e47f4fa23c0aa9ef0 | [
"Apache-2.0"
] | 1 | 2019-08-15T00:10:38.000Z | 2019-08-15T00:10:38.000Z | interlink/management/commands/subscribe_members.py | czue/nadine | 61fbfcac4d0c3159aa73500e47f4fa23c0aa9ef0 | [
"Apache-2.0"
] | null | null | null | interlink/management/commands/subscribe_members.py | czue/nadine | 61fbfcac4d0c3159aa73500e47f4fa23c0aa9ef0 | [
"Apache-2.0"
] | null | null | null | import os
import sys
import time
import urllib.request, urllib.parse, urllib.error
import logging
import datetime
logger = logging.getLogger()
from django.core.management.base import BaseCommand, CommandError
from django.contrib.auth.models import User
from interlink.models import MailingList
class Command(BaseCom... | 42.184211 | 580 | 0.724267 |
7f3ad456e16357d2a4a4b416c79731505a94744f | 2,938 | py | Python | libtbx/test_utils/python3_regression.py | hbrunie/cctbx_project | 2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5 | [
"BSD-3-Clause-LBNL"
] | null | null | null | libtbx/test_utils/python3_regression.py | hbrunie/cctbx_project | 2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5 | [
"BSD-3-Clause-LBNL"
] | null | null | null | libtbx/test_utils/python3_regression.py | hbrunie/cctbx_project | 2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5 | [
"BSD-3-Clause-LBNL"
] | null | null | null | from __future__ import absolute_import, division, print_function
import os
def find_new_python3_incompatible_code(module_under_test):
'''
Check source code to see if any files violate Python 3 syntax that
previously did not. Example call:
def test_find_python3_violations():
import xia2
impo... | 39.173333 | 153 | 0.698775 |
d5e6ac9339df56186b115d94268a6d726afa1197 | 214 | py | Python | src/myproject/wsgi.py | MrRightHand97/hoc_git2 | 867cb10b35860ed6b18cc4e2f00dda8e78ea84be | [
"MIT"
] | null | null | null | src/myproject/wsgi.py | MrRightHand97/hoc_git2 | 867cb10b35860ed6b18cc4e2f00dda8e78ea84be | [
"MIT"
] | null | null | null | src/myproject/wsgi.py | MrRightHand97/hoc_git2 | 867cb10b35860ed6b18cc4e2f00dda8e78ea84be | [
"MIT"
] | null | null | null | """
WSGI config for myproject project.
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myproject.settings')
application = get_wsgi_application()
| 17.833333 | 69 | 0.794393 |
87962c3cc759c94f26d54d518030ea81020dd96a | 6,893 | py | Python | Scripts/txt2ctf.py | Wootai/CNTK | 5eca042341c8152594e67652a44c3b733a2acaa0 | [
"RSA-MD"
] | 5 | 2017-08-28T08:27:18.000Z | 2021-04-20T21:12:52.000Z | Scripts/txt2ctf.py | zhuyawen/CNTK | 0ee09cf771bda9d4912790e0fed7322e89d86d87 | [
"RSA-MD"
] | null | null | null | Scripts/txt2ctf.py | zhuyawen/CNTK | 0ee09cf771bda9d4912790e0fed7322e89d86d87 | [
"RSA-MD"
] | 3 | 2019-08-23T11:42:14.000Z | 2022-01-06T08:41:32.000Z | #!/usr/bin/env python
# This script takes a list of dictionary files and a plain text utf-8 file and converts this text input file to CNTK text format.
#
# The input text file must contain N streams per line (N TAB-separated "columns") and should be accompanied by N dictionary files.
# The input text file must be in t... | 45.953333 | 143 | 0.631365 |
8ca4a2f361a8ce7b3083a6a3d4de23bda7e0abf0 | 20,495 | py | Python | src/k8s-extension/azext_k8s_extension/vendored_sdks/v2021_03_01/aio/operations/_source_control_configurations_operations.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | src/k8s-extension/azext_k8s_extension/vendored_sdks/v2021_03_01/aio/operations/_source_control_configurations_operations.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | 9 | 2022-03-25T19:35:49.000Z | 2022-03-31T06:09:47.000Z | src/k8s-extension/azext_k8s_extension/vendored_sdks/v2021_03_01/aio/operations/_source_control_configurations_operations.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | 1 | 2022-03-10T22:13:02.000Z | 2022-03-10T22:13:02.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 50.730198 | 288 | 0.697926 |
76114227dea45e2774c5ea58d11547cf90d1f39c | 2,443 | py | Python | toolkit/tamr_aligner/system/misc.py | shamy1997/HIT-SCIR-CoNLL2019 | 48a0a0429bae18968efaffbe6e5c97344e1d8ff1 | [
"Apache-2.0"
] | 24 | 2019-10-07T12:38:00.000Z | 2021-09-28T06:44:56.000Z | toolkit/tamr_aligner/system/misc.py | shamy1997/HIT-SCIR-CoNLL2019 | 48a0a0429bae18968efaffbe6e5c97344e1d8ff1 | [
"Apache-2.0"
] | 13 | 2020-01-14T13:26:37.000Z | 2020-09-21T11:35:11.000Z | toolkit/tamr_aligner/system/misc.py | shamy1997/HIT-SCIR-CoNLL2019 | 48a0a0429bae18968efaffbe6e5c97344e1d8ff1 | [
"Apache-2.0"
] | 10 | 2019-10-09T07:14:05.000Z | 2020-12-11T19:02:13.000Z | #!/usr/bin/env python
from __future__ import print_function
from __future__ import unicode_literals
import sys
from datetime import datetime
_DATE_FORMATS = {
'%y0000': (True, False, False),
'%y%m00': (True, True, False),
'%y%m%d': (True, True, True),
'%Y0000': (True, False, False),
'%Y%m00': (True,... | 29.792683 | 87 | 0.535407 |
58a31a0a5d2f788e2a08726a79686f629c7b6eca | 8,925 | py | Python | plugins/hdfs_assetstore/server/assetstore.py | data-exp-lab/girder | 25e5847eaefec75f02c83f8d46aa55dcc59acb01 | [
"Apache-2.0"
] | 1 | 2019-11-14T18:13:26.000Z | 2019-11-14T18:13:26.000Z | plugins/hdfs_assetstore/server/assetstore.py | data-exp-lab/girder | 25e5847eaefec75f02c83f8d46aa55dcc59acb01 | [
"Apache-2.0"
] | 3 | 2018-11-15T19:52:40.000Z | 2022-02-14T21:56:22.000Z | plugins/hdfs_assetstore/server/assetstore.py | data-exp-lab/girder | 25e5847eaefec75f02c83f8d46aa55dcc59acb01 | [
"Apache-2.0"
] | 3 | 2018-05-21T19:45:19.000Z | 2019-04-08T19:53:07.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware Inc.
#
# Licensed under the Apache License, Version 2.0 ( the "License" );
# you may not use this file except in compliance with the License.
# You may obtain a copy of ... | 35.7 | 80 | 0.561345 |
b3e9af9a599f13497d4bf86bac6c14f6fd6413ad | 6,691 | py | Python | sabnzbd/articlecache.py | pcjacobse/sabnzbd | 494e72a9963a1810e69f4e0f69df7c9dfb9256b0 | [
"0BSD",
"PSF-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause"
] | null | null | null | sabnzbd/articlecache.py | pcjacobse/sabnzbd | 494e72a9963a1810e69f4e0f69df7c9dfb9256b0 | [
"0BSD",
"PSF-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause"
] | null | null | null | sabnzbd/articlecache.py | pcjacobse/sabnzbd | 494e72a9963a1810e69f4e0f69df7c9dfb9256b0 | [
"0BSD",
"PSF-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python -OO
# Copyright 2008-2017 The SABnzbd-Team <team@sabnzbd.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later... | 34.312821 | 93 | 0.619937 |
78d3cd75fbc148d0f5f79dc0122ac646f29d5cf1 | 2,898 | py | Python | lasing.py | Marshblocker/lasing | 6b664a568c12e2494c35aa4a13e981ffc55dd542 | [
"MIT"
] | null | null | null | lasing.py | Marshblocker/lasing | 6b664a568c12e2494c35aa4a13e981ffc55dd542 | [
"MIT"
] | null | null | null | lasing.py | Marshblocker/lasing | 6b664a568c12e2494c35aa4a13e981ffc55dd542 | [
"MIT"
] | null | null | null | from os import system
from time import sleep
from typing import NewType, TypedDict
import random
GRID_CHAR = '*'
BOARD_WIDTH = 80
BOARD_HEIGHT = 40
class Walker(TypedDict):
pos: list[int]
free: bool
Traversed = bool
BoardType = NewType("BoardType", list[list[Traversed]])
WalkersType = NewT... | 27.6 | 77 | 0.503796 |
3092ec169a646e317504bfb1438b815c6dc1ccaf | 9,761 | py | Python | fanficfare/adapters/adapter_siyecouk.py | chocolatechipcats/FanFicFare | 3874878e9548a250ceb672d88f579f02994f56cc | [
"Apache-2.0"
] | null | null | null | fanficfare/adapters/adapter_siyecouk.py | chocolatechipcats/FanFicFare | 3874878e9548a250ceb672d88f579f02994f56cc | [
"Apache-2.0"
] | null | null | null | fanficfare/adapters/adapter_siyecouk.py | chocolatechipcats/FanFicFare | 3874878e9548a250ceb672d88f579f02994f56cc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2011 Fanficdownloader team, 2020 FanFicFare 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
#
# Un... | 40.334711 | 133 | 0.594304 |
a57a8fbed9930e7770c694430f28667ab642602c | 10,255 | py | Python | challenge.py | Melody-Lii/Movies-ETL | cf2568ac3dac8d82286d9dfab5a01a3c059ec24e | [
"MIT"
] | null | null | null | challenge.py | Melody-Lii/Movies-ETL | cf2568ac3dac8d82286d9dfab5a01a3c059ec24e | [
"MIT"
] | null | null | null | challenge.py | Melody-Lii/Movies-ETL | cf2568ac3dac8d82286d9dfab5a01a3c059ec24e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[13]:
import json
import pandas as pd
import numpy as np
import time
import re
from sqlalchemy import create_engine
import psycopg2
from config import db_password
def clean_movie(movie):
movie = dict(movie) #create a non-destructive copy
alt_titles = {}
#... | 42.028689 | 181 | 0.633642 |
1847a8c4ef679740afba8ec8ca86b5d21d5f3e94 | 808 | py | Python | haystack_test/config/urls.py | salmanwahed/haystack-test-project | 2fa0b4c0151456637099e81d3394dde800df79e9 | [
"Apache-2.0"
] | null | null | null | haystack_test/config/urls.py | salmanwahed/haystack-test-project | 2fa0b4c0151456637099e81d3394dde800df79e9 | [
"Apache-2.0"
] | null | null | null | haystack_test/config/urls.py | salmanwahed/haystack-test-project | 2fa0b4c0151456637099e81d3394dde800df79e9 | [
"Apache-2.0"
] | null | null | null | """haystack_test URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Cla... | 35.130435 | 77 | 0.700495 |
2aaa1595540aaf1082de4ecf1dbc51c11518ce65 | 1,306 | py | Python | examples/gaussian_mixture.py | gmourier/MLAlgorithms | b6d1489cef7ebaa5603cec8564e0e3543419669b | [
"MIT"
] | null | null | null | examples/gaussian_mixture.py | gmourier/MLAlgorithms | b6d1489cef7ebaa5603cec8564e0e3543419669b | [
"MIT"
] | null | null | null | examples/gaussian_mixture.py | gmourier/MLAlgorithms | b6d1489cef7ebaa5603cec8564e0e3543419669b | [
"MIT"
] | 1 | 2022-02-15T21:30:18.000Z | 2022-02-15T21:30:18.000Z | import random
import numpy as np
import matplotlib.pyplot as plt
from sklearn import datasets
from mla.kmeans import KMeans
from mla.gaussian_mixture import GaussianMixture
random.seed(1)
np.random.seed(6)
def make_clusters(skew=True, *arg, **kwargs):
X, y = datasets.make_blobs(*arg, **kwargs)
if skew:
... | 26.653061 | 92 | 0.6317 |
42419702eee24bfa046a2a4461b152965a1f24ea | 2,220 | py | Python | tools/aicity20/vis_result.py | Johere/AICity2020-VOC-ReID | 21268535595c8c90b87cd1ee89ddbcb341a86d76 | [
"MIT"
] | 100 | 2020-04-25T03:58:01.000Z | 2022-03-30T18:24:17.000Z | tools/aicity20/vis_result.py | hanleiyu/prcv | df5ad9469b38b8176121357fe5de2b1cf30aae1c | [
"MIT"
] | 30 | 2020-04-27T07:15:00.000Z | 2022-01-03T19:49:49.000Z | tools/aicity20/vis_result.py | hanleiyu/prcv | df5ad9469b38b8176121357fe5de2b1cf30aae1c | [
"MIT"
] | 25 | 2020-04-25T22:53:30.000Z | 2022-03-28T00:46:51.000Z | import numpy as np
import cv2
import os
import sys
sys.path.append('.')
from lib.data.datasets.aicity20_trainval import AICity20Trainval
def visualize_submit(dataset, out_dir, submit_txt_path, topk=5):
query_dir = dataset.query_dir
gallery_dir = dataset.gallery_dir
vis_size = (256, 256)
if not os.pat... | 35.238095 | 84 | 0.636937 |
55fe123b03c8b885e313e01741da048dccfd9e5f | 700 | py | Python | migrations/versions/0a63dc36c3b2_add_column_pass_secure_for_storing_.py | carolwanjohi/watchlist | ae15964bb272b834b57e6856bcdd4f9b8ce1d2a6 | [
"MIT"
] | null | null | null | migrations/versions/0a63dc36c3b2_add_column_pass_secure_for_storing_.py | carolwanjohi/watchlist | ae15964bb272b834b57e6856bcdd4f9b8ce1d2a6 | [
"MIT"
] | null | null | null | migrations/versions/0a63dc36c3b2_add_column_pass_secure_for_storing_.py | carolwanjohi/watchlist | ae15964bb272b834b57e6856bcdd4f9b8ce1d2a6 | [
"MIT"
] | null | null | null | """Add column pass_secure for storing passwords
Revision ID: 0a63dc36c3b2
Revises: e34c84c48c61
Create Date: 2017-10-23 16:38:02.302281
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '0a63dc36c3b2'
down_revision = 'e34c84c48c61'
branch_labels = None
depends_on... | 24.137931 | 90 | 0.704286 |
706897bd914e8bfd349f17d449f8fbbec7a79000 | 5,964 | py | Python | graph_embedding/dmon/utilities/graph.py | DionysisChristopoulos/google-research | 7f59ef421beef32ca16c2a7215be74f7eba01a0f | [
"Apache-2.0"
] | 23,901 | 2018-10-04T19:48:53.000Z | 2022-03-31T21:27:42.000Z | graph_embedding/dmon/utilities/graph.py | DionysisChristopoulos/google-research | 7f59ef421beef32ca16c2a7215be74f7eba01a0f | [
"Apache-2.0"
] | 891 | 2018-11-10T06:16:13.000Z | 2022-03-31T10:42:34.000Z | graph_embedding/dmon/utilities/graph.py | admariner/google-research | 7cee4b22b925581d912e8d993625c180da2a5a4f | [
"Apache-2.0"
] | 6,047 | 2018-10-12T06:31:02.000Z | 2022-03-31T13:59:28.000Z | # coding=utf-8
# Copyright 2021 The Google Research 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 applicab... | 34.08 | 96 | 0.682596 |
dfef23651c8de08e952a3336cf1ce12511d4911d | 15,110 | py | Python | pyscf/prop/polarizability/uhf.py | pavanell/pyscf | c0d19e499685e95dbf4c879539ad3a3ceb6934e2 | [
"Apache-2.0"
] | 2 | 2019-05-28T05:25:56.000Z | 2019-11-09T02:16:43.000Z | pyscf/prop/polarizability/uhf.py | pavanell/pyscf | c0d19e499685e95dbf4c879539ad3a3ceb6934e2 | [
"Apache-2.0"
] | 2 | 2019-09-16T17:58:31.000Z | 2019-09-22T17:26:01.000Z | pyscf/prop/polarizability/uhf.py | pavanell/pyscf | c0d19e499685e95dbf4c879539ad3a3ceb6934e2 | [
"Apache-2.0"
] | 2 | 2020-06-01T05:31:38.000Z | 2022-02-08T02:38:33.000Z | #!/usr/bin/env python
# Copyright 2014-2019 The PySCF Developers. 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
#
# U... | 36.674757 | 88 | 0.59325 |
3e410612bdd682001e01183ffbb9915e5bcb609c | 4,357 | py | Python | functions/notify_slack.py | kabisa/terraform-aws-notify-slack | 560695f55f0a0e4d61934eca2ee9cd371b50f124 | [
"Apache-2.0"
] | null | null | null | functions/notify_slack.py | kabisa/terraform-aws-notify-slack | 560695f55f0a0e4d61934eca2ee9cd371b50f124 | [
"Apache-2.0"
] | null | null | null | functions/notify_slack.py | kabisa/terraform-aws-notify-slack | 560695f55f0a0e4d61934eca2ee9cd371b50f124 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import os, boto3, json, base64
import urllib.request, urllib.parse
import logging
# Decrypt encrypted URL with KMS
def decrypt(encrypted_url):
region = os.environ['AWS_REGION']
try:
kms = boto3.client('kms', region_name=region)
plaintext = kms.decrypt(Ciphe... | 37.560345 | 284 | 0.616479 |
9e699202db58b6fd48063e0da33a56d017f3cd4b | 3,759 | py | Python | google/ads/googleads/v4/services/services/hotel_performance_view_service/transports/base.py | batardo/google-ads-python | a39748521847e85138fca593f3be2681352ad024 | [
"Apache-2.0"
] | null | null | null | google/ads/googleads/v4/services/services/hotel_performance_view_service/transports/base.py | batardo/google-ads-python | a39748521847e85138fca593f3be2681352ad024 | [
"Apache-2.0"
] | null | null | null | google/ads/googleads/v4/services/services/hotel_performance_view_service/transports/base.py | batardo/google-ads-python | a39748521847e85138fca593f3be2681352ad024 | [
"Apache-2.0"
] | null | null | null | # -*- 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... | 35.130841 | 78 | 0.681564 |
f6f0978e29133d31324834ede837c8aa68771d8f | 1,184 | py | Python | textless/data/collater_utils.py | an918tw/textlesslib | d9fcccefbd76b5d6dc6f1df0b8c743e730038f1f | [
"MIT"
] | 198 | 2022-02-14T21:48:11.000Z | 2022-03-31T22:49:30.000Z | textless/data/collater_utils.py | an918tw/textlesslib | d9fcccefbd76b5d6dc6f1df0b8c743e730038f1f | [
"MIT"
] | 2 | 2022-03-07T16:52:30.000Z | 2022-03-17T01:12:47.000Z | textless/data/collater_utils.py | an918tw/textlesslib | d9fcccefbd76b5d6dc6f1df0b8c743e730038f1f | [
"MIT"
] | 9 | 2022-02-16T09:43:04.000Z | 2022-03-31T23:55:43.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import torch
def collate_tensors(stream, pad):
"""
>>> tensors = [torch.tensor(x) for x in [[1,2,3], [1]]]
>>> pad = 0
>>> c... | 25.73913 | 65 | 0.599662 |
74a16987f6f7e48405d780e1b5cd78b0d1176988 | 5,174 | py | Python | lib/matplotlib/testing/jpl_units/StrConverter.py | pierre-haessig/matplotlib | 0d945044ca3fbf98cad55912584ef80911f330c6 | [
"MIT",
"PSF-2.0",
"BSD-3-Clause"
] | 35 | 2015-10-23T08:15:36.000Z | 2022-02-03T10:17:15.000Z | lib/matplotlib/testing/jpl_units/StrConverter.py | pierre-haessig/matplotlib | 0d945044ca3fbf98cad55912584ef80911f330c6 | [
"MIT",
"PSF-2.0",
"BSD-3-Clause"
] | 3 | 2015-09-17T16:27:45.000Z | 2018-07-31T05:59:33.000Z | lib/matplotlib/testing/jpl_units/StrConverter.py | pierre-haessig/matplotlib | 0d945044ca3fbf98cad55912584ef80911f330c6 | [
"MIT",
"PSF-2.0",
"BSD-3-Clause"
] | 25 | 2016-01-18T12:19:11.000Z | 2021-12-11T15:45:17.000Z | #===========================================================================
#
# StrConverter
#
#===========================================================================
"""StrConverter module containing class StrConverter."""
#===========================================================================
# Place al... | 32.136646 | 79 | 0.536336 |
225758df209fdc21d3d7b5373f0662b169f6ecec | 3,111 | py | Python | data_utils.py | BloomBabe/Underwater-Enhancing | 6154cd11c402fdc3f353dee9dc7c4166a1f36751 | [
"MIT"
] | 2 | 2021-02-18T04:10:31.000Z | 2021-03-04T05:27:58.000Z | data_utils.py | BloomBabe/Underwater-Enhancing | 6154cd11c402fdc3f353dee9dc7c4166a1f36751 | [
"MIT"
] | null | null | null | data_utils.py | BloomBabe/Underwater-Enhancing | 6154cd11c402fdc3f353dee9dc7c4166a1f36751 | [
"MIT"
] | 1 | 2021-03-04T05:27:59.000Z | 2021-03-04T05:27:59.000Z | import numpy as np
import torch
import random
from skimage import io, transform
import torch.nn.functional as F
from torchvision import transforms
torch.manual_seed(17)
random.seed(42)
class Resize(object):
"""Rescale the image in a sample to a given size.
Args:
output_size (tuple or int): Desired ou... | 33.815217 | 77 | 0.643202 |
3c89e384fcde93261eb1c4457aea9ecd50c9324b | 6,771 | py | Python | create-toc.py | the-codeslinger/music-management-scripts | a35d568e5fc550d5444db59448844980a44e1cbc | [
"Apache-2.0"
] | 1 | 2019-07-06T08:07:28.000Z | 2019-07-06T08:07:28.000Z | create-toc.py | the-codeslinger/music-management-scripts | a35d568e5fc550d5444db59448844980a44e1cbc | [
"Apache-2.0"
] | null | null | null | create-toc.py | the-codeslinger/music-management-scripts | a35d568e5fc550d5444db59448844980a44e1cbc | [
"Apache-2.0"
] | null | null | null | # Scan directories for audio files with a given extension and read the
# meta data from the file"s name to create a table of contents JSON
# file from that information. This file can later be used by
# conversion tools/scripts.
#
# Usage example:
# python3 create-toc.py \
# -s Music \
# -d "#" \
# ... | 32.552885 | 120 | 0.678482 |
1084e40fa035a9f1746cd3192dd7b12b238dae76 | 5,035 | py | Python | alert_service_sdk/model/inspection/val_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | 5 | 2019-07-31T04:11:05.000Z | 2021-01-07T03:23:20.000Z | alert_service_sdk/model/inspection/val_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | alert_service_sdk/model/inspection/val_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: val.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import ... | 43.034188 | 505 | 0.753923 |
56474489db784a9641bcbf3b40ee07c8c756e390 | 550 | py | Python | cnlp_annotator/task_center/task_center_webapi/manage.py | szj2ys/cnlp_annotator | 1837d952a73ffe97b0e5c3523d51896e92572ce1 | [
"Apache-2.0"
] | 915 | 2018-07-25T07:30:27.000Z | 2022-03-25T14:09:17.000Z | cnlp_annotator/task_center/task_center_webapi/manage.py | szj2ys/cnlp_annotator | 1837d952a73ffe97b0e5c3523d51896e92572ce1 | [
"Apache-2.0"
] | 20 | 2018-10-12T15:48:56.000Z | 2021-09-27T09:12:01.000Z | cnlp_annotator/task_center/task_center_webapi/manage.py | szj2ys/cnlp_annotator | 1837d952a73ffe97b0e5c3523d51896e92572ce1 | [
"Apache-2.0"
] | 204 | 2018-07-30T06:52:29.000Z | 2022-03-03T15:18:39.000Z | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "task_center_webapi.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import D... | 34.375 | 82 | 0.692727 |
177a19b9c71cf4c467d6c933abacbd9faf1d7259 | 4,086 | py | Python | polydomino/app.py | PsiACE/polydomino | ade7cdb303cb4073d8c075659a5494392d31f8b4 | [
"MIT"
] | null | null | null | polydomino/app.py | PsiACE/polydomino | ade7cdb303cb4073d8c075659a5494392d31f8b4 | [
"MIT"
] | null | null | null | polydomino/app.py | PsiACE/polydomino | ade7cdb303cb4073d8c075659a5494392d31f8b4 | [
"MIT"
] | null | null | null | import os
import sys
import time
from datetime import timedelta
import cv2
from dotenv import find_dotenv, load_dotenv
from flask import Flask, jsonify, render_template, request
from werkzeug.utils import secure_filename
from colordescriptor import ColorDescriptor
from searcher import Searcher
load_dotenv(find_doten... | 26.36129 | 103 | 0.615027 |
ddb8fec7f1bc312c6beebb7a5ed95a8e6fabcb44 | 3,126 | py | Python | app/routes/flush.py | petechd/eq-questionnaire-runner | 1c5b182a7f8bc878cfdd767ae080410fa679abd6 | [
"MIT"
] | null | null | null | app/routes/flush.py | petechd/eq-questionnaire-runner | 1c5b182a7f8bc878cfdd767ae080410fa679abd6 | [
"MIT"
] | null | null | null | app/routes/flush.py | petechd/eq-questionnaire-runner | 1c5b182a7f8bc878cfdd767ae080410fa679abd6 | [
"MIT"
] | null | null | null | from flask import Blueprint, Response, current_app, request, session
from sdc.crypto.decrypter import decrypt
from sdc.crypto.encrypter import encrypt
from structlog import get_logger
from app.authentication.user import User
from app.globals import get_answer_store, get_metadata, get_questionnaire_store
from app.keys ... | 32.226804 | 83 | 0.712412 |
c952e3e103322bf46aa65d8578978aed5398af2f | 104 | py | Python | invent-your-own-computer-games-with-python/hello.py | learning-game-development/learning-python-game-development | 326b72eadab0bfb14f70f295b492f76d139dde33 | [
"Unlicense"
] | null | null | null | invent-your-own-computer-games-with-python/hello.py | learning-game-development/learning-python-game-development | 326b72eadab0bfb14f70f295b492f76d139dde33 | [
"Unlicense"
] | null | null | null | invent-your-own-computer-games-with-python/hello.py | learning-game-development/learning-python-game-development | 326b72eadab0bfb14f70f295b492f76d139dde33 | [
"Unlicense"
] | null | null | null | print("Hello world!")
print("What is your name?")
name = input()
print("It is good to meet you,", name)
| 20.8 | 38 | 0.663462 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.