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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e5d4e890453ea8e5fbfe2ebf50562df166f5e0a9 | 81 | py | Python | SimPEG/utils/codeutils.py | jcapriot/simpeg | e88e653673c6b818592b6c075f76ee9215fe82b7 | [
"MIT"
] | 1 | 2021-08-07T13:50:54.000Z | 2021-08-07T13:50:54.000Z | SimPEG/utils/codeutils.py | jcapriot/simpeg | e88e653673c6b818592b6c075f76ee9215fe82b7 | [
"MIT"
] | null | null | null | SimPEG/utils/codeutils.py | jcapriot/simpeg | e88e653673c6b818592b6c075f76ee9215fe82b7 | [
"MIT"
] | 1 | 2021-01-05T18:16:54.000Z | 2021-01-05T18:16:54.000Z | from .code_utils import *
deprecate_module("codeutils", "code_utils", "0.15.0")
| 20.25 | 53 | 0.728395 |
b6aa8e7f83f7945189678e3be7661d376ffdb8e6 | 1,629 | py | Python | python_project_template/__main__.py | bonginc/python-project-template | 44a9fc82f682f8af3e2fb0a0d360845d0eb8e1c4 | [
"Unlicense"
] | null | null | null | python_project_template/__main__.py | bonginc/python-project-template | 44a9fc82f682f8af3e2fb0a0d360845d0eb8e1c4 | [
"Unlicense"
] | null | null | null | python_project_template/__main__.py | bonginc/python-project-template | 44a9fc82f682f8af3e2fb0a0d360845d0eb8e1c4 | [
"Unlicense"
] | null | null | null | import argparse # pragma: no cover
from . import BaseClass, base_function # pragma: no cover
def main() -> None: # pragma: no cover
"""
The main function executes on commands:
`python -m python_project_template` and `$ python_project_template `.
This is your program's entry point.
You can ch... | 26.274194 | 73 | 0.605893 |
e9f0f292ee2a55f5c2bf5289530cbd8afeb12c80 | 4,100 | py | Python | synapse/util/httpresourcetree.py | TheJJ/synapse | 1032393dfb0c865fc540539dfe649e7b1a32037a | [
"Apache-2.0"
] | null | null | null | synapse/util/httpresourcetree.py | TheJJ/synapse | 1032393dfb0c865fc540539dfe649e7b1a32037a | [
"Apache-2.0"
] | null | null | null | synapse/util/httpresourcetree.py | TheJJ/synapse | 1032393dfb0c865fc540539dfe649e7b1a32037a | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 OpenMarket Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | 40.196078 | 75 | 0.66561 |
fe8ae5a09415d01a11e72d657457cf51cdcf56e7 | 165 | py | Python | itlo/admin.py | varundey/itlo | a7b0d46aa1ce2a0163ba0deda44ee2f9ebac5039 | [
"MIT"
] | 1 | 2016-07-13T16:15:44.000Z | 2016-07-13T16:15:44.000Z | itlo/admin.py | varundey/itlo | a7b0d46aa1ce2a0163ba0deda44ee2f9ebac5039 | [
"MIT"
] | null | null | null | itlo/admin.py | varundey/itlo | a7b0d46aa1ce2a0163ba0deda44ee2f9ebac5039 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import State
from .models import Keys
# Register your models here.
admin.site.register(State)
admin.site.register(Keys) | 27.5 | 32 | 0.812121 |
2fc6374cc3d28df0445ba7399bf6f32d405422a2 | 444 | py | Python | addons/mail/wizard/mail_blacklist_remove.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | addons/mail/wizard/mail_blacklist_remove.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | addons/mail/wizard/mail_blacklist_remove.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from odoo import fields, models
class MailBlacklistRemove(models.TransientModel):
_name = 'mail.blacklist.remove'
_description = 'Remove email from blacklist wizard'
email = fields.Char(name="Email", readonly=True, required=True)
reason = fields.Char(name="Reason")
def a... | 29.6 | 92 | 0.722973 |
dc455c5d60499b8042e72a0e0291dd6cf7a6aff5 | 273 | py | Python | test.py | Plawn/Fancy_progressbar | cda9b59475c8ce2786a46a41d06b33b4cf217f7d | [
"Apache-2.0"
] | 2 | 2018-11-26T16:09:15.000Z | 2021-01-09T14:25:35.000Z | test.py | Plawn/Fancy_progressbar | cda9b59475c8ce2786a46a41d06b33b4cf217f7d | [
"Apache-2.0"
] | null | null | null | test.py | Plawn/Fancy_progressbar | cda9b59475c8ce2786a46a41d06b33b4cf217f7d | [
"Apache-2.0"
] | null | null | null | import Fancy_progressbar as fp
import random as rd
import time
def get_progress():
return 100 * rd.random()
b = fp.ProgressBar('test', 'kill_when_finished', 'animated')
b.use_progress(get_progress)
bh = fp.ProgressBarHandler([b])
bh.start()
time.sleep(3)
b.finish() | 18.2 | 60 | 0.736264 |
65a20553c2d44a4a3c2c0c8a7e1f6b7bce2a45a8 | 5,626 | py | Python | kaleidoscope.py | ES-Alexander/kaleidoscope | 86d367333acffbe9bfd950f03bd83a0d2b69beab | [
"MIT"
] | 1 | 2021-02-25T04:59:17.000Z | 2021-02-25T04:59:17.000Z | kaleidoscope.py | ES-Alexander/kaleidoscope | 86d367333acffbe9bfd950f03bd83a0d2b69beab | [
"MIT"
] | null | null | null | kaleidoscope.py | ES-Alexander/kaleidoscope | 86d367333acffbe9bfd950f03bd83a0d2b69beab | [
"MIT"
] | 1 | 2022-01-02T17:12:32.000Z | 2022-01-02T17:12:32.000Z | #!/usr/bin/env python3
import cv2
import numpy as np
def core(img, N, out, r_start, r_out, c_in, c_out, scale):
in_rows, in_cols = img.shape[:2]
if c_in is None:
c_in = (dim // 2 for dim in (in_rows, in_cols))
c_y, c_x = c_in
r_start %= 2 * np.pi
width = np.pi / N
r_end = r_start + wi... | 38.013514 | 79 | 0.572343 |
354485b6623b608a5ed68237e299682d7e9dcffe | 12,233 | py | Python | examples/demo_all.py | hawthorne-stephen-kelley/python-nvd3 | fd5d82481500dc72a45e254b74977edcfdacf845 | [
"MIT"
] | 1 | 2019-10-03T23:29:06.000Z | 2019-10-03T23:29:06.000Z | examples/demo_all.py | hawthorne-stephen-kelley/python-nvd3 | fd5d82481500dc72a45e254b74977edcfdacf845 | [
"MIT"
] | null | null | null | examples/demo_all.py | hawthorne-stephen-kelley/python-nvd3 | fd5d82481500dc72a45e254b74977edcfdacf845 | [
"MIT"
] | 2 | 2016-12-29T04:28:38.000Z | 2019-12-03T02:02:11.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Examples for Python-nvd3 is a Python wrapper for NVD3 graph library.
NVD3 is an attempt to build re-usable charts and chart components
for d3.js without taking away the power that d3.js gives you.
Project location : https://github.com/areski/python-nvd3
"""
from nvd3 imp... | 37.182371 | 100 | 0.643015 |
5b52804433b33de7b899971af7c7e8683d2daafc | 1,102 | py | Python | 2020/src/day2.py | Sujatha-Nagarajan/AdventOfCode | afce23c74fd0a72caa29c1604a582b21806e794e | [
"CC0-1.0"
] | 1 | 2020-12-05T06:14:37.000Z | 2020-12-05T06:14:37.000Z | 2020/src/day2.py | Sujatha-Nagarajan/AdventOfCode | afce23c74fd0a72caa29c1604a582b21806e794e | [
"CC0-1.0"
] | null | null | null | 2020/src/day2.py | Sujatha-Nagarajan/AdventOfCode | afce23c74fd0a72caa29c1604a582b21806e794e | [
"CC0-1.0"
] | null | null | null | final_valid_count_a = 0
final_valid_count_b = 0
with open("../input/day2.txt","r") as file:
entries = file.readlines()
for e in entries:
items = e.split(' ')
min_value,max_value = items[0].split('-')
letter = items[1][0]
password = items[2]
# first puzzle
... | 28.25641 | 93 | 0.569873 |
a0925733a5321e428b8a5a06fcfcb13b2cfe2edb | 1,078 | py | Python | mglib/wrapper.py | mohammed-Emad/mglib | 22f5fd6d4a584b01d595c9cc6fffb8fe6b01597c | [
"Apache-2.0"
] | 45 | 2021-01-10T14:33:52.000Z | 2022-03-27T14:02:56.000Z | mglib/wrapper.py | mohammed-Emad/mglib | 22f5fd6d4a584b01d595c9cc6fffb8fe6b01597c | [
"Apache-2.0"
] | 8 | 2021-01-08T20:02:21.000Z | 2022-02-01T13:12:24.000Z | mglib/wrapper.py | mohammed-Emad/mglib | 22f5fd6d4a584b01d595c9cc6fffb8fe6b01597c | [
"Apache-2.0"
] | 12 | 2021-01-07T20:03:07.000Z | 2022-03-24T04:07:51.000Z | import logging
import subprocess
logger = logging.getLogger(__name__)
class Wrapper:
def __init__(self, exec_name, check=True, dry_run=False):
self.exec_name = exec_name
self.check = check,
# usefull for debugging purpose
self.dry_run = dry_run
def get_cmd(self):
cmd... | 21.56 | 61 | 0.538033 |
5e30e4868679bf252840bd67adf964e277a7aa1a | 3,143 | py | Python | process-liuk-entities.py | timofeic/life-uk-test | 9ae14d465eb44d8dc061d15772e569dc9f99197b | [
"MIT"
] | null | null | null | process-liuk-entities.py | timofeic/life-uk-test | 9ae14d465eb44d8dc061d15772e569dc9f99197b | [
"MIT"
] | null | null | null | process-liuk-entities.py | timofeic/life-uk-test | 9ae14d465eb44d8dc061d15772e569dc9f99197b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
import sys
import csv
from ast import literal_eval
def checkScore(value):
if 0 <= value <= 1:
return True
sys.exit("Invalid score, please specify a number between 0 and 1 e.g. 0.855")
# Given a list of words, return a dictionary of
# word-frequency pairs.
# Sou... | 37.416667 | 117 | 0.571429 |
1658cb38883954c28c8beeb9d862867018aac0bd | 1,052 | py | Python | examples/response/alert_bulk_resolve.py | rathnadeep/cbapi-python | 55375d8796a9d88d00bd16df13d71a2d8d76dd9c | [
"MIT"
] | 3 | 2019-01-23T19:11:33.000Z | 2022-02-25T02:06:51.000Z | examples/response/alert_bulk_resolve.py | rathnadeep/cbapi-python | 55375d8796a9d88d00bd16df13d71a2d8d76dd9c | [
"MIT"
] | 1 | 2021-03-31T19:51:07.000Z | 2021-03-31T19:51:07.000Z | examples/response/alert_bulk_resolve.py | jjfallete/cbapi-python | 8b92584edca5605cd94afa7656fd04c282b875b8 | [
"MIT"
] | 1 | 2022-02-25T02:06:52.000Z | 2022-02-25T02:06:52.000Z | #!/usr/bin/env python
import sys
from cbapi.response.models import Alert
from cbapi.example_helpers import build_cli_parser, get_cb_response_object
import time
def main():
parser = build_cli_parser("Bulk resolve alerts")
parser.add_argument("--query", action="store", default="", required=True,
... | 28.432432 | 108 | 0.679658 |
447e21655a162991588f07bc7e14884a224f23ed | 2,320 | py | Python | appEngine-DataStore/labs/fortune-teller/start/main.py | Federickg23/cssi-labs | b5ec2c116c0d075468e8381c6656669f22a60ab3 | [
"Apache-2.0"
] | null | null | null | appEngine-DataStore/labs/fortune-teller/start/main.py | Federickg23/cssi-labs | b5ec2c116c0d075468e8381c6656669f22a60ab3 | [
"Apache-2.0"
] | null | null | null | appEngine-DataStore/labs/fortune-teller/start/main.py | Federickg23/cssi-labs | b5ec2c116c0d075468e8381c6656669f22a60ab3 | [
"Apache-2.0"
] | 1 | 2018-07-21T00:09:06.000Z | 2018-07-21T00:09:06.000Z | #!/usr/bin/python
#
# Copyright 2018 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 or ag... | 34.117647 | 79 | 0.734052 |
862e7b5bc59d3baa59e973e204700047da0f4260 | 7,330 | py | Python | python/tvm/topi/cuda/dense.py | XiaoSong9905/tvm | 48940f697e15d5b50fa1f032003e6c700ae1e423 | [
"Apache-2.0"
] | 1 | 2022-03-06T04:01:26.000Z | 2022-03-06T04:01:26.000Z | python/tvm/topi/cuda/dense.py | XiaoSong9905/tvm | 48940f697e15d5b50fa1f032003e6c700ae1e423 | [
"Apache-2.0"
] | 6 | 2022-03-23T14:15:51.000Z | 2022-03-31T14:35:57.000Z | python/tvm/topi/cuda/dense.py | XiaoSong9905/tvm | 48940f697e15d5b50fa1f032003e6c700ae1e423 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 34.252336 | 100 | 0.670941 |
aede9bb9c5474f53763675061161eba6451891a8 | 943 | py | Python | 0000_book/pickplace_xarm_grasp_planning.py | takuya-ki/wrs | f6e1009b94332504042fbde9b39323410394ecde | [
"MIT"
] | null | null | null | 0000_book/pickplace_xarm_grasp_planning.py | takuya-ki/wrs | f6e1009b94332504042fbde9b39323410394ecde | [
"MIT"
] | null | null | null | 0000_book/pickplace_xarm_grasp_planning.py | takuya-ki/wrs | f6e1009b94332504042fbde9b39323410394ecde | [
"MIT"
] | null | null | null | import visualization.panda.world as wd
import modeling.geometric_model as gm
import modeling.collision_model as cm
import grasping.planning.antipodal as gpa
import robot_sim.end_effectors.gripper.xarm_gripper.xarm_gripper as xag
base = wd.World(cam_pos=[1, 1, 1], lookat_pos=[0, 0, 0])
gm.gen_frame().attach_to(base)
ob... | 44.904762 | 144 | 0.78685 |
3223f2cea9f4b3be864aec7f2bddeaf4b2132332 | 2,024 | py | Python | options/options.py | choyingw/CFCNet | 828e0c09c646a4669685b3d31b8aa0ae2a5cd351 | [
"MIT"
] | 33 | 2019-11-27T02:09:05.000Z | 2022-03-08T11:41:28.000Z | options/options.py | Qiu731/CFCNet | 7ad0928e52767175669f3c4eb9e88fcbdd2d6b01 | [
"MIT"
] | 6 | 2019-12-18T08:59:01.000Z | 2021-07-05T21:11:05.000Z | options/options.py | Qiu731/CFCNet | 7ad0928e52767175669f3c4eb9e88fcbdd2d6b01 | [
"MIT"
] | 6 | 2019-11-20T11:27:17.000Z | 2022-03-04T10:23:44.000Z | from .base_options import BaseOptions
class AdvanceOptions(BaseOptions):
def initialize(self, parser, flag):
parser = BaseOptions.initialize(self, parser)
parser.add_argument('--print_freq', type=int, default=1, help='frequency of showing training results on console')
parser.add_argument('... | 80.96 | 173 | 0.708004 |
12b89f53c67c0d93a0d72c9ec1401de5895b7a5b | 5,082 | py | Python | satellite_constellation/GroundStation.py | samsipe/SatelliteConstellationCreator | 6acc75d652e0d34fa27c1e5bca29beb71a18b0f2 | [
"MIT"
] | 7 | 2020-08-24T08:19:54.000Z | 2021-05-24T15:37:36.000Z | satellite_constellation/GroundStation.py | samsipe/SatelliteConstellationCreator | 6acc75d652e0d34fa27c1e5bca29beb71a18b0f2 | [
"MIT"
] | 1 | 2021-05-23T10:31:29.000Z | 2021-05-23T10:34:02.000Z | satellite_constellation/GroundStation.py | samsipe/SatelliteConstellationCreator | 6acc75d652e0d34fa27c1e5bca29beb71a18b0f2 | [
"MIT"
] | 8 | 2019-12-18T04:06:25.000Z | 2021-08-22T08:42:21.000Z | import warnings
class GroundStation(object):
def __init__(self, name, lat, long, elevation, beam_width):
self.__name = name
self.__lat = lat
self.__long = long
self.__elevation = elevation
self.__beam = beam_width
@property
def name(self):
return self.__nam... | 42.35 | 114 | 0.547816 |
ba08f3f74db2cba5f0ba8ce0da9cec12bbf51da9 | 2,509 | py | Python | viewwork/forms.py | pikhovkin/django-viewwork | 65597f599ecbd0def37b04eae77017fb8f5dfbe6 | [
"MIT"
] | 4 | 2021-12-12T03:56:05.000Z | 2022-01-10T08:54:31.000Z | viewwork/forms.py | pikhovkin/django-viewwork | 65597f599ecbd0def37b04eae77017fb8f5dfbe6 | [
"MIT"
] | null | null | null | viewwork/forms.py | pikhovkin/django-viewwork | 65597f599ecbd0def37b04eae77017fb8f5dfbe6 | [
"MIT"
] | null | null | null | from operator import attrgetter, itemgetter
import sys
from django import forms
from django.apps import apps
from django.conf import settings as dj_settings
from django.db.models import BLANK_CHOICE_DASH
from django.utils.translation import gettext_lazy as _, get_language
from modeltrans.utils import build_localized_... | 34.369863 | 117 | 0.658828 |
7b07fb8f0c9d0d66ddfbb77d100a56d1ee4ba1b3 | 7,040 | py | Python | chatbotv2/my_seq2seq.py | drpreetyrai/ChatBotCourse | 352a6672a19d3692c884ff376cbe067fff37e210 | [
"MIT"
] | 5,087 | 2016-06-28T08:58:30.000Z | 2020-08-18T08:49:46.000Z | chatbotv2/my_seq2seq.py | tta1993/ChatBotCourse | 156041d51ec51842592e8a1eeda565197fe31aec | [
"MIT"
] | 28 | 2016-10-26T08:01:18.000Z | 2019-10-22T06:41:21.000Z | chatbotv2/my_seq2seq.py | tta1993/ChatBotCourse | 156041d51ec51842592e8a1eeda565197fe31aec | [
"MIT"
] | 1,691 | 2016-06-29T07:33:36.000Z | 2020-08-18T08:50:02.000Z | # -*- coding: utf-8 -*-
import sys
import math
import tflearn
import tensorflow as tf
from tensorflow.python.ops import rnn_cell
from tensorflow.python.ops import rnn
import chardet
import numpy as np
import struct
seq = []
max_w = 50
float_size = 4
word_vector_dict = {}
word_vec_dim = 200
max_seq_len = 16
def load... | 33.684211 | 155 | 0.62642 |
94b0e997afafff1613db1148e1b4d042248ffd80 | 1,477 | py | Python | utils/code_generator/time_measurement/phase_2/postprocess_programs.py | zehor-l/tiramisu | 225b30d3495bee52c0e06ed7794f402f2e58de73 | [
"MIT"
] | 23 | 2017-05-03T13:06:34.000Z | 2018-06-07T07:12:43.000Z | utils/code_generator/time_measurement/phase_2/postprocess_programs.py | zehor-l/tiramisu | 225b30d3495bee52c0e06ed7794f402f2e58de73 | [
"MIT"
] | 2 | 2017-04-25T08:59:09.000Z | 2017-05-11T16:41:55.000Z | utils/code_generator/time_measurement/phase_2/postprocess_programs.py | zehor-l/tiramisu | 225b30d3495bee52c0e06ed7794f402f2e58de73 | [
"MIT"
] | 5 | 2017-02-16T14:26:40.000Z | 2018-05-30T16:49:27.000Z | """
Fuse the files generated by the execution jobs to a single file.
The final file will be a list, where each entry has the following format :
(function_id, schedule_id, list of execution times, the median, the speedup)
"""
import pickle
import numpy as np
from pathlib import Path
# Path to the files generated by ... | 28.403846 | 83 | 0.723087 |
4556cee23ff776bf8806e5d9263552e62030f0a5 | 21,965 | py | Python | venv/lib/python3.9/site-packages/google/cloud/tasks_v2/types/target.py | qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3 | 630dcef73e6a258b6e9a52f934e2dd912ce741f8 | [
"Apache-2.0"
] | 39 | 2020-04-17T09:54:54.000Z | 2022-03-23T12:28:07.000Z | venv/lib/python3.9/site-packages/google/cloud/tasks_v2/types/target.py | qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3 | 630dcef73e6a258b6e9a52f934e2dd912ce741f8 | [
"Apache-2.0"
] | 80 | 2020-02-04T00:48:43.000Z | 2022-03-31T22:59:41.000Z | venv/lib/python3.9/site-packages/google/cloud/tasks_v2/types/target.py | qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3 | 630dcef73e6a258b6e9a52f934e2dd912ce741f8 | [
"Apache-2.0"
] | 9 | 2020-02-06T01:45:11.000Z | 2021-04-14T08:38:08.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 44.9182 | 143 | 0.660187 |
751adf6af2a7e2de015bee1d3a74ee2af03688fb | 411 | py | Python | Singleton/singleton.py | mst-solar-car/kicad-bom-generator | 2aae905056d06f3d25343a8d784049c141d05640 | [
"MIT"
] | 3 | 2018-02-26T12:31:41.000Z | 2020-10-10T14:14:11.000Z | Singleton/singleton.py | mst-solar-car/kicad-bom-generator | 2aae905056d06f3d25343a8d784049c141d05640 | [
"MIT"
] | null | null | null | Singleton/singleton.py | mst-solar-car/kicad-bom-generator | 2aae905056d06f3d25343a8d784049c141d05640 | [
"MIT"
] | null | null | null | class Singleton:
def __init__(self, decorated):
self._decorated = decorated
self._instance = None
def __call__(self, *args, **kwargs):
""" Return the singleton instance """
if self._instance is None:
self._instance = self._decorated(*args, **kwargs)
return self._instance
def Reset(se... | 21.631579 | 57 | 0.6618 |
091b5e9b96508a816c9224f0d251dea6d7d36f80 | 15,457 | py | Python | capture.py | RMichaelSwan/tele-capture | d8ebb6886a7b46c19f677e6a017051ca5f8a7eea | [
"MIT"
] | 2 | 2021-02-17T18:28:31.000Z | 2021-02-18T13:40:15.000Z | capture.py | RMichaelSwan/tele-capture | d8ebb6886a7b46c19f677e6a017051ca5f8a7eea | [
"MIT"
] | 1 | 2021-02-18T13:39:54.000Z | 2021-02-18T23:06:50.000Z | capture.py | RMichaelSwan/telecap | d8ebb6886a7b46c19f677e6a017051ca5f8a7eea | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
A script to capture the speaker audio and screen
TODO: Get ROS audio stream
TODO: provide ROS video stream
"""
import numpy as np
import cv2
import time
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('Wnck', '3.0')
gi.require_version('Gdk', '3.0')
from gi.reposi... | 40.891534 | 169 | 0.612991 |
88a4a400c21837c7e7a6b59d1b1dcd3fc7be1648 | 23,177 | py | Python | lib/tests/streamlit/Server_test.py | gzzo/streamlit | c587e0e36a829cbd2133adeb5f20c1874f32880b | [
"Apache-2.0"
] | null | null | null | lib/tests/streamlit/Server_test.py | gzzo/streamlit | c587e0e36a829cbd2133adeb5f20c1874f32880b | [
"Apache-2.0"
] | null | null | null | lib/tests/streamlit/Server_test.py | gzzo/streamlit | c587e0e36a829cbd2133adeb5f20c1874f32880b | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2020 Streamlit Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 38.5 | 88 | 0.664236 |
35b0b6a047eb2b59de4172fc24362e39d65074d9 | 15,535 | py | Python | lib/rucio/api/rule.py | fno2010/rucio | 47e93cfbe5887071c70de4ba815c1bbdddfac2ce | [
"Apache-2.0"
] | null | null | null | lib/rucio/api/rule.py | fno2010/rucio | 47e93cfbe5887071c70de4ba815c1bbdddfac2ce | [
"Apache-2.0"
] | null | null | null | lib/rucio/api/rule.py | fno2010/rucio | 47e93cfbe5887071c70de4ba815c1bbdddfac2ce | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright CERN since 2012
#
# 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 ... | 47.362805 | 147 | 0.659994 |
e863fa1d724e3582c7975dd274fb07e42b4f72bb | 15,980 | py | Python | InvenTree/company/views.py | ArakniD/InvenTree | 0ebf2ebd832b2d736e895abe054ca56bfd1cc477 | [
"MIT"
] | null | null | null | InvenTree/company/views.py | ArakniD/InvenTree | 0ebf2ebd832b2d736e895abe054ca56bfd1cc477 | [
"MIT"
] | null | null | null | InvenTree/company/views.py | ArakniD/InvenTree | 0ebf2ebd832b2d736e895abe054ca56bfd1cc477 | [
"MIT"
] | null | null | null | """
Django views for interacting with Company app
"""
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.utils.translation import ugettext as _
from django.views.generic import DetailView, ListView, UpdateView
from django.urls import reverse
from django.forms import HiddenInput
from moneye... | 28.183422 | 92 | 0.614831 |
4a2fa8666de20f1bff4e9df5492e8303a9a8752c | 1,397 | py | Python | app/twitter-authorize.py | maxnovais/twepy | 665782420be7a3574f81f69902685af49e9e8ddd | [
"Apache-2.0"
] | null | null | null | app/twitter-authorize.py | maxnovais/twepy | 665782420be7a3574f81f69902685af49e9e8ddd | [
"Apache-2.0"
] | null | null | null | app/twitter-authorize.py | maxnovais/twepy | 665782420be7a3574f81f69902685af49e9e8ddd | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from config import TWITTER_API
"""
twitter-authorize:
- step through the process of creating and authorization a
Twitter application.
Based on: https://github.com/ideoforms/python-twitter-examples
"""
import twitter
import time
print("1. Create a new Twitter application here: https://apps.twitt... | 25.87037 | 92 | 0.704366 |
49532eae9033453f9324228392736216faf76860 | 4,550 | py | Python | plugins/backbones/threatbus_rabbitmq/threatbus_rabbitmq/plugin.py | GTrunSec/threatbus | 030993a0d10adf25929b85ef0a19bbdc657210f6 | [
"BSD-3-Clause"
] | 212 | 2020-01-25T12:05:54.000Z | 2022-03-22T05:59:35.000Z | plugins/backbones/threatbus_rabbitmq/threatbus_rabbitmq/plugin.py | GTrunSec/threatbus | 030993a0d10adf25929b85ef0a19bbdc657210f6 | [
"BSD-3-Clause"
] | 57 | 2020-01-28T14:23:32.000Z | 2022-03-10T13:18:11.000Z | plugins/backbones/threatbus_rabbitmq/threatbus_rabbitmq/plugin.py | GTrunSec/threatbus | 030993a0d10adf25929b85ef0a19bbdc657210f6 | [
"BSD-3-Clause"
] | 11 | 2020-02-01T15:15:15.000Z | 2022-01-20T18:37:22.000Z | from collections import defaultdict
from dynaconf import Validator
from dynaconf.utils.boxing import DynaBox
from multiprocessing import JoinableQueue
import pika
from retry import retry
from socket import gethostname
from stix2 import Indicator, Sighting
import threading
import threatbus
from threatbus.data import Sna... | 29.934211 | 87 | 0.648132 |
426c07ca89f3365a8feb3d5f990d722985c3771e | 11,801 | py | Python | src/python/turicreate/test/test_json.py | Bpowers4/turicreate | 73dad213cc1c4f74337b905baea2b3a1e5a0266c | [
"BSD-3-Clause"
] | null | null | null | src/python/turicreate/test/test_json.py | Bpowers4/turicreate | 73dad213cc1c4f74337b905baea2b3a1e5a0266c | [
"BSD-3-Clause"
] | null | null | null | src/python/turicreate/test/test_json.py | Bpowers4/turicreate | 73dad213cc1c4f74337b905baea2b3a1e5a0266c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright © 2017 Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can
# be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
# This software may be modified and distributed under the terms
# of the BSD license... | 33.813754 | 148 | 0.528769 |
e690d27d49143abb2bee86e73f57c1a70085d47e | 1,710 | py | Python | corehq/apps/hqadmin/pillow_settings.py | kkrampa/commcare-hq | d64d7cad98b240325ad669ccc7effb07721b4d44 | [
"BSD-3-Clause"
] | 1 | 2020-05-05T13:10:01.000Z | 2020-05-05T13:10:01.000Z | corehq/apps/hqadmin/pillow_settings.py | kkrampa/commcare-hq | d64d7cad98b240325ad669ccc7effb07721b4d44 | [
"BSD-3-Clause"
] | 1 | 2019-12-09T14:00:14.000Z | 2019-12-09T14:00:14.000Z | corehq/apps/hqadmin/pillow_settings.py | MaciejChoromanski/commcare-hq | fd7f65362d56d73b75a2c20d2afeabbc70876867 | [
"BSD-3-Clause"
] | 5 | 2015-11-30T13:12:45.000Z | 2019-07-01T19:27:07.000Z | from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
from copy import deepcopy
import json
def _get_pillow_configs_from_settings_dict(pillows_by_group):
# this sucks, but not sure there's a better way to make it available to fabric
from manage im... | 36.382979 | 101 | 0.788304 |
331957b3c926360a94daffdfa8a349fbde12e0f7 | 8,941 | py | Python | Clean_StreetNames.py | EricSamsonCarto/Clean_StreetName_ArcpyTool | ec12b568baee65fab6583ee2d4d9482666978e1a | [
"CC0-1.0"
] | 1 | 2020-09-22T18:11:28.000Z | 2020-09-22T18:11:28.000Z | Clean_StreetNames.py | EricSamsonCarto/Clean_StreetName_ArcpyTool | ec12b568baee65fab6583ee2d4d9482666978e1a | [
"CC0-1.0"
] | null | null | null | Clean_StreetNames.py | EricSamsonCarto/Clean_StreetName_ArcpyTool | ec12b568baee65fab6583ee2d4d9482666978e1a | [
"CC0-1.0"
] | null | null | null | import arcgis
import pandas as pd
import os
import arcpy
"""--------------------------------------------------------------------------------
Script Name: Clean Street Names
Description: This script fixes and cleans a layer with a "FullName" street
field. A "FullName" street field includes street na... | 36.493878 | 119 | 0.62465 |
4aecefe825764240c385197d5ff10c3471109fb2 | 14,236 | py | Python | tablemanager/forms.py | parksandwildlife/borgcollector | dab9464f2e58c7dbc039b4805bb894b168547938 | [
"BSD-3-Clause"
] | 2 | 2016-01-20T02:26:06.000Z | 2016-02-16T02:47:24.000Z | tablemanager/forms.py | parksandwildlife/borgcollector | dab9464f2e58c7dbc039b4805bb894b168547938 | [
"BSD-3-Clause"
] | 4 | 2020-02-11T23:40:10.000Z | 2021-09-22T04:27:50.000Z | tablemanager/forms.py | dbca-wa/borgcollector | dab9464f2e58c7dbc039b4805bb894b168547938 | [
"BSD-3-Clause"
] | 4 | 2016-01-12T02:10:14.000Z | 2017-11-09T13:53:16.000Z | import json
from itertools import ifilter
from django import forms
from django.core.exceptions import ObjectDoesNotExist,ValidationError
from django.forms.widgets import HiddenInput,TextInput
from django.contrib.admin.widgets import RelatedFieldWidgetWrapper
from tablemanager.models import (Normalise,NormalTable,Norm... | 44.074303 | 197 | 0.650042 |
ec421df0152904b67af7322daf36adc32ed4e8d5 | 800 | py | Python | schemas/ModuleBuild.py | fresch/maven-build-tracker | ad850f2e290423b77079db64391e403c565cdef1 | [
"MIT"
] | null | null | null | schemas/ModuleBuild.py | fresch/maven-build-tracker | ad850f2e290423b77079db64391e403c565cdef1 | [
"MIT"
] | null | null | null | schemas/ModuleBuild.py | fresch/maven-build-tracker | ad850f2e290423b77079db64391e403c565cdef1 | [
"MIT"
] | null | null | null | from typing import List
from datetime import datetime
from uuid import UUID
from pydantic import BaseModel
from .SubModuleBuild import SubModuleBuild, SubModuleBuildResponse
from .BuildStatus import BuildStatus
class ModuleBuild(BaseModel):
module: str
build_time: str
result: BuildStatus
finished_at... | 19.047619 | 66 | 0.68625 |
e6211b378f1643fe6dc1a4b30228853e8d7a8763 | 10,864 | py | Python | src/elasticsearch/addl_index_transformations/portal/translate.py | sennetconsortium/search-api | 01a5c0ab8ec6abd147e5b04477ba10f80fedfdc3 | [
"MIT"
] | null | null | null | src/elasticsearch/addl_index_transformations/portal/translate.py | sennetconsortium/search-api | 01a5c0ab8ec6abd147e5b04477ba10f80fedfdc3 | [
"MIT"
] | 7 | 2022-02-08T19:39:14.000Z | 2022-03-18T20:26:10.000Z | src/elasticsearch/addl_index_transformations/portal/translate.py | sennetconsortium/search-api | 01a5c0ab8ec6abd147e5b04477ba10f80fedfdc3 | [
"MIT"
] | null | null | null | from pathlib import Path
import re
from datetime import datetime
from collections import defaultdict
from yaml import safe_load as load_yaml
from libs.assay_type import AssayType
class TranslationException(Exception):
pass
def _unexpected(s):
return f'No translation for "{s}"'
def translate(doc):
_a... | 29.928375 | 129 | 0.618925 |
521702b6f29e8c6adf41e9ec178450a1d95cc54d | 2,633 | py | Python | test/llc/low-level/Expected/AcceptanceTests/LLCUpdateOneLowLevel/llcpackagelowlevel/rest/params/_request_builders.py | Azure/autorest.python | c36f5c1a2d614a1eeba6fec6a2c02517f2d1cce7 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/llc/low-level/Expected/AcceptanceTests/LLCUpdateOneLowLevel/llcpackagelowlevel/rest/params/_request_builders.py | Azure/autorest.python | c36f5c1a2d614a1eeba6fec6a2c02517f2d1cce7 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/llc/low-level/Expected/AcceptanceTests/LLCUpdateOneLowLevel/llcpackagelowlevel/rest/params/_request_builders.py | Azure/autorest.python | c36f5c1a2d614a1eeba6fec6a2c02517f2d1cce7 | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.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 ... | 38.720588 | 99 | 0.665021 |
bf7c4d1af38329e61f041c9501307c378ec4125b | 36,354 | py | Python | scripts/grace_spatial_maps.py | geodeepak/GRACE_HYDL | 5aeeb289f2f8e2d2e29b3b01bded22daf3fb4413 | [
"MIT"
] | null | null | null | scripts/grace_spatial_maps.py | geodeepak/GRACE_HYDL | 5aeeb289f2f8e2d2e29b3b01bded22daf3fb4413 | [
"MIT"
] | null | null | null | scripts/grace_spatial_maps.py | geodeepak/GRACE_HYDL | 5aeeb289f2f8e2d2e29b3b01bded22daf3fb4413 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
u"""
grace_spatial_maps.py
Written by Tyler Sutterley (10/2021)
Reads in GRACE/GRACE-FO spherical harmonic coefficients and exports
monthly spatial fields
Will correct with the specified GIA model group, destripe/smooth/process,
and export the data in specified units
Spatial output unit... | 43.747292 | 80 | 0.653353 |
a224cc0b77f607859b8ce4ea8a9f31b9182d5bb0 | 492 | py | Python | 12_rnn.py | tuhoag/pytorch-zero2all | 31bf132265e2765616f18ca4278e832301c27e89 | [
"MIT"
] | null | null | null | 12_rnn.py | tuhoag/pytorch-zero2all | 31bf132265e2765616f18ca4278e832301c27e89 | [
"MIT"
] | null | null | null | 12_rnn.py | tuhoag/pytorch-zero2all | 31bf132265e2765616f18ca4278e832301c27e89 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
idx2char = ['h', 'i', 'e', 'l', 'o']
x_data = [[0, 1, 0, 2, 3, 3]] # 'hihell
one_hot_lookup = [[]]
cell = nn.LSTM(input_size=4, hidden_size=2, batch_first=True)
h = [1, 0, 0, 0]
e = [0, 1, 0, 0]
l = [0, 0, 1, 0]
o = [0, 0, 0, 1]
inputs = torch.tensor([[h, e, l, l, o], [e, o, l, l,... | 25.894737 | 82 | 0.550813 |
e3e8f56284664afae2d5fbc16ed7b455c7a60653 | 9,957 | py | Python | pybind/slxos/v16r_1_00b/routing_system/router/router_bgp/address_family/ipv4/ipv4_unicast/af_vrf/neighbor/af_ipv4_vrf_neighbor_address_holder/af_ipv4_neighbor_addr/af_vrf_neighbor_capability/as4/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v16r_1_00b/routing_system/router/router_bgp/address_family/ipv4/ipv4_unicast/af_vrf/neighbor/af_ipv4_vrf_neighbor_address_holder/af_ipv4_neighbor_addr/af_vrf_neighbor_capability/as4/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v16r_1_00b/routing_system/router/router_bgp/address_family/ipv4/ipv4_unicast/af_vrf/neighbor/af_ipv4_vrf_neighbor_address_holder/af_ipv4_neighbor_addr/af_vrf_neighbor_capability/as4/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | 1 | 2021-11-05T22:15:42.000Z | 2021-11-05T22:15:42.000Z |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... | 63.018987 | 457 | 0.740183 |
3164f33fb99f64838caa5c4907fdf39d3b6eea25 | 4,246 | py | Python | src/azotea/gui/widgets/about.py | actionprojecteu/azotea-client | cbb6e8a5fcf06bf0686cced222eed7b807195f2c | [
"MIT"
] | null | null | null | src/azotea/gui/widgets/about.py | actionprojecteu/azotea-client | cbb6e8a5fcf06bf0686cced222eed7b807195f2c | [
"MIT"
] | null | null | null | src/azotea/gui/widgets/about.py | actionprojecteu/azotea-client | cbb6e8a5fcf06bf0686cced222eed7b807195f2c | [
"MIT"
] | null | null | null | # ----------------------------------------------------------------------
# Copyright (c) 2020
#
# See the LICENSE file for details
# see the AUTHORS file for authors
# ----------------------------------------------------------------------
#################################
## APPLICATION SPECIFIC WIDGETS #
############... | 29.692308 | 109 | 0.552285 |
d2d312a6e7082d02c4fabc986e2736b1c5983e1d | 1,433 | py | Python | bot/utils.py | rsoorajs/keepTelegram | 1039f164cee4a7833254764abe1020e1e7343010 | [
"MIT"
] | 9 | 2021-01-01T19:01:02.000Z | 2021-11-08T09:52:19.000Z | bot/utils.py | rsoorajs/keepTelegram | 1039f164cee4a7833254764abe1020e1e7343010 | [
"MIT"
] | 15 | 2021-07-01T19:02:18.000Z | 2022-02-01T19:01:48.000Z | bot/utils.py | telegrambotdev/keepTelegram | 1039f164cee4a7833254764abe1020e1e7343010 | [
"MIT"
] | 3 | 2021-02-17T12:32:36.000Z | 2021-11-14T14:38:15.000Z | """Utils for bot"""
from datetime import datetime
# ------------ Program variable start ----------- #
status_codes = {
0: {'str': 'unready', 'reverse_str': 'ready', 'int': 1},
1: {'str': 'ready', 'reverse_str': 'unready', 'int': 0},
}
note_fields = ['header', 'text', 'time']
buttons_text = {
'get_text': 'G... | 31.844444 | 89 | 0.586881 |
ca43f43d224f5c487bcbac7ffb5a253c4d783ff0 | 3,678 | py | Python | src/Python/VisualizationAlgorithms/SpikeFran.py | sankhesh/vtk-examples | 2d50e847ad62ce0eb71b66c029ad8abb302cd39f | [
"Apache-2.0"
] | null | null | null | src/Python/VisualizationAlgorithms/SpikeFran.py | sankhesh/vtk-examples | 2d50e847ad62ce0eb71b66c029ad8abb302cd39f | [
"Apache-2.0"
] | null | null | null | src/Python/VisualizationAlgorithms/SpikeFran.py | sankhesh/vtk-examples | 2d50e847ad62ce0eb71b66c029ad8abb302cd39f | [
"Apache-2.0"
] | 1 | 2022-02-16T08:20:41.000Z | 2022-02-16T08:20:41.000Z | #!/usr/bin/env python
import vtk
def main():
fileName = get_program_parameters()
colors = vtk.vtkNamedColors()
fran = vtk.vtkPolyDataReader()
fran.SetFileName(fileName)
normals = vtk.vtkPolyDataNormals()
normals.SetInputConnection(fran.GetOutputPort())
normals.FlipNormalsOn()
fran... | 31.982609 | 90 | 0.712616 |
ee049930d7cd3e1d826d9ae8e2fe4f88e95d787e | 1,328 | py | Python | api/ansible_api/serializers/project.py | 240325184/KubeOperator | 777774050b236abf938a5a9ef505124c26e4916e | [
"Apache-2.0"
] | 3 | 2019-11-29T03:49:08.000Z | 2020-07-29T02:52:51.000Z | api/ansible_api/serializers/project.py | 240325184/KubeOperator | 777774050b236abf938a5a9ef505124c26e4916e | [
"Apache-2.0"
] | 27 | 2021-05-05T02:51:26.000Z | 2022-01-04T21:30:21.000Z | api/ansible_api/serializers/project.py | 240325184/KubeOperator | 777774050b236abf938a5a9ef505124c26e4916e | [
"Apache-2.0"
] | 1 | 2020-07-06T04:53:51.000Z | 2020-07-06T04:53:51.000Z | # -*- coding: utf-8 -*-
#
import re
from rest_framework import serializers
from django.core.validators import RegexValidator
from ..models import Project
__all__ = [
"ProjectSerializer"
]
class ProjectSerializer(serializers.ModelSerializer):
options = serializers.DictField(required=False, default={})
... | 28.255319 | 75 | 0.601657 |
3c7764aadb8a1c7b984a886dde6dc14171f47671 | 959 | py | Python | file_encrypter/file_encrypter.py | anshul2807/Automation-scripts | 1830437fc9cf5f97b1f5f194a704fb247849ef09 | [
"MIT"
] | 496 | 2020-10-07T15:45:34.000Z | 2022-03-29T16:40:30.000Z | file_encrypter/file_encrypter.py | anshul2807/Automation-scripts | 1830437fc9cf5f97b1f5f194a704fb247849ef09 | [
"MIT"
] | 550 | 2020-10-07T15:31:53.000Z | 2022-03-20T22:00:38.000Z | file_encrypter/file_encrypter.py | anshul2807/Automation-scripts | 1830437fc9cf5f97b1f5f194a704fb247849ef09 | [
"MIT"
] | 388 | 2020-10-07T15:45:21.000Z | 2022-03-27T14:54:46.000Z | import pyAesCrypt
import sys
import re
bufferSize = 64 * 1024
def check_password(password):
"""
function to check the strength of password
"""
regex = re.compile('[@_!#$%^&*()<>?/\\|}{~:]')
t1 = len(password) >= 8
t2 = not (regex.search(password) is None)
t3 = any(c.islower() for c in pa... | 25.918919 | 79 | 0.661105 |
9267600365d9f9fda316fba3f05572d7efd4dd64 | 522 | py | Python | tradeaccounts/urls.py | bizeasy17/investtrack | 3840948896573f3906a5df80ea80859a492f4133 | [
"MIT"
] | null | null | null | tradeaccounts/urls.py | bizeasy17/investtrack | 3840948896573f3906a5df80ea80859a492f4133 | [
"MIT"
] | 3 | 2021-07-15T13:23:28.000Z | 2021-12-09T03:32:16.000Z | tradeaccounts/urls.py | bizeasy17/investtrack | 3840948896573f3906a5df80ea80859a492f4133 | [
"MIT"
] | 1 | 2021-08-19T14:42:59.000Z | 2021-08-19T14:42:59.000Z | from . import views
from django.urls import path, re_path
app_name = 'trade_account'
urlpatterns = [
path('',
views.TradeAccountsHomeView.as_view(), name='index'),
path('create/',
views.create_tradeaccount, name='create'),
path('comments/<ts_code>/<position_id>/',
views.position... | 30.705882 | 62 | 0.639847 |
be492e22e38027f342c10e35a7fe19ed4cf039b5 | 416 | py | Python | reports/migrations/0014_report_keyword.py | Daniel-Hoerauf/cs3240-f16-team11 | 0377bcb8ede9599c04daf7683b065abb2a47f893 | [
"MIT"
] | null | null | null | reports/migrations/0014_report_keyword.py | Daniel-Hoerauf/cs3240-f16-team11 | 0377bcb8ede9599c04daf7683b065abb2a47f893 | [
"MIT"
] | null | null | null | reports/migrations/0014_report_keyword.py | Daniel-Hoerauf/cs3240-f16-team11 | 0377bcb8ede9599c04daf7683b065abb2a47f893 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('reports', '0013_report_file_encrypted'),
]
operations = [
migrations.AddField(
model_name='report',
... | 20.8 | 62 | 0.605769 |
c5d161575be0e6ab71b43ca4d137ce2600ded339 | 498 | py | Python | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/version.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/version.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 226 | 2019-07-24T07:57:21.000Z | 2019-10-15T01:07:24.000Z | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/version.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 2 | 2020-05-21T22:51:22.000Z | 2020-05-26T20:53:01.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 ... | 35.571429 | 76 | 0.524096 |
3deefc6d3858b5b59d6884cc927e28b0c35e3935 | 11,960 | py | Python | scripts/TestHarness/testers/RavenFramework.py | dgarrett622/raven | f36cc108f7500b0e2717df4832b69b801b43960d | [
"Apache-2.0"
] | null | null | null | scripts/TestHarness/testers/RavenFramework.py | dgarrett622/raven | f36cc108f7500b0e2717df4832b69b801b43960d | [
"Apache-2.0"
] | null | null | null | scripts/TestHarness/testers/RavenFramework.py | dgarrett622/raven | f36cc108f7500b0e2717df4832b69b801b43960d | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Battelle Energy Alliance, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 43.333333 | 148 | 0.666806 |
221d8ad89f9874562fa463d34b577a3c99252813 | 600 | py | Python | handlers/users/start.py | vlsh1n/ChatBot_PlekhanovUniversity | fa28ee623a2f020b5ddddb45655444bc537f0c53 | [
"MIT"
] | null | null | null | handlers/users/start.py | vlsh1n/ChatBot_PlekhanovUniversity | fa28ee623a2f020b5ddddb45655444bc537f0c53 | [
"MIT"
] | null | null | null | handlers/users/start.py | vlsh1n/ChatBot_PlekhanovUniversity | fa28ee623a2f020b5ddddb45655444bc537f0c53 | [
"MIT"
] | null | null | null | from aiogram import types
from aiogram.dispatcher.filters.builtin import CommandStart
from keyboards.default import menu
from loader import dp
# Хэндлер, который обрабатывает команду /start
@dp.message_handler(CommandStart())
async def bot_start(message: types.Message):
await message.answer(f"Привет, {message.fr... | 37.5 | 103 | 0.723333 |
704ca0d87e141ac1e4d61b76781ebc5de76dbe7e | 625 | py | Python | codes/chapter18-3/henango/urls/resolver.py | uenoka/introduction-to-web-application-with-python | 99ec28151fa8388a21c96e5d39902641961c72bb | [
"MIT"
] | 22 | 2020-11-04T01:57:20.000Z | 2022-03-16T06:20:32.000Z | codes/chapter18-3/henango/urls/resolver.py | uenoka/introduction-to-web-application-with-python | 99ec28151fa8388a21c96e5d39902641961c72bb | [
"MIT"
] | 17 | 2020-11-03T14:28:12.000Z | 2022-03-26T08:04:50.000Z | codes/chapter18-3/henango/urls/resolver.py | uenoka/introduction-to-web-application-with-python | 99ec28151fa8388a21c96e5d39902641961c72bb | [
"MIT"
] | 14 | 2020-11-04T02:17:49.000Z | 2022-03-12T11:32:41.000Z | from typing import Callable, Optional
from henango.http.request import HTTPRequest
from henango.http.response import HTTPResponse
from urls import url_patterns
class URLResolver:
def resolve(self, request: HTTPRequest) -> Optional[Callable[[HTTPRequest], HTTPResponse]]:
"""
URL解決を行う
pathに... | 28.409091 | 95 | 0.6672 |
33edf3c69c7dfc30869621fd4d8e92ffad84de70 | 1,598 | py | Python | sdk/cognitiveservices/azure-cognitiveservices-formrecognizer/azure/cognitiveservices/formrecognizer/models/extracted_token.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/cognitiveservices/azure-cognitiveservices-formrecognizer/azure/cognitiveservices/formrecognizer/models/extracted_token.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/cognitiveservices/azure-cognitiveservices-formrecognizer/azure/cognitiveservices/formrecognizer/models/extracted_token.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 38.97561 | 76 | 0.621402 |
bd8807c4c533dbc8d532c18d4049b20334617c9f | 224 | py | Python | app.py | wang2542/DevOps | cf268609974782a780215d8ceb6c90ff80982262 | [
"Apache-2.0"
] | null | null | null | app.py | wang2542/DevOps | cf268609974782a780215d8ceb6c90ff80982262 | [
"Apache-2.0"
] | 1 | 2022-02-14T01:46:44.000Z | 2022-02-14T01:52:43.000Z | app.py | wang2542/DevOps | cf268609974782a780215d8ceb6c90ff80982262 | [
"Apache-2.0"
] | null | null | null | from flask import Flask
app = Flask(__name__)
COUNTER = 0
@app.route("/")
def index():
return "Hello World!"
@app.route("/counter")
def counter():
global COUNTER
COUNTER += 1
return(dict(counter=COUNTER)) | 14.933333 | 33 | 0.651786 |
d2c8cd7fba7dd605a6a7ed619c97af6edd01ebe5 | 1,119 | py | Python | src/cltl/face_recognition/api.py | leolani/cltl-face-recognition | b98e4791c9943b4a4a91d00e2ede5ead2d5fa61f | [
"MIT"
] | null | null | null | src/cltl/face_recognition/api.py | leolani/cltl-face-recognition | b98e4791c9943b4a4a91d00e2ede5ead2d5fa61f | [
"MIT"
] | null | null | null | src/cltl/face_recognition/api.py | leolani/cltl-face-recognition | b98e4791c9943b4a4a91d00e2ede5ead2d5fa61f | [
"MIT"
] | null | null | null | import abc
import dataclasses
from typing import List, Optional, Iterable, Tuple
import numpy as np
from cltl.backend.api.camera import Bounds
from emissor.representation.entity import Gender
@dataclasses.dataclass
class Face:
"""
Information about a Face.
Includes a vector representation of the face an... | 22.38 | 83 | 0.623771 |
5d825b7649293ff9c6241b2d353f07292534dbd5 | 649 | py | Python | blocketwatch/__init__.py | chip2n/blocket-watch | 988cb7c6eb4aad0f4655f9ce7dcb1dc75945a4ed | [
"Apache-2.0"
] | null | null | null | blocketwatch/__init__.py | chip2n/blocket-watch | 988cb7c6eb4aad0f4655f9ce7dcb1dc75945a4ed | [
"Apache-2.0"
] | null | null | null | blocketwatch/__init__.py | chip2n/blocket-watch | 988cb7c6eb4aad0f4655f9ce7dcb1dc75945a4ed | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# coding=UTF8
#
# Copyright 2013 Andreas Arvidsson
#
# 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 ... | 34.157895 | 74 | 0.75963 |
3693ec784eb9f7578e5dc83cd1038410dad5e23e | 1,390 | py | Python | chrome/test/enterprise/e2e/policy/webprotect_file_download/webprotect_file_download.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 14,668 | 2015-01-01T01:57:10.000Z | 2022-03-31T23:33:32.000Z | chrome/test/enterprise/e2e/policy/webprotect_file_download/webprotect_file_download.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 113 | 2015-05-04T09:58:14.000Z | 2022-01-31T19:35:03.000Z | chrome/test/enterprise/e2e/policy/webprotect_file_download/webprotect_file_download.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 5,941 | 2015-01-02T11:32:21.000Z | 2022-03-31T16:35:46.000Z | # Copyright 2020 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.
import os
from chrome_ent_test.infra.core import category, environment, before_all, test
from infra import ChromeEnterpriseTestCase
@category("chrome_only"... | 34.75 | 78 | 0.741007 |
d0d6ad4ab24f53c62a3876ddce604dae6804e771 | 5,102 | py | Python | ncc/eval/summarization/smoothed_bleu.py | iwangyuezhang/naturalcc | e9d9b4a296b61199fc35779b062db2205935a608 | [
"MIT"
] | 1 | 2022-03-30T14:45:42.000Z | 2022-03-30T14:45:42.000Z | ncc/eval/summarization/smoothed_bleu.py | hrshy0629/naturalcc | 9c3329dd8387c8242deb52bf590ebe3ac795f8de | [
"MIT"
] | null | null | null | ncc/eval/summarization/smoothed_bleu.py | hrshy0629/naturalcc | 9c3329dd8387c8242deb52bf590ebe3ac795f8de | [
"MIT"
] | null | null | null | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 39.859375 | 101 | 0.662681 |
f9560932d4885c0ac16585aefdafca8a0b807956 | 205 | py | Python | 23_Aug_2021_re-exam/project_astro/astronaut/meteorologist.py | vasetousa/OOP | e4fedc497dd149c9800613ea11846e0e770d122c | [
"MIT"
] | null | null | null | 23_Aug_2021_re-exam/project_astro/astronaut/meteorologist.py | vasetousa/OOP | e4fedc497dd149c9800613ea11846e0e770d122c | [
"MIT"
] | null | null | null | 23_Aug_2021_re-exam/project_astro/astronaut/meteorologist.py | vasetousa/OOP | e4fedc497dd149c9800613ea11846e0e770d122c | [
"MIT"
] | null | null | null | from project_astro.astronaut.astronaut import Astronaut
class Meteorologist(Astronaut):
def __init__(self, name):
super().__init__(name, 90)
def breathe(self):
self.oxygen -= 15
| 20.5 | 55 | 0.687805 |
799a677237acd301922d64d0572901167a81052c | 732 | py | Python | Unit_4/Data_Array_Manipulation.py | coffeelabor/CIS289_Reed_James | 6d1bc126d6b50411f2bad1d65cfeebd47b68a6ff | [
"MIT"
] | null | null | null | Unit_4/Data_Array_Manipulation.py | coffeelabor/CIS289_Reed_James | 6d1bc126d6b50411f2bad1d65cfeebd47b68a6ff | [
"MIT"
] | null | null | null | Unit_4/Data_Array_Manipulation.py | coffeelabor/CIS289_Reed_James | 6d1bc126d6b50411f2bad1d65cfeebd47b68a6ff | [
"MIT"
] | null | null | null | '''
/***************************************************************
* Name: Pandas Data and Array Manipulation Program
* Author: Reed James
* Created: 22 Sept 2021
* Course: CIS 289 - Python
* Version: Python 3.8.2
* OS: Windows 10
* Copyright: This is my own original work based on
* specifications issue... | 30.5 | 76 | 0.556011 |
2f2b382066cf85165208a5e3a9e7ca4e4e879687 | 1,784 | py | Python | usuarios/models.py | MarcosBB/E-commerce | 2a7c2bfd4512eb212eeec3bd49c65c70a65e6593 | [
"MIT"
] | 2 | 2021-07-27T19:27:15.000Z | 2021-08-16T18:26:22.000Z | usuarios/models.py | MarcosBB/E-commerce | 2a7c2bfd4512eb212eeec3bd49c65c70a65e6593 | [
"MIT"
] | null | null | null | usuarios/models.py | MarcosBB/E-commerce | 2a7c2bfd4512eb212eeec3bd49c65c70a65e6593 | [
"MIT"
] | null | null | null | from django.db import models
import uuid
from stdimage.models import StdImageField
from django.contrib.auth.models import AbstractUser, BaseUserManager
def get_file_path(_instance, filename):
ext = filename.split('.')[-1]
filename = f'{uuid.uuid4()}.{ext}'
return filename
class UsuarioManager(BaseUserMana... | 37.166667 | 128 | 0.696749 |
51acd17d9ec1e48eabe884b82c88db8d5eeda3ea | 265 | py | Python | newdust/graindist/composition/__init__.py | eblur/newdust | 7e843ae2604a844826606ea04c459694fdd5c178 | [
"BSD-2-Clause"
] | 4 | 2018-02-04T19:04:01.000Z | 2022-02-09T04:11:18.000Z | newdust/graindist/composition/__init__.py | eblur/newdust | 7e843ae2604a844826606ea04c459694fdd5c178 | [
"BSD-2-Clause"
] | 21 | 2017-08-15T21:13:42.000Z | 2021-12-23T20:07:24.000Z | newdust/graindist/composition/__init__.py | eblur/newdust | 7e843ae2604a844826606ea04c459694fdd5c178 | [
"BSD-2-Clause"
] | 1 | 2021-01-28T18:29:12.000Z | 2021-01-28T18:29:12.000Z | import os
def _find_cmfile(name):
root_path = os.path.dirname(__file__).rstrip('composition')
data_path = root_path + 'tables/'
return data_path + name
from .cmdrude import CmDrude
from .cmsilicate import CmSilicate
from .cmgraphite import CmGraphite
| 24.090909 | 63 | 0.758491 |
920f43c98c03f2b0a7a1286e87634b8055207966 | 1,874 | gyp | Python | binding.gyp | ionagamed/node-rsvg | bad9eb5e0d52dc9d128ee24ce304f3091a9d2afb | [
"MIT"
] | 32 | 2015-10-04T03:39:54.000Z | 2020-11-09T14:59:30.000Z | binding.gyp | ionagamed/node-rsvg | bad9eb5e0d52dc9d128ee24ce304f3091a9d2afb | [
"MIT"
] | 16 | 2016-04-04T14:57:30.000Z | 2019-09-09T12:18:58.000Z | binding.gyp | ionagamed/node-rsvg | bad9eb5e0d52dc9d128ee24ce304f3091a9d2afb | [
"MIT"
] | 25 | 2015-10-17T09:58:01.000Z | 2021-06-23T07:43:03.000Z | {
"variables": {
"GTK_Root%": "c:\\gtk",
"conditions": [
[ "OS == 'mac'", {
"pkg_env": "PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig"
}, {
"pkg_env": ""
}]
]
},
"targets": [
{
"target_name": "rsvg",
"sources": [
"src/Rsvg.cc",
"src/Enums.cc",
"src/Autocrop.cc"
],
"include_d... | 19.93617 | 89 | 0.437567 |
e2ef6413182e0e3d5e3095aab987250265f0a28f | 6,904 | py | Python | localizedFunc.py | FisherEat/python_ios_projects | 1d1bba34d31ff31b732b5ae573c0eca0a4a0fb7b | [
"MIT"
] | null | null | null | localizedFunc.py | FisherEat/python_ios_projects | 1d1bba34d31ff31b732b5ae573c0eca0a4a0fb7b | [
"MIT"
] | null | null | null | localizedFunc.py | FisherEat/python_ios_projects | 1d1bba34d31ff31b732b5ae573c0eca0a4a0fb7b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import re
import sys
zhPattern = re.compile(u'[\u4e00-\u9fa5]+')
strPattern = re.compile(r'@\"(.*?)(?<!\\)\"')
def cur_file_dir():
# python虚拟机的打开路径
path = sys.path[0]
# 改为上级目录
if os.path.isdir(path):
# return path
return os.pat... | 39.00565 | 131 | 0.467265 |
9ad616e1f75520ff2ca236dca5a0a8792fd18c75 | 1,385 | py | Python | part01-e18_acronyms/test/test_acronyms.py | alekshiidenhovi/Helsinki-University-Data-Analysis-with-Python | bc27fa585d22d630a38312ee7c4b2173d5b80d12 | [
"MIT"
] | null | null | null | part01-e18_acronyms/test/test_acronyms.py | alekshiidenhovi/Helsinki-University-Data-Analysis-with-Python | bc27fa585d22d630a38312ee7c4b2173d5b80d12 | [
"MIT"
] | null | null | null | part01-e18_acronyms/test/test_acronyms.py | alekshiidenhovi/Helsinki-University-Data-Analysis-with-Python | bc27fa585d22d630a38312ee7c4b2173d5b80d12 | [
"MIT"
] | 2 | 2022-02-14T20:07:29.000Z | 2022-03-11T07:30:23.000Z | #!/usr/bin/env python3
import unittest
from unittest.mock import patch
from tmc import points
from tmc.utils import load, get_stdout
module_name="src.acronyms"
acronyms = load(module_name, "acronyms")
@points('p01-18.1')
class Acronyms(unittest.TestCase):
def test_first(self):
result = acronyms("... | 46.166667 | 585 | 0.712635 |
b729f835260f114c010289b9cdd35faa4bfdad7f | 47,391 | py | Python | python-trunk/sfapi2/sfutil/report/sfReportCR.py | raychorn/svn_molten-magma | 8aa2ff2340707eecae6514943e86f5afba9cd54a | [
"CC0-1.0"
] | null | null | null | python-trunk/sfapi2/sfutil/report/sfReportCR.py | raychorn/svn_molten-magma | 8aa2ff2340707eecae6514943e86f5afba9cd54a | [
"CC0-1.0"
] | null | null | null | python-trunk/sfapi2/sfutil/report/sfReportCR.py | raychorn/svn_molten-magma | 8aa2ff2340707eecae6514943e86f5afba9cd54a | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python2.3
"""
A class for instantiation by sfNotify to generate a type of report
Not intended to stand alone.
"""
#version = 0.10 # Initial version under development
#version = 1.10 # factor common elements out for use by other reports
version = 2.0 # 10/25/2004 Moved to new API and Task Branche... | 35.902273 | 592 | 0.527674 |
6b1ff94f639875836cf6c30084d2b32831bcabbd | 9,455 | py | Python | map.py | sumitsk/algp | dfe7654013ebdcbc1d4624dd59aa56f3e773f4e9 | [
"MIT"
] | null | null | null | map.py | sumitsk/algp | dfe7654013ebdcbc1d4624dd59aa56f3e773f4e9 | [
"MIT"
] | null | null | null | map.py | sumitsk/algp | dfe7654013ebdcbc1d4624dd59aa56f3e773f4e9 | [
"MIT"
] | 1 | 2019-03-01T00:01:47.000Z | 2019-03-01T00:01:47.000Z | import numpy as np
from utils import manhattan_distance
from graph_utils import get_heading, opposite_headings
import ipdb
class Map(object):
def __init__(self, num_gp_rows=15, num_gp_cols=37, num_row_passes=2, row_pass_width=1):
super(Map, self).__init__()
self.num_gp_rows = num_gp_rows... | 41.469298 | 142 | 0.571126 |
356a654b316e26d9ef53a353863f472c54347a6b | 4,621 | py | Python | plugins/modules/panos_op.py | Nothing4You/pan-os-ansible | 50078a71eef0c5e9a4263020135df6a0e05961bf | [
"Apache-2.0"
] | null | null | null | plugins/modules/panos_op.py | Nothing4You/pan-os-ansible | 50078a71eef0c5e9a4263020135df6a0e05961bf | [
"Apache-2.0"
] | null | null | null | plugins/modules/panos_op.py | Nothing4You/pan-os-ansible | 50078a71eef0c5e9a4263020135df6a0e05961bf | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2017 Palo Alto Networks, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#... | 28.176829 | 98 | 0.664358 |
8936db7add2b23cf311ab1b0d512951998770534 | 7,969 | py | Python | dynamic_preferences/registries.py | dadoeyad/django-dynamic-preferences | fa012e3012f7149a92bd2daa57efd4c5e0aba32c | [
"BSD-3-Clause"
] | null | null | null | dynamic_preferences/registries.py | dadoeyad/django-dynamic-preferences | fa012e3012f7149a92bd2daa57efd4c5e0aba32c | [
"BSD-3-Clause"
] | null | null | null | dynamic_preferences/registries.py | dadoeyad/django-dynamic-preferences | fa012e3012f7149a92bd2daa57efd4c5e0aba32c | [
"BSD-3-Clause"
] | null | null | null | from django.db.models.fields import FieldDoesNotExist
from django.apps import apps
# import the logging library
import warnings
import logging
import collections
import persisting_theory
# Get an instance of a logger
logger = logging.getLogger(__name__)
#: The package where autodiscover will try to find preferences ... | 35.417778 | 136 | 0.672732 |
35625937f426c1039b9033c2d3f3ba68c5e7714a | 4,997 | py | Python | s_vlan_to_csv.py | zhangineer/securecrt-tools | 13e980d3fd3881adc06effd27ef29e4821fa9a26 | [
"Apache-2.0"
] | 168 | 2018-01-05T19:17:17.000Z | 2022-03-31T06:16:59.000Z | s_vlan_to_csv.py | zhangineer/securecrt-tools | 13e980d3fd3881adc06effd27ef29e4821fa9a26 | [
"Apache-2.0"
] | 19 | 2018-01-11T02:26:44.000Z | 2022-03-31T15:57:10.000Z | s_vlan_to_csv.py | zhangineer/securecrt-tools | 13e980d3fd3881adc06effd27ef29e4821fa9a26 | [
"Apache-2.0"
] | 61 | 2017-12-21T14:15:30.000Z | 2022-03-10T01:39:24.000Z | # $language = "python"
# $interface = "1.0"
import os
import sys
import logging
# Add script directory to the PYTHONPATH so we can import our modules (only if run from SecureCRT)
if 'crt' in globals():
script_dir, script_name = os.path.split(crt.ScriptFullName)
if script_dir not in sys.path:
sys.path.... | 39.039063 | 119 | 0.668201 |
27ee4b473cec400d4659591487170d37f3a2f800 | 80 | py | Python | profanity/config.py | TrustedMercury/filter-profanity | 7c38dbba19e341ad72068338952ff07dc8037e37 | [
"MIT"
] | 8 | 2020-08-25T01:33:29.000Z | 2021-02-21T12:01:03.000Z | profanity/config.py | TrustedMercury/filter-profanity | 7c38dbba19e341ad72068338952ff07dc8037e37 | [
"MIT"
] | 2 | 2020-10-20T13:05:05.000Z | 2020-10-21T00:19:32.000Z | profanity/config.py | TrustedMercury/filter-profanity | 7c38dbba19e341ad72068338952ff07dc8037e37 | [
"MIT"
] | 3 | 2020-10-20T12:10:15.000Z | 2020-12-05T00:36:10.000Z | from pathlib import Path
PROFANE_WORD_LIST_PATH = Path("data/profanity.json")
| 16 | 52 | 0.8 |
17abda85776f7a4584183fb81beb3167f5260ab9 | 499 | py | Python | service2/app/grpc_channels.py | sneawo/aiohttp-grpcio-example | 2d7842f08816cbbd93ba394c374085176edce712 | [
"MIT"
] | null | null | null | service2/app/grpc_channels.py | sneawo/aiohttp-grpcio-example | 2d7842f08816cbbd93ba394c374085176edce712 | [
"MIT"
] | null | null | null | service2/app/grpc_channels.py | sneawo/aiohttp-grpcio-example | 2d7842f08816cbbd93ba394c374085176edce712 | [
"MIT"
] | null | null | null | import grpc
from typing import AsyncGenerator
import aiohttp
from .grpc.interceptors import RequestIdInterceptor
from .grpc import service1_pb2_grpc
async def grpc_channels_ctx(app: aiohttp.web.Application) -> AsyncGenerator:
grpc_channel_service1 = grpc.aio.insecure_channel(
app["config"].SERVICE1_CHANNE... | 33.266667 | 80 | 0.793587 |
8effa7714b2b43176ea36e42d7166583b87953ba | 1,583 | py | Python | loader/input_loader.py | Plux1/imagelab | dd657522c8328e454b214612833650d8ece46e94 | [
"MIT"
] | null | null | null | loader/input_loader.py | Plux1/imagelab | dd657522c8328e454b214612833650d8ece46e94 | [
"MIT"
] | null | null | null | loader/input_loader.py | Plux1/imagelab | dd657522c8328e454b214612833650d8ece46e94 | [
"MIT"
] | null | null | null | from sklearn.utils import shuffle
from imutils import paths
import progressbar
import numpy as np
import cv2
# collect image path and extract labels
def load_path_and_labels(images_dir):
path_list = shuffle(list(paths.list_images(images_dir)))
labels = []
# loop over the paths to extract labels
for p... | 28.781818 | 111 | 0.631712 |
dd33e3e35769c74a2cd9efe9711f93379eac0f62 | 225 | py | Python | dtc/enums/order_type_enum.py | jseparovic/python-ws-dtc-client | fd3952cdaf7ab8c9d5a26ccf53b5e9acb3a9ea0f | [
"Apache-2.0"
] | 15 | 2020-04-26T05:25:53.000Z | 2022-02-11T19:38:42.000Z | dtc/enums/order_type_enum.py | jseparovic/python-ws-dtc-client | fd3952cdaf7ab8c9d5a26ccf53b5e9acb3a9ea0f | [
"Apache-2.0"
] | 2 | 2021-01-08T19:58:08.000Z | 2021-11-29T06:08:48.000Z | dtc/enums/order_type_enum.py | jseparovic/python-ws-dtc-client | fd3952cdaf7ab8c9d5a26ccf53b5e9acb3a9ea0f | [
"Apache-2.0"
] | 4 | 2020-11-23T13:38:01.000Z | 2021-12-27T13:21:06.000Z |
class OrderTypeEnum:
ORDER_TYPE_UNSET = 0
ORDER_TYPE_MARKET = 1
ORDER_TYPE_LIMIT = 2
ORDER_TYPE_STOP = 3
ORDER_TYPE_STOP_LIMIT = 4
ORDER_TYPE_MARKET_IF_TOUCHED = 5
ORDER_TYPE_LIMIT_IF_TOUCHED = 6
| 22.5 | 36 | 0.733333 |
745daec1080cae9e5c12b61d1daac2a582d2329f | 1,570 | py | Python | Tools.py | Quiltic/DragonTurtle | ababc499d4bad6accb250ec3cb9649df1c4a3fc9 | [
"MIT"
] | null | null | null | Tools.py | Quiltic/DragonTurtle | ababc499d4bad6accb250ec3cb9649df1c4a3fc9 | [
"MIT"
] | null | null | null | Tools.py | Quiltic/DragonTurtle | ababc499d4bad6accb250ec3cb9649df1c4a3fc9 | [
"MIT"
] | null | null | null | # this is for the basic tools for turtle the ones that i use all the time but dont have to have clutering the main file
if __name__ == "__main__":
# the gunk that is needed for this file. Mostly here so i dont have to get error messages for this file
import discord
from discord.ext import commands
bot ... | 30.784314 | 119 | 0.623567 |
f246033c9ad769fd7efdd1ba6e4dfa153a00c632 | 525 | py | Python | scripts/aby_tests/zokrates_test_aby.py | elefthei/circ | 12fd024f3cbcc403d4a9d51063563562b78a4c1a | [
"Apache-2.0",
"MIT"
] | null | null | null | scripts/aby_tests/zokrates_test_aby.py | elefthei/circ | 12fd024f3cbcc403d4a9d51063563562b78a4c1a | [
"Apache-2.0",
"MIT"
] | null | null | null | scripts/aby_tests/zokrates_test_aby.py | elefthei/circ | 12fd024f3cbcc403d4a9d51063563562b78a4c1a | [
"Apache-2.0",
"MIT"
] | null | null | null | #!/usr/bin/env python
from util import run_tests
from test_suite import *
if __name__ == "__main__":
tests = arithmetic_tests + \
arithmetic_boolean_tests + \
nary_arithmetic_tests + \
bitwise_tests + \
boolean_tests + \
nary_boolean_tests + \
const_arith_tests + \
... | 21 | 36 | 0.569524 |
60b8ebb6c3fcc5770d02e79e53be70e4713d20f1 | 169 | py | Python | Lesson04/Code/MySquare1.py | pangmi/learntocode | 719a2bfbc897104d0f95dcf4634fe93427e2c397 | [
"MIT"
] | null | null | null | Lesson04/Code/MySquare1.py | pangmi/learntocode | 719a2bfbc897104d0f95dcf4634fe93427e2c397 | [
"MIT"
] | null | null | null | Lesson04/Code/MySquare1.py | pangmi/learntocode | 719a2bfbc897104d0f95dcf4634fe93427e2c397 | [
"MIT"
] | 1 | 2021-12-19T18:01:06.000Z | 2021-12-19T18:01:06.000Z | import turtle
turtle.bgcolor('gray')
t = turtle.Pen()
t.pencolor('blue')
t.forward(200)
t.left(90)
t.forward(200)
t.left(90)
t.forward(200)
t.left(90)
t.forward(200)
| 11.266667 | 22 | 0.692308 |
e9bfdfa1dbba0bf10ea945ebfda60ed165e040de | 3,772 | py | Python | course_flow/utils.py | SALTISES4/CourseFlow | a55b5966acd6babf688224ec2f57b2ff59545272 | [
"Apache-2.0"
] | null | null | null | course_flow/utils.py | SALTISES4/CourseFlow | a55b5966acd6babf688224ec2f57b2ff59545272 | [
"Apache-2.0"
] | 2 | 2021-04-20T17:38:27.000Z | 2021-12-12T21:38:27.000Z | course_flow/utils.py | SALTISES4/CourseFlow | a55b5966acd6babf688224ec2f57b2ff59545272 | [
"Apache-2.0"
] | null | null | null | import time
from django.contrib.contenttypes.models import ContentType
from django.db.models import Q
from course_flow import models
owned_throughmodels = [
"node",
"nodeweek",
"week",
"weekworkflow",
"workflow",
"workflowproject",
"project",
"columnworkflow",
"workflow",
"wor... | 30.918033 | 108 | 0.746819 |
bd9e5c8c5d7463dd91d4632d6d53f8476c6357c8 | 781 | py | Python | recipes/bwa/run_test.py | faircloth-lab/conda-recipes | 75a520a75a357ea47ee80262f3c3a6dfe1b0715f | [
"BSD-3-Clause"
] | 2 | 2018-08-02T22:40:59.000Z | 2018-08-30T02:58:49.000Z | recipes/bwa/run_test.py | faircloth-lab/conda-recipes | 75a520a75a357ea47ee80262f3c3a6dfe1b0715f | [
"BSD-3-Clause"
] | 1 | 2015-10-21T13:53:30.000Z | 2015-10-21T17:14:20.000Z | recipes/bwa/run_test.py | faircloth-lab/conda-recipes | 75a520a75a357ea47ee80262f3c3a6dfe1b0715f | [
"BSD-3-Clause"
] | 6 | 2015-09-21T13:37:06.000Z | 2020-03-26T14:42:57.000Z | #!/usr/bin/env python
# encoding: utf-8
"""
File: run_test.py
Author: Brant Faircloth
Created by Brant Faircloth on 23 December 2013 19:08 PST (-0800)
Copyright (c) 2013 Brant C. Faircloth. All rights reserved.
"""
import os
import unittest
import subprocess
class TestAlignments(unittest.TestCase):
def test_sa... | 27.892857 | 89 | 0.682458 |
84944e6b3e324454c4e18ffe2ff9cb73673b53a7 | 1,468 | py | Python | AD9/api.py | ReneCapella/pythonTinkering | 93a5080e8ef6f67fe8ca0b67eb1fb27370beb26a | [
"MIT"
] | null | null | null | AD9/api.py | ReneCapella/pythonTinkering | 93a5080e8ef6f67fe8ca0b67eb1fb27370beb26a | [
"MIT"
] | null | null | null | AD9/api.py | ReneCapella/pythonTinkering | 93a5080e8ef6f67fe8ca0b67eb1fb27370beb26a | [
"MIT"
] | null | null | null | # Start with the code in a given example
#
# Add two more features:
#
# 1. a way for the user to focus the query on one or more selected keywords
# 2. improved output for the query results
# Upload your improved code as a .py file for testing.
import requests
import json
categories_response = requests.get("https://a... | 29.959184 | 84 | 0.638283 |
0fa49ae3eaa303a6bb909ced394faac6e6f20ad8 | 5,731 | py | Python | tests/test_util.py | QianWanghhu/SALib | 95a3371e503f9253cb917b8f0101c0202b969c2b | [
"MIT"
] | 1 | 2019-12-20T00:32:45.000Z | 2019-12-20T00:32:45.000Z | tests/test_util.py | QianWanghhu/SALib | 95a3371e503f9253cb917b8f0101c0202b969c2b | [
"MIT"
] | null | null | null | tests/test_util.py | QianWanghhu/SALib | 95a3371e503f9253cb917b8f0101c0202b969c2b | [
"MIT"
] | null | null | null | from pytest import raises
from numpy.testing import assert_equal, assert_allclose
import numpy as np
import pytest
from SALib.util import (read_param_file, _scale_samples, _unscale_samples,
compute_groups_matrix)
from SALib.sample import latin
@pytest.fixture(scope='function')
def setup_para... | 29.239796 | 74 | 0.645437 |
c16da485b57ad27e5f272c51a57967e817d5e5ee | 2,692 | py | Python | homeassistant/components/plex/services.py | erogleva/core | 994ae09f69afe772150a698953c0d7386a745de2 | [
"Apache-2.0"
] | 6 | 2016-11-25T06:36:27.000Z | 2021-11-16T11:20:23.000Z | homeassistant/components/plex/services.py | erogleva/core | 994ae09f69afe772150a698953c0d7386a745de2 | [
"Apache-2.0"
] | 52 | 2020-07-14T14:12:26.000Z | 2022-03-31T06:24:02.000Z | homeassistant/components/plex/services.py | erogleva/core | 994ae09f69afe772150a698953c0d7386a745de2 | [
"Apache-2.0"
] | 2 | 2020-05-11T00:38:26.000Z | 2021-01-15T13:23:44.000Z | """Services for the Plex integration."""
import logging
from plexapi.exceptions import NotFound
import voluptuous as vol
from homeassistant.helpers.dispatcher import async_dispatcher_send
from .const import (
DOMAIN,
PLEX_UPDATE_PLATFORMS_SIGNAL,
SERVERS,
SERVICE_REFRESH_LIBRARY,
SERVICE_SCAN_CLI... | 29.26087 | 87 | 0.682764 |
5d530c12a3d14b533198a8b290ee7d9238b148c4 | 2,330 | py | Python | oa/plugins/uri_detail.py | Worteks/OrangeAssassin | 21baf0b84fbedd887f6d88e13c624f14fb0b5e06 | [
"Apache-2.0"
] | null | null | null | oa/plugins/uri_detail.py | Worteks/OrangeAssassin | 21baf0b84fbedd887f6d88e13c624f14fb0b5e06 | [
"Apache-2.0"
] | null | null | null | oa/plugins/uri_detail.py | Worteks/OrangeAssassin | 21baf0b84fbedd887f6d88e13c624f14fb0b5e06 | [
"Apache-2.0"
] | null | null | null | """URIDetail Plugin."""
from __future__ import absolute_import
try:
from urllib.parse import unquote
from urllib.parse import urlparse
except ImportError:
from urllib import unquote
from urlparse import urlparse
import oa.regex
import oa.rules.uri
import oa.plugins.base
import oa.html_parser
URI_DRR... | 29.493671 | 74 | 0.6 |
1f64e7369e2d30f5c90fb9a3b22d2fa8ae997ad8 | 1,339 | py | Python | baselines/scikit_knn.py | dericp/digit-recognition | 089458ea06f35af0adb809185f1edc60bb7b2674 | [
"MIT"
] | null | null | null | baselines/scikit_knn.py | dericp/digit-recognition | 089458ea06f35af0adb809185f1edc60bb7b2674 | [
"MIT"
] | null | null | null | baselines/scikit_knn.py | dericp/digit-recognition | 089458ea06f35af0adb809185f1edc60bb7b2674 | [
"MIT"
] | null | null | null |
# coding: utf-8
# In[24]:
import numpy as np
import pandas as pd
from sklearn.neighbors import KNeighborsClassifier
from matplotlib import pyplot as plt
K_VALS = [1, 5, 25, 125, 625]
df_train = pd.read_csv("train.csv", nrows = 1000)
df_train['intercept'] = 1
trainingData = df_train.drop("label", axis = 1).values
tr... | 30.431818 | 112 | 0.732636 |
ad880f1aaaaa85cd9972a3987f916522feb2565e | 776 | py | Python | nuclides/utils/fill_db.py | maluethi/nuclides | 26d84214c4412849794eec6caf0bdb9bd9707aab | [
"MIT"
] | null | null | null | nuclides/utils/fill_db.py | maluethi/nuclides | 26d84214c4412849794eec6caf0bdb9bd9707aab | [
"MIT"
] | null | null | null | nuclides/utils/fill_db.py | maluethi/nuclides | 26d84214c4412849794eec6caf0bdb9bd9707aab | [
"MIT"
] | null | null | null | from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from nuclides.utils.gen_db import Decays, Nuclides, Elements, Base
engine = create_engine('sqlite:///nuclides.db')
# Bind the engine to the metadata of the Base class so that the
# declaratives can be accessed through a DBSession instance
Ba... | 27.714286 | 69 | 0.770619 |
61e2ff4db578543f9f2694f239f03439bfab2c41 | 10,042 | py | Python | sympy/physics/optics/waves.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 1 | 2020-09-09T20:40:17.000Z | 2020-09-09T20:40:17.000Z | sympy/physics/optics/waves.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 14 | 2018-02-08T10:11:03.000Z | 2019-04-16T10:32:46.000Z | sympy/physics/optics/waves.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 1 | 2022-02-04T13:50:29.000Z | 2022-02-04T13:50:29.000Z | """
This module has all the classes and functions related to waves in optics.
**Contains**
* TWave
"""
__all__ = ['TWave']
from sympy.core.basic import Basic
from sympy.core.expr import Expr
from sympy.core.function import Derivative, Function
from sympy.core.numbers import (Number, pi, I)
from sympy.core.singleton... | 29.44868 | 94 | 0.563732 |
5c32a27c0a4ca01955275fc93125fb4cc649e952 | 5,724 | py | Python | src/dataset.py | RedHenLab/punctuation-restoration | 0f32a37cc4db37a818eb22560b31010c67a63a56 | [
"MIT"
] | null | null | null | src/dataset.py | RedHenLab/punctuation-restoration | 0f32a37cc4db37a818eb22560b31010c67a63a56 | [
"MIT"
] | null | null | null | src/dataset.py | RedHenLab/punctuation-restoration | 0f32a37cc4db37a818eb22560b31010c67a63a56 | [
"MIT"
] | null | null | null | import torch
from config import *
from augmentation import *
import numpy as np
def parse_data(file_path, tokenizer, sequence_len, token_style):
"""
:param file_path: text file path that contains tokens and punctuations separated by tab in lines
:param tokenizer: tokenizer that will be used to further to... | 44.372093 | 117 | 0.596087 |
7d0c6c4f62cc46a41b10b45361d77105b1fd49ce | 6,830 | py | Python | extra_apps/xadmin/plugins/editable.py | txqzzz/831net-backend | c73167124b6a10a774e873389900d31fb15a842c | [
"CC0-1.0"
] | null | null | null | extra_apps/xadmin/plugins/editable.py | txqzzz/831net-backend | c73167124b6a10a774e873389900d31fb15a842c | [
"CC0-1.0"
] | null | null | null | extra_apps/xadmin/plugins/editable.py | txqzzz/831net-backend | c73167124b6a10a774e873389900d31fb15a842c | [
"CC0-1.0"
] | null | null | null | from django import template
from django.core.exceptions import PermissionDenied, ObjectDoesNotExist
from django.db import models, transaction
from django.forms.models import modelform_factory
from django.http import Http404, HttpResponse
from django.utils.encoding import force_text, smart_text
from django.utils.html im... | 42.160494 | 132 | 0.609224 |
7e4a24ffdfe6aad67bc9196651e1727fe83d2574 | 2,645 | py | Python | homeassistant/components/camera/generic.py | maddox/home-assistant | 6624cfefd6ea81b559085779173b91a3dc6bd349 | [
"MIT"
] | 1 | 2015-09-13T21:10:09.000Z | 2015-09-13T21:10:09.000Z | homeassistant/components/camera/generic.py | maddox/home-assistant | 6624cfefd6ea81b559085779173b91a3dc6bd349 | [
"MIT"
] | null | null | null | homeassistant/components/camera/generic.py | maddox/home-assistant | 6624cfefd6ea81b559085779173b91a3dc6bd349 | [
"MIT"
] | 1 | 2020-05-07T08:48:36.000Z | 2020-05-07T08:48:36.000Z | """
homeassistant.components.camera.generic
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Support for IP Cameras.
This component provides basic support for IP cameras. For the basic support to
work you camera must support accessing a JPEG snapshot via a URL and you will
need to specify the "still_image_url" parameter which ... | 28.75 | 79 | 0.710019 |
9282732ba80c8819a92ca826149f803d6f25a730 | 1,060 | py | Python | jeu_educatif/python/c_vigenere.py | Charles-Svg/Projet_L3_jeu_educatif | 841f70f1368117288128342258f5832ca9028161 | [
"MIT"
] | null | null | null | jeu_educatif/python/c_vigenere.py | Charles-Svg/Projet_L3_jeu_educatif | 841f70f1368117288128342258f5832ca9028161 | [
"MIT"
] | null | null | null | jeu_educatif/python/c_vigenere.py | Charles-Svg/Projet_L3_jeu_educatif | 841f70f1368117288128342258f5832ca9028161 | [
"MIT"
] | null | null | null | # Ce document est chiffré à l'aide de l'algorithme de vigenère
# Vous devrez coder une fonction de DECHIFFREMENT (et non de chiffrement) de vigenère prenant en paramètres :
# -Un mot/phrase à déchiffrer (en minuscule)
# -Une clé étant une chaine de caractères (en minuscule)
# et retournant le mot déchiffré (en minu... | 42.4 | 125 | 0.728302 |
e4c607b0f86a6fbc51108ab1f5c4814ef616d921 | 1,158 | py | Python | src/features/cross_v1.py | yota-p/kaggle_jane-street-market-prediction | c39d65652d3ce531e99efbc50926cd95cba8b466 | [
"MIT"
] | null | null | null | src/features/cross_v1.py | yota-p/kaggle_jane-street-market-prediction | c39d65652d3ce531e99efbc50926cd95cba8b466 | [
"MIT"
] | 8 | 2020-12-12T10:06:14.000Z | 2020-12-30T07:09:52.000Z | src/features/cross_v1.py | yota-p/kaggle_jane-street-market-prediction | c39d65652d3ce531e99efbc50926cd95cba8b466 | [
"MIT"
] | null | null | null | from pathlib import Path
import pandas as pd
from src.util.get_environment import get_datadir
def main():
'''
Function:
- Reduce size of train.csv from 2.5GB to 600MB (On memory)
Note: Files except train.csv aren't reduced (small enough)
- Cut weight <=0
- Calculate action
- Create cross... | 27.571429 | 81 | 0.645941 |
97a83783f6f5f52107b773090b4e11f1497e6b82 | 1,746 | py | Python | cieloApi3/payment.py | naripok/API-3.0-Python | 3bdd27d321a03f4c761876f7907588a0f4726c70 | [
"MIT"
] | null | null | null | cieloApi3/payment.py | naripok/API-3.0-Python | 3bdd27d321a03f4c761876f7907588a0f4726c70 | [
"MIT"
] | null | null | null | cieloApi3/payment.py | naripok/API-3.0-Python | 3bdd27d321a03f4c761876f7907588a0f4726c70 | [
"MIT"
] | null | null | null |
from .objectJSON import ObjectJSON
PAYMENTTYPE_CREDITCARD = "CreditCard"
PAYMENTTYPE_DEBITCARD = "DebitCard"
PAYMENTTYPE_ELECTRONIC_TRANSFER = "ElectronicTransfer"
PAYMENTTYPE_BOLETO = "Boleto"
PROVIDER_BRADESCO = "Bradesco"
PROVIDER_BANCO_DO_BRASIL = "BancoDoBrasil"
PROVIDER_SIMULADO = "Simulado"
class Payment(Obj... | 27.714286 | 65 | 0.64433 |
77e5aa7f2fffd75c275be5a8d0db8fb86b29f672 | 4,848 | py | Python | configs/vfnet/vfnet_RepVGG_4cls.py | HAOCHENYE/yehc_mmdet | 491cc13c6ff769996b7a23b871b10f9a5a1c56fa | [
"Apache-2.0"
] | 1 | 2021-12-25T13:22:39.000Z | 2021-12-25T13:22:39.000Z | configs/vfnet/vfnet_RepVGG_4cls.py | HAOCHENYE/yehc_mmdet | 491cc13c6ff769996b7a23b871b10f9a5a1c56fa | [
"Apache-2.0"
] | null | null | null | configs/vfnet/vfnet_RepVGG_4cls.py | HAOCHENYE/yehc_mmdet | 491cc13c6ff769996b7a23b871b10f9a5a1c56fa | [
"Apache-2.0"
] | 1 | 2021-02-01T13:33:26.000Z | 2021-02-01T13:33:26.000Z | dataset_type = 'CocoDataset'
data_root = '/media/traindata/coco/'
base_lr = 0.32
warmup_iters = 2000
model = dict(
type='GFL',
backbone=dict(
type='RepVGGNet',
stem_channels=64,
stage_channels=(32, 64, 72, 96, 128, 192),
block_per_stage=(1, 3, 6, 8, 6, 6),
),
neck=di... | 31.686275 | 125 | 0.570132 |
64e29fc6067a09faca5c76d319f97d043997ebdc | 84 | py | Python | yearmonth/__init__.py | bsnacks000/yearmonth | c6a6084931e6cc4696de5f8a7f8e48ceca83b944 | [
"MIT"
] | null | null | null | yearmonth/__init__.py | bsnacks000/yearmonth | c6a6084931e6cc4696de5f8a7f8e48ceca83b944 | [
"MIT"
] | null | null | null | yearmonth/__init__.py | bsnacks000/yearmonth | c6a6084931e6cc4696de5f8a7f8e48ceca83b944 | [
"MIT"
] | null | null | null | from ._version import VERSION
__version__=VERSION
from .yearmonth import YearMonth | 16.8 | 32 | 0.845238 |
cec548d995aa2082b5ea273d61b0dec02ca439ef | 12,882 | py | Python | tests/testlinkaliasapi.py | rjw57/trafficdb | 7c895e14a52c8c313981243e36732a5e8dcc909a | [
"MIT"
] | 1 | 2016-12-12T21:23:26.000Z | 2016-12-12T21:23:26.000Z | tests/testlinkaliasapi.py | rjw57/trafficdb | 7c895e14a52c8c313981243e36732a5e8dcc909a | [
"MIT"
] | null | null | null | tests/testlinkaliasapi.py | rjw57/trafficdb | 7c895e14a52c8c313981243e36732a5e8dcc909a | [
"MIT"
] | null | null | null | import datetime
import json
import logging
import random
from sqlalchemy import func
from trafficdb.blueprint.api import PAGE_LIMIT
from trafficdb.models import *
from .fixtures import (
create_fake_link_aliases,
create_fake_links,
create_fake_observations,
)
from .util import ApiTestCase as TestCase, API... | 38.684685 | 100 | 0.627077 |
7c6dac2314617e6e594af5f95ddf3f69ec127758 | 968 | py | Python | sols/1013.py | Paul11100/LeetCode | 9896c579dff1812c0c76964db8d60603ee715e35 | [
"MIT"
] | null | null | null | sols/1013.py | Paul11100/LeetCode | 9896c579dff1812c0c76964db8d60603ee715e35 | [
"MIT"
] | null | null | null | sols/1013.py | Paul11100/LeetCode | 9896c579dff1812c0c76964db8d60603ee715e35 | [
"MIT"
] | null | null | null | class Solution:
# Greedy Two Pointers (Accepted), O(n) time, O(1) space
def canThreePartsEqualSum(self, arr: List[int]) -> bool:
if len(arr) < 3:
return False
total = sum(arr)
target = total / 3
a, b = 0, len(arr)-1
a_tot = b_tot = 0
while a_tot != tar... | 29.333333 | 69 | 0.452479 |
240843929a62873561804b718522912cbc4c751b | 1,279 | py | Python | core/src/Test/TestConfig.py | mkg20001/Fuzium | d424cd42a92272563fcba2290028c036cb7ce4a1 | [
"MIT"
] | null | null | null | core/src/Test/TestConfig.py | mkg20001/Fuzium | d424cd42a92272563fcba2290028c036cb7ce4a1 | [
"MIT"
] | null | null | null | core/src/Test/TestConfig.py | mkg20001/Fuzium | d424cd42a92272563fcba2290028c036cb7ce4a1 | [
"MIT"
] | null | null | null | import pytest
import Config
@pytest.mark.usefixtures("resetSettings")
class TestConfig:
def testParse(self):
# Defaults
config_test = Config.Config("zeronet.py".split(" "))
config_test.parse(silent=True, parse_config=False)
assert not config_test.debug
assert not config_te... | 39.96875 | 124 | 0.686474 |
3dcfde01bf48050ced4e8088a4d8780e0d3970f0 | 16,645 | py | Python | sdk/tables/azure-data-tables/tests/_shared/testcase.py | KarishmaGhiya/azure-sdk-for-python | 1216acf1caa13575d3b8cfa0b401e42eefa9f17f | [
"MIT"
] | 1 | 2020-08-17T14:40:09.000Z | 2020-08-17T14:40:09.000Z | sdk/tables/azure-data-tables/tests/_shared/testcase.py | KarishmaGhiya/azure-sdk-for-python | 1216acf1caa13575d3b8cfa0b401e42eefa9f17f | [
"MIT"
] | null | null | null | sdk/tables/azure-data-tables/tests/_shared/testcase.py | KarishmaGhiya/azure-sdk-for-python | 1216acf1caa13575d3b8cfa0b401e42eefa9f17f | [
"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.
# ---------------------------------------------------------------------... | 37.573363 | 158 | 0.623791 |
ca72a3698829de734909500a0adb50ec78e6666b | 74,705 | py | Python | torch/quantization/fx/quantize.py | guoyejun/pytorch | 57cba8e60116bfff37d10bc2b4596d8c478ffd0a | [
"Intel"
] | null | null | null | torch/quantization/fx/quantize.py | guoyejun/pytorch | 57cba8e60116bfff37d10bc2b4596d8c478ffd0a | [
"Intel"
] | 1 | 2021-04-12T19:49:08.000Z | 2021-04-12T19:49:08.000Z | torch/quantization/fx/quantize.py | shmsong/pytorch | 90e532f3ef17a9611e9e7a9f1f6189d4168bf084 | [
"Intel"
] | 1 | 2022-02-23T02:34:50.000Z | 2022-02-23T02:34:50.000Z | import torch
from torch.fx import (
GraphModule,
Proxy,
map_arg
)
from torch.fx.graph import (
Graph,
Node,
)
from torch.fx.node import Argument
from torch.quantization import (
propagate_qconfig_,
convert,
)
from ..quantization_mappings import (
get_default_qat_module_mappings,
)
f... | 47.043451 | 155 | 0.603333 |
0d963e21716fc51ad0e70fb5fe9d0ca113431ba4 | 43,076 | py | Python | src/sage/logic/boolformula.py | defeo/sage | d8822036a9843bd4d75845024072515ede56bcb9 | [
"BSL-1.0"
] | null | null | null | src/sage/logic/boolformula.py | defeo/sage | d8822036a9843bd4d75845024072515ede56bcb9 | [
"BSL-1.0"
] | null | null | null | src/sage/logic/boolformula.py | defeo/sage | d8822036a9843bd4d75845024072515ede56bcb9 | [
"BSL-1.0"
] | null | null | null | r"""
Boolean Formulas
Formulas consist of the operators ``&``, ``|``, ``~``, ``^``, ``->``, ``<->``,
corresponding to ``and``, ``or``, ``not``, ``xor``, ``if...then``, ``if and
only if``. Operators can be applied to variables that consist of a leading
letter and trailing underscores and alphanumerics. Parentheses ma... | 30.123077 | 124 | 0.517016 |
512378e4b4bdc4f9ff898a11238dd2c0f22457db | 5,956 | py | Python | example-multiagent/rllib/ppo_agent_one_load_carla.py | AveryWenwenSi/macad-gym | c720c86bc5d13a437c7866955173916d40bb01b3 | [
"MIT"
] | null | null | null | example-multiagent/rllib/ppo_agent_one_load_carla.py | AveryWenwenSi/macad-gym | c720c86bc5d13a437c7866955173916d40bb01b3 | [
"MIT"
] | null | null | null | example-multiagent/rllib/ppo_agent_one_load_carla.py | AveryWenwenSi/macad-gym | c720c86bc5d13a437c7866955173916d40bb01b3 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
from gym.spaces import Box, Discrete
import ray
from ray import tune
from ray.rllib.agents.ppo.ppo import PPOAgent
from ray.rllib.agents.ppo.ppo_policy_graph import PPOPolicyGraph
from ray.rllib... | 31.183246 | 79 | 0.631464 |
bcbf587d1419457aa67901d39e2a9defa8fcf37f | 1,890 | py | Python | LeetCode/10-Regular-Expression-Matching☆☆☆☆/Regular-Expression-Matching2.py | hscspring/TheAlgorithms-Python | 5c2faea1d2d25a9a81a4786e053b0cc58ab46c6f | [
"MIT"
] | 10 | 2020-07-06T11:00:58.000Z | 2022-01-29T09:25:24.000Z | LeetCode/10-Regular-Expression-Matching☆☆☆☆/Regular-Expression-Matching2.py | hscspring/TheAlgorithms-Python | 5c2faea1d2d25a9a81a4786e053b0cc58ab46c6f | [
"MIT"
] | null | null | null | LeetCode/10-Regular-Expression-Matching☆☆☆☆/Regular-Expression-Matching2.py | hscspring/TheAlgorithms-Python | 5c2faea1d2d25a9a81a4786e053b0cc58ab46c6f | [
"MIT"
] | 3 | 2020-07-13T06:39:23.000Z | 2020-08-15T16:29:48.000Z | class Solution:
def isMatch(self, s: str, p: str) -> bool:
T = [[False] * (len(p) + 1) for _ in range(len(s) + 1)]
T[0][0] = True
for j in range(len(p)):
if p[j] == "*":
T[0][j+1] = T[0][j-1]
for i in range(len(s)):
for j in range(len(p)):
... | 39.375 | 63 | 0.444974 |
78c5b16e7aa5f91f48fdeafef85bc3504ec1f730 | 1,498 | py | Python | pizza/tests/test_slice_growing.py | purrcat259/n-n-hashcode | 98a1c443e6112903bc29a858bc18476a6635d460 | [
"MIT"
] | null | null | null | pizza/tests/test_slice_growing.py | purrcat259/n-n-hashcode | 98a1c443e6112903bc29a858bc18476a6635d460 | [
"MIT"
] | null | null | null | pizza/tests/test_slice_growing.py | purrcat259/n-n-hashcode | 98a1c443e6112903bc29a858bc18476a6635d460 | [
"MIT"
] | null | null | null | from pizza.input import ExampleInput
from pizza.models.slice import Slice
"""
TTTTT
TMMMT
TTTTT
"""
example_input = ExampleInput()
example_input.read_file()
data = example_input.data
class TestSliceGrowing:
s = None
def setup_method(self):
self.s = Slice(data, (0, 0))
def test_grow_row(self)... | 24.557377 | 36 | 0.570761 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.