hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79805f0055f52cc9f2b7932f5203e17b9ff16fc0 | 1,203 | py | Python | montepython/MontePython.py | enisbelgacem/montepython_public | e829e8bb1185a166e6a02e013cf419469288947e | [
"MIT"
] | null | null | null | montepython/MontePython.py | enisbelgacem/montepython_public | e829e8bb1185a166e6a02e013cf419469288947e | [
"MIT"
] | null | null | null | montepython/MontePython.py | enisbelgacem/montepython_public | e829e8bb1185a166e6a02e013cf419469288947e | [
"MIT"
] | null | null | null | #!/usr/bin/python
"""
.. module:: MontePython
:synopsis: Main module
.. moduleauthor:: Benjamin Audren <benjamin.audren@epfl.ch>
Monte Python, a Monte Carlo Markov Chain code (with Class!)
"""
import sys
import warnings
import io_mp # all the input/output mechanisms
from run import run
# -----------------M... | 29.341463 | 79 | 0.634248 |
7980600a8c9a72943399e85fe0b2230212c5a289 | 4,873 | py | Python | src/third_party/wiredtiger/test/suite/test_metadata_cursor01.py | SunguckLee/real-mongodb | fef0e44fafc6d3709a84101327e7d2f54dd18d88 | [
"Apache-2.0"
] | 4 | 2018-02-06T01:53:12.000Z | 2018-02-20T01:47:36.000Z | src/third_party/wiredtiger/test/suite/test_metadata_cursor01.py | SunguckLee/real-mongodb | fef0e44fafc6d3709a84101327e7d2f54dd18d88 | [
"Apache-2.0"
] | null | null | null | src/third_party/wiredtiger/test/suite/test_metadata_cursor01.py | SunguckLee/real-mongodb | fef0e44fafc6d3709a84101327e7d2f54dd18d88 | [
"Apache-2.0"
] | 3 | 2018-02-06T01:53:18.000Z | 2021-07-28T09:48:15.000Z | #!/usr/bin/env python
#
# Public Domain 2014-2016 MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as ... | 35.569343 | 88 | 0.638416 |
798062f453d468b2650a5c1e411594f15f64ff12 | 71,955 | py | Python | pwnlib/tubes/ssh.py | wzdiyb/pwntools | ed3c30aed344bd520fd57f5853bcf850e97ccb3e | [
"MIT"
] | 2 | 2015-05-09T03:21:45.000Z | 2017-01-24T18:50:07.000Z | pwnlib/tubes/ssh.py | wzdiyb/pwntools | ed3c30aed344bd520fd57f5853bcf850e97ccb3e | [
"MIT"
] | null | null | null | pwnlib/tubes/ssh.py | wzdiyb/pwntools | ed3c30aed344bd520fd57f5853bcf850e97ccb3e | [
"MIT"
] | 1 | 2020-12-03T07:19:00.000Z | 2020-12-03T07:19:00.000Z | from __future__ import absolute_import
from __future__ import division
import inspect
import logging
import os
import re
import shutil
import six
import string
import sys
import tarfile
import tempfile
import threading
import time
import types
from pwnlib import term
from pwnlib.context import context
from pwnlib.log... | 34.28061 | 147 | 0.541116 |
798063acf15c605257e758ec9f39b011a92c2ce8 | 3,014 | py | Python | OMDCTools/recover9.py | clarancepeng/HKEXSimulator | 6ae95970a67bd41f896e480b39180eea464686da | [
"MIT"
] | null | null | null | OMDCTools/recover9.py | clarancepeng/HKEXSimulator | 6ae95970a67bd41f896e480b39180eea464686da | [
"MIT"
] | null | null | null | OMDCTools/recover9.py | clarancepeng/HKEXSimulator | 6ae95970a67bd41f896e480b39180eea464686da | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import socket
import time
import struct
import binascii
MaxBytes=1024*1024
host ='10.1.90.42'
port = 55455
# packet head(16bit): PktSize(Uint16, len=2), MsgCount(Uint8, len=1), Filter(String, len=1), SeqNum=(Uint32, len=4), SendTime(Long, len=4)
# Msg=Packet Head + MsgSize(Uint16, len=2), MsgT... | 41.861111 | 231 | 0.63205 |
798063dd3a435be2934464854b3c036bfab89a4a | 983 | py | Python | Task1D.py | AyanShoaib/flood-warning-project-72 | 84a9b24ad6d22b177d3d5d7c4a1c780ea7d48949 | [
"MIT"
] | null | null | null | Task1D.py | AyanShoaib/flood-warning-project-72 | 84a9b24ad6d22b177d3d5d7c4a1c780ea7d48949 | [
"MIT"
] | null | null | null | Task1D.py | AyanShoaib/flood-warning-project-72 | 84a9b24ad6d22b177d3d5d7c4a1c780ea7d48949 | [
"MIT"
] | 1 | 2022-02-03T17:04:14.000Z | 2022-02-03T17:04:14.000Z |
from floodsystem.stationdata import build_station_list
from floodsystem.geo import rivers_with_stations
from floodsystem.geo import stations_by_river
def riverswithstation_run():
stations = build_station_list()
print("There are {} rivers with stations, below are the first 10 in alphabetical arrangemnet".f... | 25.205128 | 145 | 0.733469 |
798064a357bb22be93a7641a959559dc255a0275 | 6,923 | py | Python | codalab/worker_manager/gcp_batch_worker_manager.py | kl-chou/codalab-worksheets | 101d1d9f86d3f7b8dae3b4fc3e2335fcf8d7c3d7 | [
"Apache-2.0"
] | null | null | null | codalab/worker_manager/gcp_batch_worker_manager.py | kl-chou/codalab-worksheets | 101d1d9f86d3f7b8dae3b4fc3e2335fcf8d7c3d7 | [
"Apache-2.0"
] | 96 | 2020-07-02T06:11:57.000Z | 2020-10-12T19:30:42.000Z | codalab/worker_manager/gcp_batch_worker_manager.py | kl-chou/codalab-worksheets | 101d1d9f86d3f7b8dae3b4fc3e2335fcf8d7c3d7 | [
"Apache-2.0"
] | null | null | null | try:
from google.cloud.container_v1 import ClusterManagerClient # type: ignore
from google.oauth2 import service_account # type: ignore
from kubernetes import client, utils # type: ignore
from kubernetes.utils.create_from_yaml import FailToCreateError # type: ignore
except ModuleNotFoundError:
r... | 43.540881 | 114 | 0.593818 |
79806520bb5d47ccac30843669c50277026855f4 | 2,989 | py | Python | yoti_python_sdk/tests/doc_scan/session/create/task/test_text_extraction_task.py | getyoti/python | 3df169145d5c818d0e79743768dde78e482eec9b | [
"MIT"
] | 9 | 2017-11-12T05:38:58.000Z | 2021-08-04T16:33:26.000Z | yoti_python_sdk/tests/doc_scan/session/create/task/test_text_extraction_task.py | getyoti/python | 3df169145d5c818d0e79743768dde78e482eec9b | [
"MIT"
] | 237 | 2017-04-26T09:40:44.000Z | 2022-02-24T10:29:43.000Z | yoti_python_sdk/tests/doc_scan/session/create/task/test_text_extraction_task.py | getyoti/python | 3df169145d5c818d0e79743768dde78e482eec9b | [
"MIT"
] | 9 | 2017-05-02T11:41:44.000Z | 2021-04-28T13:49:20.000Z | import json
import unittest
from yoti_python_sdk.doc_scan.session.create.task import (
RequestedTextExtractionTaskBuilder,
)
from yoti_python_sdk.doc_scan.session.create.task.requested_task import RequestedTask
from yoti_python_sdk.doc_scan.session.create.task.text_extraction import (
RequestedTextExtractionTa... | 34.356322 | 88 | 0.73001 |
7980656ca51ef8c8a9359f5a3f8f7923275eb4c0 | 1,142 | py | Python | initialize_database.py | Polygonalr/arbron-report-redux | ce8c3e07aebdd705a1a0eb81a355b707db3eafd8 | [
"MIT"
] | null | null | null | initialize_database.py | Polygonalr/arbron-report-redux | ce8c3e07aebdd705a1a0eb81a355b707db3eafd8 | [
"MIT"
] | null | null | null | initialize_database.py | Polygonalr/arbron-report-redux | ce8c3e07aebdd705a1a0eb81a355b707db3eafd8 | [
"MIT"
] | null | null | null | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from dotenv import load_dotenv
import tempfile
import os
from app import app, db
load_dotenv()
def initialize_database(db_filename=os.getenv("SQLALCHEMY_DATABASE_FILENAME")):
# app.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:///"+db_filename
# d... | 32.628571 | 129 | 0.695271 |
798067b57d320c870d9de8c86df0e00f8f30a412 | 1,687 | py | Python | tests/readers/test_text_reader.py | ALMSIVI/novel_tools | d1511607c5055ab293ce6b1294810c127ab9c01d | [
"WTFPL"
] | 1 | 2020-08-03T02:29:20.000Z | 2020-08-03T02:29:20.000Z | tests/readers/test_text_reader.py | ALMSIVI/novel_tools | d1511607c5055ab293ce6b1294810c127ab9c01d | [
"WTFPL"
] | null | null | null | tests/readers/test_text_reader.py | ALMSIVI/novel_tools | d1511607c5055ab293ce6b1294810c127ab9c01d | [
"WTFPL"
] | null | null | null | from pathlib import Path
from pytest import fixture, FixtureRequest, mark, raises
from pytest_mock import MockerFixture
from typing import Iterator
from novel_tools.common import NovelData, Type
from novel_tools.readers.text_reader import TextReader
@fixture
def read(mocker: MockerFixture, request: FixtureRequest):
... | 40.166667 | 110 | 0.707765 |
7980681a628fd4971cdcd0731b4e89b95e8009fe | 2,668 | py | Python | seahub/onlyoffice/utils.py | gzy403999903/seahub | 992e5852579a6d9e0cfdaf18c77ce0191cb64449 | [
"Apache-2.0"
] | null | null | null | seahub/onlyoffice/utils.py | gzy403999903/seahub | 992e5852579a6d9e0cfdaf18c77ce0191cb64449 | [
"Apache-2.0"
] | 6 | 2019-12-13T09:55:45.000Z | 2022-03-11T23:47:29.000Z | seahub/onlyoffice/utils.py | gzy403999903/seahub | 992e5852579a6d9e0cfdaf18c77ce0191cb64449 | [
"Apache-2.0"
] | 1 | 2019-05-16T06:58:16.000Z | 2019-05-16T06:58:16.000Z | import os
import json
import hashlib
import urlparse
import posixpath
from django.core.cache import cache
from django.core.urlresolvers import reverse
from django.utils.encoding import force_bytes
from seaserv import seafile_api
from seahub.utils import get_file_type_and_ext, gen_file_get_url, \
get_site_sch... | 34.205128 | 100 | 0.689655 |
798068b33f7314fcf743faf0b371a09f5693400e | 19,747 | py | Python | Alignment/OfflineValidation/test/test_all_cfg.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 6 | 2017-09-08T14:12:56.000Z | 2022-03-09T23:57:01.000Z | Alignment/OfflineValidation/test/test_all_cfg.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 545 | 2017-09-19T17:10:19.000Z | 2022-03-07T16:55:27.000Z | Alignment/OfflineValidation/test/test_all_cfg.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 14 | 2017-10-04T09:47:21.000Z | 2019-10-23T18:04:45.000Z | from __future__ import print_function
import FWCore.ParameterSet.Config as cms
import sys
from enum import Enum
from PhysicsTools.PatAlgos.patInputFiles_cff import filesRelValTTbarPileUpGENSIMRECO
class RefitType(Enum):
STANDARD = 1
COMMON = 2
isDA = True
isMC = True
allFromGT = True
applyBows = True
app... | 56.581662 | 136 | 0.466299 |
79806a931e446ac48179ffc4c6660fa93cb855fa | 1,123 | py | Python | src/contents/input.py | pavanad/content-maker | 4bd852dab990bb9a01fd8d104f95881ccb5cb8dc | [
"MIT"
] | 1 | 2019-12-26T20:16:17.000Z | 2019-12-26T20:16:17.000Z | src/contents/input.py | pavanad/content-maker | 4bd852dab990bb9a01fd8d104f95881ccb5cb8dc | [
"MIT"
] | null | null | null | src/contents/input.py | pavanad/content-maker | 4bd852dab990bb9a01fd8d104f95881ccb5cb8dc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
from colorama import Fore
def ask_search_term(content: dict):
resp = input("\n> Choose language for search [en/pt] ").lower().strip()
if resp not in ["en", "pt"]:
print(
f"\n> {Fore.CYAN}[content-maker]{Fore.RESET} {Fore.RED}Language not supported{Fore.... | 25.522727 | 104 | 0.644702 |
79806aadfadd4461416b2d485fb9b33a620f48ef | 118,116 | py | Python | arcrest/server.py | Mause/arcrest | b58b94a27b841dc17813ab813a12428c226a5d90 | [
"Apache-2.0"
] | null | null | null | arcrest/server.py | Mause/arcrest | b58b94a27b841dc17813ab813a12428c226a5d90 | [
"Apache-2.0"
] | null | null | null | arcrest/server.py | Mause/arcrest | b58b94a27b841dc17813ab813a12428c226a5d90 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""The ArcGIS Server REST API, short for Representational State Transfer,
provides a simple, open Web interface to services hosted by ArcGIS Server.
All resources and operations exposed by the REST API are accessible through
a hierarchy of endpoints or Uniform Resource Locators (URLs) for each... | 45.675174 | 93 | 0.567341 |
79806ab23f62dbbcec35e0cfb69e9cd720e3a339 | 1,135 | py | Python | validate.py | founture123/LSAFGCMR | 5e032e1e2e14710f6b058cd0a796ba335382c2b7 | [
"MIT"
] | null | null | null | validate.py | founture123/LSAFGCMR | 5e032e1e2e14710f6b058cd0a796ba335382c2b7 | [
"MIT"
] | null | null | null | validate.py | founture123/LSAFGCMR | 5e032e1e2e14710f6b058cd0a796ba335382c2b7 | [
"MIT"
] | null | null | null | import sys
import torch
from torch.autograd import Variable
def validate(loader, model, args, flag):
model.eval()
# if args.gpu is not None:
# model = model.module
total_output = []
total_label = []
start_model = True
for i, (input, target) in enumerate(loader):
wi... | 32.428571 | 105 | 0.580617 |
79806ae9bf4c26bb7d064f9c035bcc3b51a2ba15 | 7,170 | py | Python | Python/MISC/4inARow.py | vdrey/Toolbox | d268ad08c50d1dfaa9589a8f6269deead60a7f80 | [
"MIT"
] | null | null | null | Python/MISC/4inARow.py | vdrey/Toolbox | d268ad08c50d1dfaa9589a8f6269deead60a7f80 | [
"MIT"
] | 4 | 2015-02-16T00:36:06.000Z | 2015-02-16T23:52:54.000Z | Python/MISC/4inARow.py | vdrey/Toolbox | d268ad08c50d1dfaa9589a8f6269deead60a7f80 | [
"MIT"
] | null | null | null | # Four-In-A-Row (a Connect Four clone)
# http://inventwithpython.com/blog
# By Al Sweigart al@inventwithpython.com
import random
import copy
import sys
BOARDWIDTH = 12
BOARDHEIGHT = 4
def main():
"""
b = getNewBoard()
b[6][5] = 'X'
b[5][4] = 'X'
b[4][3] = 'X'
b[3][2] = 'X'
drawBoard(b)
... | 28.795181 | 119 | 0.545746 |
79806c3a4d52df5c34c9714d8d6725e9f30a0016 | 2,473 | py | Python | tests/properties_test.py | FabianoBFCarvalho/api-python | fbe8005da2207c45b1f2ca593a160e5f74d35171 | [
"Apache-2.0"
] | null | null | null | tests/properties_test.py | FabianoBFCarvalho/api-python | fbe8005da2207c45b1f2ca593a160e5f74d35171 | [
"Apache-2.0"
] | null | null | null | tests/properties_test.py | FabianoBFCarvalho/api-python | fbe8005da2207c45b1f2ca593a160e5f74d35171 | [
"Apache-2.0"
] | null | null | null | from google.appengine.ext import testbed
import webapp2
import webtest
import unittest
import json
from views.properties import Properties
from models.property import Property
class AppTest(unittest.TestCase):
def setUp(self):
app = webapp2.WSGIApplication([(r'/properties?/?([a-zA-Z0-9_-]*)', Properties)... | 44.160714 | 102 | 0.60372 |
7980700434bfef32cf7bd4d9dc2fa450489bf0b3 | 7,865 | py | Python | t3f/tensor_train.py | mabounassif/t3f | 28acf14812481f6a47ea6dbedeb55048e2e6203b | [
"MIT"
] | 217 | 2017-01-19T17:56:28.000Z | 2022-03-04T08:05:55.000Z | t3f/tensor_train.py | mabounassif/t3f | 28acf14812481f6a47ea6dbedeb55048e2e6203b | [
"MIT"
] | 155 | 2017-03-06T11:03:18.000Z | 2022-03-21T17:52:54.000Z | t3f/tensor_train.py | mabounassif/t3f | 28acf14812481f6a47ea6dbedeb55048e2e6203b | [
"MIT"
] | 61 | 2017-03-07T06:24:16.000Z | 2022-03-29T09:17:23.000Z | import tensorflow as tf
from t3f.tensor_train_base import TensorTrainBase
from t3f import shapes
class TensorTrain(TensorTrainBase):
"""Represents a Tensor Train object (a TT-tensor or TT-matrix).
t3f represents a Tensor Train object as a tuple of TT-cores.
"""
def __init__(self, tt_cores, shape=None, tt_r... | 36.412037 | 80 | 0.629243 |
798070126790845716e8469e8c07873ddf90e0a4 | 985 | py | Python | sdk/python/kfp/__init__.py | jackwhelpton/pipelines | 48216bc44c3d242cbba6a1f5e91493c6bc631536 | [
"Apache-2.0"
] | null | null | null | sdk/python/kfp/__init__.py | jackwhelpton/pipelines | 48216bc44c3d242cbba6a1f5e91493c6bc631536 | [
"Apache-2.0"
] | null | null | null | sdk/python/kfp/__init__.py | jackwhelpton/pipelines | 48216bc44c3d242cbba6a1f5e91493c6bc631536 | [
"Apache-2.0"
] | null | null | null | # 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 agreed to in writing, ... | 35.178571 | 100 | 0.769543 |
79807045781ad9ad33148696b58fc4b43f221c96 | 1,096 | py | Python | orquesta/tests/unit/composition/native/base.py | batk0/orquesta | f03f3f2f3820bf111a9277f4f6c5d6c83a89d004 | [
"Apache-2.0"
] | null | null | null | orquesta/tests/unit/composition/native/base.py | batk0/orquesta | f03f3f2f3820bf111a9277f4f6c5d6c83a89d004 | [
"Apache-2.0"
] | null | null | null | orquesta/tests/unit/composition/native/base.py | batk0/orquesta | f03f3f2f3820bf111a9277f4f6c5d6c83a89d004 | [
"Apache-2.0"
] | null | null | null | # 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... | 34.25 | 74 | 0.745438 |
7980708fdfbe123fa8025dd29f80d7d949d2cb3d | 19,248 | py | Python | zonemanager/drivers/cisco/cisco_fc_zone_client_cli.py | hybrid-storage-dev/cinder-fs-111t-hybrid-cherry | 86eb7e8b71c26bc39164fa18a9faa1065e4c1fc1 | [
"Apache-2.0"
] | null | null | null | zonemanager/drivers/cisco/cisco_fc_zone_client_cli.py | hybrid-storage-dev/cinder-fs-111t-hybrid-cherry | 86eb7e8b71c26bc39164fa18a9faa1065e4c1fc1 | [
"Apache-2.0"
] | null | null | null | zonemanager/drivers/cisco/cisco_fc_zone_client_cli.py | hybrid-storage-dev/cinder-fs-111t-hybrid-cherry | 86eb7e8b71c26bc39164fa18a9faa1065e4c1fc1 | [
"Apache-2.0"
] | null | null | null | # (c) Copyright 2014 Cisco Systems 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
#
# Unl... | 39.768595 | 79 | 0.52234 |
798071bab90c03749b156a0666a2fe72233f185c | 2,987 | py | Python | test/torbenHelloWorld_server_test.py | tnn111/torbenHelloWorld | 93437facf3c4d1599a860d3c6a57f05d30925ad3 | [
"MIT"
] | null | null | null | test/torbenHelloWorld_server_test.py | tnn111/torbenHelloWorld | 93437facf3c4d1599a860d3c6a57f05d30925ad3 | [
"MIT"
] | null | null | null | test/torbenHelloWorld_server_test.py | tnn111/torbenHelloWorld | 93437facf3c4d1599a860d3c6a57f05d30925ad3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import time
import unittest
from configparser import ConfigParser
from torbenHelloWorld.torbenHelloWorldImpl import torbenHelloWorld
from torbenHelloWorld.torbenHelloWorldServer import MethodContext
from torbenHelloWorld.authclient import KBaseAuth as _KBaseAuth
from installed_client... | 42.671429 | 104 | 0.603616 |
798071d1e47f93d1e334e6c35604430f8201e246 | 1,706 | py | Python | tfx/orchestration/experimental/interactive/execution_result.py | Anon-Artist/tfx | 2692c9ab437d76b5d9517996bfe2596862e0791d | [
"Apache-2.0"
] | 2 | 2021-05-10T21:39:48.000Z | 2021-11-17T11:24:29.000Z | tfx/orchestration/experimental/interactive/execution_result.py | Anon-Artist/tfx | 2692c9ab437d76b5d9517996bfe2596862e0791d | [
"Apache-2.0"
] | 1 | 2020-11-10T02:21:30.000Z | 2020-11-10T02:21:30.000Z | tfx/orchestration/experimental/interactive/execution_result.py | Anon-Artist/tfx | 2692c9ab437d76b5d9517996bfe2596862e0791d | [
"Apache-2.0"
] | 1 | 2021-01-28T13:41:51.000Z | 2021-01-28T13:41:51.000Z | # Lint as: python2, python3
# Copyright 2019 Google LLC. 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 req... | 34.12 | 74 | 0.696366 |
79807253be974f613ee6ffc1d1910f8d9b8156d5 | 1,123 | py | Python | space/src/dataset/atari.py | nguyendohoangkhoi/Deductive-Exploration | 371502f00305d8f2e6c14b65eaa8686d2a5609e4 | [
"MIT"
] | null | null | null | space/src/dataset/atari.py | nguyendohoangkhoi/Deductive-Exploration | 371502f00305d8f2e6c14b65eaa8686d2a5609e4 | [
"MIT"
] | null | null | null | space/src/dataset/atari.py | nguyendohoangkhoi/Deductive-Exploration | 371502f00305d8f2e6c14b65eaa8686d2a5609e4 | [
"MIT"
] | null | null | null | import os
import sys
import torch
import numpy as np
from torch.utils.data import Dataset
from PIL import Image
import PIL
class Atari(Dataset):
def __init__(self, root, mode, gamelist=None):
assert mode in ['train', 'validation', 'test'], f'Invalid dataset mode "{mode}"'
# self.image_path... | 31.194444 | 88 | 0.595726 |
79807340e9158573c3464fb08fd0ca5b39d8ae19 | 1,395 | py | Python | tests/test_dispatchers.py | krakozaure/pyzzy | 17a316c0ced8095b671186c73fb5bf1daa2c140b | [
"MIT"
] | null | null | null | tests/test_dispatchers.py | krakozaure/pyzzy | 17a316c0ced8095b671186c73fb5bf1daa2c140b | [
"MIT"
] | null | null | null | tests/test_dispatchers.py | krakozaure/pyzzy | 17a316c0ced8095b671186c73fb5bf1daa2c140b | [
"MIT"
] | null | null | null | from collections.abc import MutableMapping, MutableSequence
from pyzzy.utils.dispatchers import predicate_dispatch, predicate_match
def is_mapping(var):
return isinstance(var, MutableMapping)
def is_sequence(var):
return isinstance(var, MutableSequence)
@predicate_dispatch
def uppercase(var):... | 24.473684 | 72 | 0.687455 |
79807578fe3089bc86dfc2c88642f95fbb446185 | 68 | py | Python | staticfg/__init__.py | nancypareta/nancy | d066f3acd0a304815488f2f7f1de0d8c47cdaf12 | [
"Apache-2.0"
] | 120 | 2018-10-21T12:11:54.000Z | 2022-03-27T20:58:12.000Z | staticfg/__init__.py | nancypareta/nancy | d066f3acd0a304815488f2f7f1de0d8c47cdaf12 | [
"Apache-2.0"
] | 101 | 2021-06-09T14:19:59.000Z | 2022-01-24T13:24:39.000Z | staticfg/__init__.py | nancypareta/nancy | d066f3acd0a304815488f2f7f1de0d8c47cdaf12 | [
"Apache-2.0"
] | 28 | 2018-12-24T13:34:06.000Z | 2022-03-11T19:31:28.000Z | from .builder import CFGBuilder
from .model import Block, Link, CFG
| 22.666667 | 35 | 0.794118 |
798075af45c50d04a78d5cfc20e25bf97a1e6916 | 9,707 | py | Python | sdk/python/pulumi_azure_native/dbformysql/v20200701privatepreview/database.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/dbformysql/v20200701privatepreview/database.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/dbformysql/v20200701privatepreview/database.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
__... | 41.306383 | 561 | 0.638199 |
79807650e67a35c33422c1d55db3653099666356 | 1,171 | py | Python | canteenWeb/urls.py | preet4737/canteen-automation-web | d379c22b9d5d90db5f58797b048bfa93069cdf66 | [
"MIT"
] | null | null | null | canteenWeb/urls.py | preet4737/canteen-automation-web | d379c22b9d5d90db5f58797b048bfa93069cdf66 | [
"MIT"
] | null | null | null | canteenWeb/urls.py | preet4737/canteen-automation-web | d379c22b9d5d90db5f58797b048bfa93069cdf66 | [
"MIT"
] | null | null | null | """
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examplauthes:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an i... | 36.59375 | 77 | 0.719044 |
7980772918778f7dcdb56e41dd65e0ff34c99c35 | 123 | py | Python | backend/ozon/__init__.py | libremente/service-app | 3cc710d2d91ca61c9f628dd023326c16cf934c51 | [
"MIT"
] | null | null | null | backend/ozon/__init__.py | libremente/service-app | 3cc710d2d91ca61c9f628dd023326c16cf934c51 | [
"MIT"
] | null | null | null | backend/ozon/__init__.py | libremente/service-app | 3cc710d2d91ca61c9f628dd023326c16cf934c51 | [
"MIT"
] | null | null | null | import sys
import pathlib
pathlib.Path(__file__).parent.resolve()
sys.path.append(pathlib.Path(__file__).parent.resolve())
| 24.6 | 56 | 0.804878 |
7980779f3f0dab5a24519569ed37f61dbbff0b52 | 179 | py | Python | src/controller/__init__.py | Matimed/Barbarism | 4892092f24f314bc6cfacc1c780436dc59fc90ac | [
"MIT"
] | 2 | 2021-09-09T14:03:40.000Z | 2021-11-03T03:35:55.000Z | src/controller/__init__.py | Matimed/Barbarism | 4892092f24f314bc6cfacc1c780436dc59fc90ac | [
"MIT"
] | null | null | null | src/controller/__init__.py | Matimed/Barbarism | 4892092f24f314bc6cfacc1c780436dc59fc90ac | [
"MIT"
] | null | null | null | from src.controller.event_dispatcher import EventDispatcher
from src.controller.tick_controller import TickController
from src.controller.pygame_controller import PygameController | 59.666667 | 61 | 0.905028 |
79807835a762655a67235b9c878ba07dbcef9cac | 5,272 | py | Python | orb_simulator/simulation/quadtree_testing.py | dmguezjaviersnet/IA-Sim-Comp-Project | 8165b9546efc45f98091a3774e2dae4f45942048 | [
"MIT"
] | 1 | 2022-01-19T22:49:09.000Z | 2022-01-19T22:49:09.000Z | orb_simulator/simulation/quadtree_testing.py | dmguezjaviersnet/IA-Sim-Comp-Project | 8165b9546efc45f98091a3774e2dae4f45942048 | [
"MIT"
] | 15 | 2021-11-10T14:25:02.000Z | 2022-02-12T19:17:11.000Z | orb_simulator/simulation/quadtree_testing.py | dmguezjaviersnet/IA-Sim-Comp-Project | 8165b9546efc45f98091a3774e2dae4f45942048 | [
"MIT"
] | null | null | null | # from typing import List, Tuple
# import pygame
# import random
# from enum import Enum, IntEnum
# from orbsim_simulation_entities import OrbsimObj, Point, SpaceDebris, OrbsimAgent
# # Function to check if a 'point' is contained in a 'region'
# def contained(object: OrbsimObj, region: Tuple[int, int]):
# top_left = ... | 34.913907 | 127 | 0.661039 |
798078595488ca23d86a2f98af0153e661f2c6be | 4,254 | py | Python | mininet/MeshTopo.py | evangstav/FlowMonitoringAndAnalysis | c7204ff4eb3aeebdaccb4e528c73211688f7284d | [
"MIT"
] | null | null | null | mininet/MeshTopo.py | evangstav/FlowMonitoringAndAnalysis | c7204ff4eb3aeebdaccb4e528c73211688f7284d | [
"MIT"
] | null | null | null | mininet/MeshTopo.py | evangstav/FlowMonitoringAndAnalysis | c7204ff4eb3aeebdaccb4e528c73211688f7284d | [
"MIT"
] | 1 | 2020-04-08T12:22:51.000Z | 2020-04-08T12:22:51.000Z | #!/usr/bin/python
import pickle
from mininet.net import Mininet
from mininet.node import Controller, RemoteController, OVSController
from mininet.node import CPULimitedHost, Host, Node
from mininet.node import OVSKernelSwitch, UserSwitch
from mininet.node import IVSSwitch
from mininet.cli import CLI
from mininet.log i... | 35.45 | 87 | 0.605548 |
79807897da1e5a2748dd0f38bf3246594b007f09 | 1,793 | py | Python | novaclient/v2/assisted_volume_snapshots.py | dtroyer/python-novaclient | 4c483322fe5454c8ece66cc9c86cbc0702e14368 | [
"Apache-1.1"
] | null | null | null | novaclient/v2/assisted_volume_snapshots.py | dtroyer/python-novaclient | 4c483322fe5454c8ece66cc9c86cbc0702e14368 | [
"Apache-1.1"
] | null | null | null | novaclient/v2/assisted_volume_snapshots.py | dtroyer/python-novaclient | 4c483322fe5454c8ece66cc9c86cbc0702e14368 | [
"Apache-1.1"
] | 1 | 2019-01-11T16:15:52.000Z | 2019-01-11T16:15:52.000Z | # Copyright (C) 2013, Red Hat, 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... | 32.6 | 79 | 0.663692 |
79807961bf3f65172bf4c0ca05595a1de7e427ec | 257 | py | Python | manage.py | jsalado/django-DefectDojo | 2a8e2ef508791f979e91a554165ae276d86a05be | [
"BSD-3-Clause"
] | 3 | 2018-10-15T09:15:10.000Z | 2020-09-23T01:04:08.000Z | manage.py | jsalado/django-DefectDojo | 2a8e2ef508791f979e91a554165ae276d86a05be | [
"BSD-3-Clause"
] | 85 | 2019-02-11T17:02:02.000Z | 2021-07-15T05:20:05.000Z | manage.py | jsalado/django-DefectDojo | 2a8e2ef508791f979e91a554165ae276d86a05be | [
"BSD-3-Clause"
] | 3 | 2018-06-05T10:27:12.000Z | 2019-10-01T00:00:15.000Z | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dojo.settings.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| 21.416667 | 77 | 0.770428 |
79807987ab8993d0f97338e6a6c088dbc2dc4fe0 | 15,830 | py | Python | sympy/interactive/printing.py | toolforger/sympy | adc391f00e1e35d27925efb0314ec8abde9d255d | [
"BSD-3-Clause"
] | 1 | 2020-08-12T23:09:42.000Z | 2020-08-12T23:09:42.000Z | sympy/interactive/printing.py | toolforger/sympy | adc391f00e1e35d27925efb0314ec8abde9d255d | [
"BSD-3-Clause"
] | null | null | null | sympy/interactive/printing.py | toolforger/sympy | adc391f00e1e35d27925efb0314ec8abde9d255d | [
"BSD-3-Clause"
] | null | null | null | """Tools for setting up printing in interactive sessions. """
from __future__ import print_function, division
import sys
from distutils.version import LooseVersion as V
from io import BytesIO
from sympy import latex as default_latex
from sympy import preview
from sympy.core.compatibility import integer_types
from sy... | 37.961631 | 95 | 0.608275 |
7980798ce54083dc258cef571055719a49eac644 | 6,261 | py | Python | forthic/module.py | absheik/forthic | 1d481f8a4c0c1cc7250eb5886bed43dfb4f201c0 | [
"BSD-2-Clause"
] | null | null | null | forthic/module.py | absheik/forthic | 1d481f8a4c0c1cc7250eb5886bed43dfb4f201c0 | [
"BSD-2-Clause"
] | null | null | null | forthic/module.py | absheik/forthic | 1d481f8a4c0c1cc7250eb5886bed43dfb4f201c0 | [
"BSD-2-Clause"
] | null | null | null | from .interfaces import IInterpreter, IModule, IWord
from typing import Any, Callable, List, Dict, Optional
class Variable:
"""Represents a Forthic variable"""
def __init__(self, value: Any = None):
self.value = value
def set_value(self, val):
self.value = val
def get_value(self):
... | 34.977654 | 112 | 0.643667 |
798079fd8e8d17d16cf30b5e1c554857ab7b9e24 | 13,678 | py | Python | notebooks/64.2-BDP-threshold-investigations.py | zeou1/maggot_models | 4e1b518c2981ab1ca9607099c3813e8429d94ca4 | [
"BSD-3-Clause"
] | null | null | null | notebooks/64.2-BDP-threshold-investigations.py | zeou1/maggot_models | 4e1b518c2981ab1ca9607099c3813e8429d94ca4 | [
"BSD-3-Clause"
] | null | null | null | notebooks/64.2-BDP-threshold-investigations.py | zeou1/maggot_models | 4e1b518c2981ab1ca9607099c3813e8429d94ca4 | [
"BSD-3-Clause"
] | null | null | null | # %% [markdown]
# # Imports
import os
import random
from operator import itemgetter
from pathlib import Path
import colorcet as cc
import matplotlib.colors as mplc
import matplotlib.pyplot as plt
import networkx as nx
import numpy as np
import pandas as pd
import seaborn as sns
from graspy.cluster import AutoGMMClust... | 31.086364 | 91 | 0.681752 |
79807a61f49c99150e127575ce4d4c5f1be35d34 | 2,590 | py | Python | ftp.py | Iggersm00/Archiveteam-Ftp-gov | f58f7dc8ca67d505e48d385c89253444ebce2368 | [
"Unlicense"
] | 3 | 2018-05-02T23:58:59.000Z | 2021-05-16T16:15:47.000Z | ftp.py | Iggersm00/Archiveteam-Ftp-gov | f58f7dc8ca67d505e48d385c89253444ebce2368 | [
"Unlicense"
] | null | null | null | ftp.py | Iggersm00/Archiveteam-Ftp-gov | f58f7dc8ca67d505e48d385c89253444ebce2368 | [
"Unlicense"
] | 3 | 2015-12-13T05:38:21.000Z | 2018-05-15T19:36:33.000Z | import sys
import urllib.request
import os
import re
wpull_hook = globals().get('wpull_hook') # silence code checkers
tries = 0
max_tries = 5
item_item = os.environ['item_item']
def handle_response(url_info, record_info, response_info):
global tries
global max_tries
response_code = response_info['respons... | 39.242424 | 159 | 0.663707 |
79807aee70733c97d1208306d4d0c21fcb0ecf4f | 3,499 | py | Python | flocker/common/test/test_interface.py | wallnerryan/flocker-profiles | bcd3ced8edf4af86a68070ff6a714c45f9f4913b | [
"Apache-2.0"
] | null | null | null | flocker/common/test/test_interface.py | wallnerryan/flocker-profiles | bcd3ced8edf4af86a68070ff6a714c45f9f4913b | [
"Apache-2.0"
] | null | null | null | flocker/common/test/test_interface.py | wallnerryan/flocker-profiles | bcd3ced8edf4af86a68070ff6a714c45f9f4913b | [
"Apache-2.0"
] | null | null | null | # Copyright ClusterHQ Inc. See LICENSE file for details.
"""
Tests for ``flocker.common._interface``.
"""
from twisted.trial.unittest import SynchronousTestCase
from eliot.testing import (
assertHasMessage, capture_logging
)
from eliot import Field, MessageType
from zope.interface import Interface, implementer... | 25.918519 | 77 | 0.632181 |
79807c95ff05368ab6f889604e74c797fc2b1b36 | 1,472 | py | Python | SAER/src/utils/checkpoint.py | HCDM/XRec | dae7d3e1237b8e41913656eb33d81e78c61424ea | [
"MIT"
] | null | null | null | SAER/src/utils/checkpoint.py | HCDM/XRec | dae7d3e1237b8e41913656eb33d81e78c61424ea | [
"MIT"
] | null | null | null | SAER/src/utils/checkpoint.py | HCDM/XRec | dae7d3e1237b8e41913656eb33d81e78c61424ea | [
"MIT"
] | 1 | 2022-03-21T07:04:00.000Z | 2022-03-21T07:04:00.000Z | import os
import pickle
import torch
META_FILE = 'meta.pt'
class CheckpointManager:
def __init__(self, path):
self.path = path
def __fullpath(self, name):
return os.path.join(self.path, name)
def __ensure_folder(self):
if not os.path.exists(self.path):
os.makedirs(sel... | 25.37931 | 63 | 0.597147 |
79807d023db92e8b733a66387d32b2e08377b2a4 | 10,420 | py | Python | spotdl/handle.py | KrE80r/spotify-downloader | c0ad2b5bd2f5ad11e92869c7401b372bd82c4ac9 | [
"MIT"
] | 14 | 2019-04-14T20:56:01.000Z | 2020-12-27T18:19:08.000Z | spotdl/handle.py | Hydrayt777/spotify-downloader | c0ad2b5bd2f5ad11e92869c7401b372bd82c4ac9 | [
"MIT"
] | null | null | null | spotdl/handle.py | Hydrayt777/spotify-downloader | c0ad2b5bd2f5ad11e92869c7401b372bd82c4ac9 | [
"MIT"
] | 4 | 2020-11-04T03:56:40.000Z | 2021-09-05T15:12:39.000Z | from logzero import logger as log
import appdirs
import logging
import yaml
import argparse
import mimetypes
import os
import spotdl
from spotdl import internals
_LOG_LEVELS_STR = ["INFO", "WARNING", "ERROR", "DEBUG"]
default_conf = {
"spotify-downloader": {
"no-remove-original": False,
"manual... | 31.011905 | 96 | 0.591075 |
79807d64268a7d7cae94628f30179cedaae58456 | 13,908 | py | Python | vega/algorithms/nas/modnas/utils/wrapper.py | jie311/vega | 1bba6100ead802697e691403b951e6652a99ccae | [
"MIT"
] | null | null | null | vega/algorithms/nas/modnas/utils/wrapper.py | jie311/vega | 1bba6100ead802697e691403b951e6652a99ccae | [
"MIT"
] | null | null | null | vega/algorithms/nas/modnas/utils/wrapper.py | jie311/vega | 1bba6100ead802697e691403b951e6652a99ccae | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the MIT License.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the ... | 33.193317 | 113 | 0.646247 |
79807f8df7d46d8ef2a80ec26c6c9d19ce1968b5 | 769 | py | Python | setup.py | patilpuja/Meeting | 2394eb0af4ca8d06f270aabefa138eeda9fb7088 | [
"MIT"
] | null | null | null | setup.py | patilpuja/Meeting | 2394eb0af4ca8d06f270aabefa138eeda9fb7088 | [
"MIT"
] | null | null | null | setup.py | patilpuja/Meeting | 2394eb0af4ca8d06f270aabefa138eeda9fb7088 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from pip.req import parse_requirements
import re, ast
# get version from __version__ variable in meeting/__init__.py
_version_re = re.compile(r'__version__\s+=\s+(.*)')
with open('meeting/__init__.py', 'rb') as f:
version = str(ast.literal_eval(_... | 28.481481 | 68 | 0.73472 |
79807fd04266d54832bc0eed72c999eccb7f9208 | 5,714 | py | Python | project/app/api/wage_hospitality_viz.py | Lambda-School-Labs/Labs26-Citrics-DS-TeamC | 07420d8a6ecaf6ecfdb8229f918c8dc8bbc2a53b | [
"MIT"
] | null | null | null | project/app/api/wage_hospitality_viz.py | Lambda-School-Labs/Labs26-Citrics-DS-TeamC | 07420d8a6ecaf6ecfdb8229f918c8dc8bbc2a53b | [
"MIT"
] | 1 | 2020-09-10T23:23:44.000Z | 2020-09-10T23:23:44.000Z | project/app/api/wage_hospitality_viz.py | Lambda-School-Labs/Labs26-Citrics-DS-TeamC | 07420d8a6ecaf6ecfdb8229f918c8dc8bbc2a53b | [
"MIT"
] | 2 | 2020-10-28T15:28:15.000Z | 2020-11-02T22:28:23.000Z | from fastapi import APIRouter, HTTPException
import pandas as pd
import plotly.express as px
import json
from dotenv import load_dotenv
import os
import psycopg2
from sqlalchemy import create_engine
from sqlalchemy.types import Integer, Float, Text, String, DateTime
from fastapi.encoders import jsonable_encoder
from os... | 46.836066 | 336 | 0.634407 |
7980803c2eefff1dbdaa3ae5a359231fb7ada587 | 5,088 | py | Python | scripts/type_x509.py | gszr/lua-resty-openssl | 8c107e3dcf2006d6c453234278ab0a45109042d6 | [
"BSD-2-Clause"
] | 66 | 2019-10-03T22:15:51.000Z | 2022-03-08T07:26:14.000Z | scripts/type_x509.py | gszr/lua-resty-openssl | 8c107e3dcf2006d6c453234278ab0a45109042d6 | [
"BSD-2-Clause"
] | 26 | 2019-12-30T14:28:35.000Z | 2022-02-01T11:29:35.000Z | scripts/type_x509.py | gszr/lua-resty-openssl | 8c107e3dcf2006d6c453234278ab0a45109042d6 | [
"BSD-2-Clause"
] | 25 | 2019-11-05T06:23:03.000Z | 2022-02-24T09:08:06.000Z | import extension_struct as es
defines = {
"output": "../lib/resty/openssl/x509/init.lua",
"output_test": "../t/openssl/x509.t",
"type": "X509",
"has_extension_accessor_by_nid": True,
"extensions_in_struct":"cert_info.extensions",
"has_sign_verify": True,
"sample": "Github.pem",
"sample_... | 28.110497 | 106 | 0.656643 |
79808045bdbfe194a910476d28f312e0a51c636a | 31,607 | py | Python | docs/code/ConfigurationFuzzer.py | IMULMUL/fuzzingbook | b16f5bc5ff8b72486dd5b6236f3a9fbd5c0b4334 | [
"MIT"
] | 728 | 2018-09-21T03:51:04.000Z | 2022-03-28T09:35:04.000Z | docs/code/ConfigurationFuzzer.py | sthagen/fuzzingbook | 38759fe72b7f376bc6dc921dc624912696c417fe | [
"MIT"
] | 103 | 2018-09-02T12:26:32.000Z | 2022-02-09T07:19:08.000Z | docs/code/ConfigurationFuzzer.py | sthagen/fuzzingbook | 38759fe72b7f376bc6dc921dc624912696c417fe | [
"MIT"
] | 157 | 2018-09-02T08:00:50.000Z | 2022-03-27T22:04:50.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# "Testing Configurations" - a chapter of "The Fuzzing Book"
# Web site: https://www.fuzzingbook.org/html/ConfigurationFuzzer.html
# Last change: 2021-06-04 14:57:19+02:00
#
# Copyright (c) 2021 CISPA Helmholtz Center for Information Security
# Copyright (c) 2018-2020 Saa... | 29.050551 | 1,057 | 0.633499 |
798080864f92ca39efb28b247dc0b78e7ec426d4 | 2,028 | py | Python | extra_tests/snippets/stdlib_array.py | outkine/RustPython | e25443221c7852407a60eb38b0ba3c1c4e617d8f | [
"CC-BY-4.0",
"MIT"
] | 6 | 2021-09-03T16:20:54.000Z | 2021-11-14T19:40:12.000Z | extra_tests/snippets/stdlib_array.py | outkine/RustPython | e25443221c7852407a60eb38b0ba3c1c4e617d8f | [
"CC-BY-4.0",
"MIT"
] | 3 | 2020-10-30T17:35:55.000Z | 2020-11-05T12:24:05.000Z | extra_tests/snippets/stdlib_array.py | outkine/RustPython | e25443221c7852407a60eb38b0ba3c1c4e617d8f | [
"CC-BY-4.0",
"MIT"
] | 1 | 2022-01-05T04:27:06.000Z | 2022-01-05T04:27:06.000Z | from array import array
a1 = array("b", [0, 1, 2, 3])
assert a1.tobytes() == b"\x00\x01\x02\x03"
assert a1[2] == 2
assert list(a1) == [0, 1, 2, 3]
a1.reverse()
assert a1 == array("B", [3, 2, 1, 0])
a1.extend([4, 5, 6, 7])
assert a1 == array("h", [3, 2, 1, 0, 4, 5, 6, 7])
# eq, ne
a = array("b", [0, 1, 2, 3])
b =... | 22.786517 | 56 | 0.531558 |
7980816a7e2a147412ce1b0725248985c9757d4f | 984 | py | Python | metakernel/magics/tests/test_help_magic.py | StephanRempel/metakernel | 83bfb3304381808b813762ce3845a722182faac4 | [
"BSD-3-Clause"
] | 276 | 2015-01-28T11:18:56.000Z | 2022-03-24T06:56:54.000Z | metakernel/magics/tests/test_help_magic.py | StephanRempel/metakernel | 83bfb3304381808b813762ce3845a722182faac4 | [
"BSD-3-Clause"
] | 176 | 2015-01-16T01:08:45.000Z | 2022-03-03T17:26:03.000Z | metakernel/magics/tests/test_help_magic.py | StephanRempel/metakernel | 83bfb3304381808b813762ce3845a722182faac4 | [
"BSD-3-Clause"
] | 95 | 2015-01-16T01:05:37.000Z | 2022-02-26T18:03:23.000Z |
from metakernel.tests.utils import get_kernel, get_log_text, clear_log_text
def test_help_magic():
kernel = get_kernel()
kernel.do_execute('?%magic', None)
text = get_log_text(kernel)
assert '%magic - show installed magics' in text, repr(text)
kernel.do_execute('%lsmagic??', None)
text = get... | 27.333333 | 75 | 0.683943 |
798081a524b234efdaf4fcef234d7721d006be98 | 1,598 | py | Python | APIOxy.py | APIOxy/APIOxy | 8b13693b2a348e9c902f2ef7a4e52384f743b1f5 | [
"BSD-3-Clause-Clear"
] | 1 | 2020-11-13T19:31:47.000Z | 2020-11-13T19:31:47.000Z | APIOxy.py | APIOxy/APIOxy | 8b13693b2a348e9c902f2ef7a4e52384f743b1f5 | [
"BSD-3-Clause-Clear"
] | 1 | 2020-10-07T12:40:09.000Z | 2020-10-16T18:29:55.000Z | APIOxy.py | APIOxy/APIOxy | 8b13693b2a348e9c902f2ef7a4e52384f743b1f5 | [
"BSD-3-Clause-Clear"
] | null | null | null | """
APIOxy - A self-improving tool to predict oxidative stability of active pharmaceutical ingredients
"""
import logging
import os
from apioxy.common import read_yaml_file
from apioxy.main import APIOxy
from apioxy.parsing import parse_command_line_arguments
def main() -> None:
"""
The main APIOxy executab... | 30.150943 | 113 | 0.718398 |
798082d7e935f03f7c4a6b6b3b5b8d24abc39e8c | 7,751 | py | Python | tests/core/test_impersonation_tests.py | ywf5566/airflow | e7872dddbf275729b2c42e2a4ff602a6df7d1536 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 15 | 2017-04-06T09:01:50.000Z | 2021-10-02T13:54:31.000Z | tests/core/test_impersonation_tests.py | ywf5566/airflow | e7872dddbf275729b2c42e2a4ff602a6df7d1536 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 25 | 2018-03-12T16:14:58.000Z | 2021-09-29T17:32:48.000Z | tests/core/test_impersonation_tests.py | sendbird/airflow | bcc2fb2947de9d439326714e006afaf955f58e11 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 21 | 2017-08-20T03:01:05.000Z | 2021-09-07T06:47:51.000Z | # -*- coding: utf-8 -*-
#
# 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
#... | 31.897119 | 105 | 0.649336 |
798083edd080f9b41a9f66588a6ade77d984f6bb | 603 | py | Python | Kailash_Work/Basic_Functions/Func_Module.py | teamtact/learning-challenge-season-2 | aea5897df0e066f6c6ac1d5eb64584e23073db4f | [
"MIT"
] | 3 | 2019-07-01T14:38:12.000Z | 2019-07-11T18:57:16.000Z | Kailash_Work/Basic_Functions/Func_Module.py | teamtact/learning-challenge-season-2 | aea5897df0e066f6c6ac1d5eb64584e23073db4f | [
"MIT"
] | null | null | null | Kailash_Work/Basic_Functions/Func_Module.py | teamtact/learning-challenge-season-2 | aea5897df0e066f6c6ac1d5eb64584e23073db4f | [
"MIT"
] | 25 | 2019-07-01T08:58:40.000Z | 2019-07-02T05:55:31.000Z | #Importing factorial.py as module to find factorial
#Renaming factorial module as fact
import factorial as fact
#Importing fibonacci.py as module to find fibonacci series
#Renaming fibonacci module as fib
import fibonacci as fib
fact_inp = input("\nEnter the number to find its factorial : ")
#By de... | 31.736842 | 78 | 0.749585 |
798084ec0ee4e50e0c06f068c93dbd2f1eb12414 | 3,921 | py | Python | mcnet/components/counter.py | apanda/modeling | e032abd413bb3325ad6e5995abadeef74314f383 | [
"BSD-3-Clause"
] | 3 | 2017-08-30T05:24:11.000Z | 2021-02-25T12:17:19.000Z | mcnet/components/counter.py | apanda/modeling | e032abd413bb3325ad6e5995abadeef74314f383 | [
"BSD-3-Clause"
] | null | null | null | mcnet/components/counter.py | apanda/modeling | e032abd413bb3325ad6e5995abadeef74314f383 | [
"BSD-3-Clause"
] | 2 | 2017-11-15T07:00:48.000Z | 2020-12-13T17:29:03.000Z | from . import NetworkObject
import z3
class NetworkCounter (NetworkObject):
"""OK cannot count: this is sad"""
def _init (self, node, net, ctx):
super(NetworkCounter, self).init_fail(node)
self.node = node.z3Node
self.net = net
self.ctx = ctx
self.constraints = list()
... | 52.986486 | 118 | 0.435603 |
798085ae1e1e177aef74528c45d9fad6986df195 | 994 | py | Python | src/socialite/drivers/__init__.py | corentinalcoy/masonite-socialite | 32184820705b1aedc3ac7a5c61c507fc3314441a | [
"MIT"
] | null | null | null | src/socialite/drivers/__init__.py | corentinalcoy/masonite-socialite | 32184820705b1aedc3ac7a5c61c507fc3314441a | [
"MIT"
] | null | null | null | src/socialite/drivers/__init__.py | corentinalcoy/masonite-socialite | 32184820705b1aedc3ac7a5c61c507fc3314441a | [
"MIT"
] | null | null | null | from masonite.request import Request
from .SocialiteBaseDriver import SocialiteBaseDriver
AVAILABLE_PROVIDERS = [
'github', 'facebook',
'twitter', 'google',
'linkedin',
]
class SocialiteFacebookDriver(SocialiteBaseDriver):
def __init__(self, request: Request):
self.name = 'facebook'
... | 24.85 | 52 | 0.700201 |
798085e2ff8788692d9f5db808fa66ea22845d90 | 16,596 | py | Python | gears/programs.py | fmunoz-geo/gearhead-caramel | 315835481d543420826439245be01460fe6dd81b | [
"Apache-2.0"
] | 74 | 2015-03-09T00:33:09.000Z | 2022-02-25T20:28:27.000Z | gears/programs.py | fmunoz-geo/gearhead-caramel | 315835481d543420826439245be01460fe6dd81b | [
"Apache-2.0"
] | 108 | 2017-12-30T20:26:12.000Z | 2021-01-16T12:37:00.000Z | gears/programs.py | CartoonFan/gearhead-caramel | 61995f382923695176ab7a65253f42e849e0c4d7 | [
"Apache-2.0"
] | 61 | 2018-03-03T09:55:31.000Z | 2022-03-18T17:28:33.000Z | import pbge
from pbge import Singleton
from . import geffects
from . import scale
from . import stats
from . import aitargeters
from . import materials
import random
class Program(Singleton):
# Actual programs MUST fill in the below
name = 'Unknown Program'
USE_AT = ()
COST = 500
# Set this to Tr... | 51.8625 | 268 | 0.583635 |
798086100fbe41b3a501804d08db651969888f98 | 9,887 | py | Python | src/python/nimbusml/ensemble/gambinaryclassifier.py | montehoover/NimbusML | f6be39ce9359786976429bab0ccd837e849b4ba5 | [
"MIT"
] | 134 | 2018-11-01T22:15:24.000Z | 2019-05-04T11:30:08.000Z | src/python/nimbusml/ensemble/gambinaryclassifier.py | montehoover/NimbusML | f6be39ce9359786976429bab0ccd837e849b4ba5 | [
"MIT"
] | 226 | 2019-05-07T19:00:44.000Z | 2021-01-06T07:59:48.000Z | src/python/nimbusml/ensemble/gambinaryclassifier.py | montehoover/NimbusML | f6be39ce9359786976429bab0ccd837e849b4ba5 | [
"MIT"
] | 43 | 2019-05-15T20:19:42.000Z | 2022-03-30T10:26:07.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# --------------------------------------------------------------------------------------------
# - Generated by tools/entrypoint_co... | 38.470817 | 94 | 0.651664 |
798086a677ebbf594f2a90e7a3e3412494e5d114 | 3,967 | py | Python | spider/douyu_category.py | AcerFeng/Zhudao | 5a36d0dc7bd718ce03aa476a31b36d7b5230b1b7 | [
"MIT"
] | null | null | null | spider/douyu_category.py | AcerFeng/Zhudao | 5a36d0dc7bd718ce03aa476a31b36d7b5230b1b7 | [
"MIT"
] | null | null | null | spider/douyu_category.py | AcerFeng/Zhudao | 5a36d0dc7bd718ce03aa476a31b36d7b5230b1b7 | [
"MIT"
] | 1 | 2018-09-13T07:41:44.000Z | 2018-09-13T07:41:44.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Created on 2017-12-19 23:21:33
# Project: douyu_category
from pyspider.libs.base_handler import *
import pymysql
from datetime import datetime
class Handler(BaseHandler):
crawl_config = {
}
def __init__(self):
self.platform_id = 1
try... | 40.070707 | 150 | 0.410386 |
798086a79556b8b97298a8b3073801a757d0bf97 | 62,529 | py | Python | xnetgrpc/nixnetsocket_pb2.py | astarche/grpc-xnet-socket-examples | ee64906d8b1bbd73a5b1f3985142efcbf1bd7029 | [
"MIT"
] | null | null | null | xnetgrpc/nixnetsocket_pb2.py | astarche/grpc-xnet-socket-examples | ee64906d8b1bbd73a5b1f3985142efcbf1bd7029 | [
"MIT"
] | null | null | null | xnetgrpc/nixnetsocket_pb2.py | astarche/grpc-xnet-socket-examples | ee64906d8b1bbd73a5b1f3985142efcbf1bd7029 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: nixnetsocket.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_po... | 68.412473 | 22,235 | 0.824897 |
798086e5e04f76afcf91182ac812fd6d4cd01910 | 12,290 | py | Python | src/modules/ait_sdk/src/ait_sdk/common/files/ait_manifest_generator.py | ads-ad-itcenter/qunomon.forked | 48d532692d353fe2d3946f62b227f834f9349034 | [
"Apache-2.0"
] | 16 | 2020-11-18T05:43:55.000Z | 2021-11-27T14:43:26.000Z | src/modules/ait_sdk/src/ait_sdk/common/files/ait_manifest_generator.py | aistairc/qunomon | d4e9c5cb569b16addfbe6c33c73812065065a1df | [
"Apache-2.0"
] | 1 | 2022-03-23T07:55:54.000Z | 2022-03-23T13:24:11.000Z | src/modules/ait_sdk/src/ait_sdk/common/files/ait_manifest_generator.py | ads-ad-itcenter/qunomon.forked | 48d532692d353fe2d3946f62b227f834f9349034 | [
"Apache-2.0"
] | 3 | 2021-02-12T01:56:31.000Z | 2022-03-23T02:45:02.000Z | # Copyright © 2019 National Institute of Advanced Industrial Science and Technology (AIST). All rights reserved.
# !/usr/bin/env python3.6
# coding=utf-8
from typing import List
import json
from pathlib import Path
from ...utils.logging import log, get_logger
logger = get_logger()
class AITManifestGenerator:
"... | 27.80543 | 154 | 0.552319 |
798087b9479cd39741147b1a63790b708ebc9fbb | 3,497 | py | Python | src/dhapi/lib/auth.py | rayleighko/dhlottery-api | ba348bf506210fb8934e837b67f6e2721da89c79 | [
"Apache-2.0"
] | 4 | 2021-06-30T22:39:28.000Z | 2022-03-24T10:35:29.000Z | src/dhapi/lib/auth.py | rayleighko/dhlottery-api | ba348bf506210fb8934e837b67f6e2721da89c79 | [
"Apache-2.0"
] | 1 | 2021-07-19T04:15:15.000Z | 2021-07-19T04:15:15.000Z | src/dhapi/lib/auth.py | rayleighko/dhlottery-api | ba348bf506210fb8934e837b67f6e2721da89c79 | [
"Apache-2.0"
] | 1 | 2021-07-19T02:20:46.000Z | 2021-07-19T02:20:46.000Z | import copy
import requests
class AuthController:
_REQ_HEADERS = {
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36",
"Connection": "keep-alive",
"Cache-Control": "max-age=0",
"sec-ch-ua": '" No... | 33.951456 | 156 | 0.609665 |
798087fbdc5c7d5444a4284a6b8bd03bec59ec91 | 2,673 | py | Python | tests/plugins/director/test_director_plugin.py | nikitanovosibirsk/vedro | e975a1c1eb065bc6caa32c41c0d7576ee6d284db | [
"Apache-2.0"
] | 2 | 2021-08-24T12:49:30.000Z | 2022-01-23T07:21:25.000Z | tests/plugins/director/test_director_plugin.py | nikitanovosibirsk/vedro | e975a1c1eb065bc6caa32c41c0d7576ee6d284db | [
"Apache-2.0"
] | 20 | 2015-12-09T11:04:23.000Z | 2022-03-20T09:18:17.000Z | tests/plugins/director/test_director_plugin.py | nikitanovosibirsk/vedro | e975a1c1eb065bc6caa32c41c0d7576ee6d284db | [
"Apache-2.0"
] | 3 | 2015-12-09T07:31:23.000Z | 2022-01-28T11:03:24.000Z | from argparse import ArgumentParser, Namespace
from unittest.mock import Mock, call
import pytest
from baby_steps import given, then, when
from vedro._core import Dispatcher
from vedro.events import ArgParseEvent
from vedro.plugins.director import Director, Reporter
@pytest.fixture()
def dispatcher():
return Di... | 29.7 | 89 | 0.690236 |
7980881ea6c8eacd9592879f397529b7fd42f851 | 6,454 | py | Python | tensorflow/contrib/learn/python/learn/tests/experiment_test.py | Censio/tensorflow | 7ed4d3cda2ef63a444b0704ed7cf431de92096bb | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/learn/python/learn/tests/experiment_test.py | Censio/tensorflow | 7ed4d3cda2ef63a444b0704ed7cf431de92096bb | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/learn/python/learn/tests/experiment_test.py | Censio/tensorflow | 7ed4d3cda2ef63a444b0704ed7cf431de92096bb | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | 37.306358 | 76 | 0.590796 |
7980885996c39ae38aba12fb70ec429c241ee82a | 2,371 | py | Python | data_visualization/plot_in_tkinter.py | NicoleEic/projects | 028a4bb4b49539fc98b442f0a2f9434e95c94561 | [
"MIT"
] | 9 | 2019-09-10T19:41:29.000Z | 2022-03-03T21:29:11.000Z | data_visualization/plot_in_tkinter.py | NicoleEic/projects | 028a4bb4b49539fc98b442f0a2f9434e95c94561 | [
"MIT"
] | null | null | null | data_visualization/plot_in_tkinter.py | NicoleEic/projects | 028a4bb4b49539fc98b442f0a2f9434e95c94561 | [
"MIT"
] | 4 | 2019-09-10T19:41:37.000Z | 2020-11-26T13:51:55.000Z | import tkinter as tk
import os
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.patches as patches
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
import numpy as np
# --------
# overhead
# --------
rootdir = 'my/path/somewhere/'
subs = ['01', '02', '03', '04', '05', '06', '07', '0... | 28.22619 | 178 | 0.653311 |
798089096ff83d8a55ef8d750c762ba7d20a6346 | 7,097 | py | Python | code/default/python27/1.0/lib/linux/cryptography/hazmat/backends/interfaces.py | wuyongwen/XX-Net | 313aefd862b8f230f7c61dc29db1b2b93a17e6ab | [
"BSD-2-Clause"
] | 2 | 2017-04-24T03:04:45.000Z | 2017-09-19T03:38:37.000Z | proxy/proxy/code/default/python27/1.0/lib/linux/cryptography/hazmat/backends/interfaces.py | viger/docker | a49547ba84606fc03530d80fe0c01631a01f10c5 | [
"MIT"
] | null | null | null | proxy/proxy/code/default/python27/1.0/lib/linux/cryptography/hazmat/backends/interfaces.py | viger/docker | a49547ba84606fc03530d80fe0c01631a01f10c5 | [
"MIT"
] | null | null | null | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import abc
import six
@six.add_metaclass(abc.ABCMeta)
class CipherBack... | 26.882576 | 79 | 0.650416 |
7980890af25752e344d00b1f9a8b839112578c8e | 913 | py | Python | tests/rdkit_postgresql/test_inchi.py | mikolajfeliks/razi | c621696e49f12e5f412f9587f72a4360e20bbeb8 | [
"MIT"
] | 22 | 2015-03-07T14:39:50.000Z | 2022-01-24T03:35:14.000Z | tests/rdkit_postgresql/test_inchi.py | mikolajfeliks/razi | c621696e49f12e5f412f9587f72a4360e20bbeb8 | [
"MIT"
] | 6 | 2015-03-07T16:33:47.000Z | 2022-02-10T09:19:51.000Z | tests/rdkit_postgresql/test_inchi.py | mikolajfeliks/razi | c621696e49f12e5f412f9587f72a4360e20bbeb8 | [
"MIT"
] | 7 | 2015-03-07T14:41:56.000Z | 2022-01-24T03:36:10.000Z | import unittest
from sqlalchemy import select, func
from rdkit.Chem import AllChem as Chem
from razi import rdkit_postgresql
from .database import engine
class InChITestCase(unittest.TestCase):
def test_inchi_out(self):
rs = engine.execute(select([ func.mol_inchi(func.mol('c1ccccc1')) ]))
se... | 33.814815 | 101 | 0.665936 |
79808aa8a897b208941ae1d5d25c40f65d04b68e | 8,000 | py | Python | mlapi/app.py | Ermlab/mlapi.io | 86fa2a50c49deef9e5e914bc9c108e002d6e6501 | [
"MIT"
] | 6 | 2018-04-21T09:33:59.000Z | 2019-08-04T20:35:57.000Z | mlapi/app.py | Ermlab/mlapi.io | 86fa2a50c49deef9e5e914bc9c108e002d6e6501 | [
"MIT"
] | 20 | 2018-04-21T09:55:50.000Z | 2022-03-11T23:20:19.000Z | mlapi/app.py | Ermlab/mlapi.io | 86fa2a50c49deef9e5e914bc9c108e002d6e6501 | [
"MIT"
] | 3 | 2018-04-10T12:11:48.000Z | 2018-06-30T11:53:51.000Z | import json
# import sqlite3
import os
import logging
import coloredlogs
coloredlogs.install(level='DEBUG', format='%(levelname)s%(asctime)s:%(message)s',)
from flask import request, url_for, Response, jsonify, g, redirect
from flask_api import FlaskAPI, status, exceptions
from flask_api.decorators import set_parsers
... | 34.042553 | 163 | 0.585125 |
79808af9ef22eda0c91dd3f44673411d0d88d1ea | 4,041 | py | Python | lib/client/helpers.py | fyoorer/Osmedeus | 819382d2ba5b686b6d206e1c7c2c92d97c851384 | [
"MIT"
] | 5 | 2019-10-05T21:04:17.000Z | 2020-12-25T15:25:32.000Z | lib/client/helpers.py | realphant0m/Osmedeus | 41350b581f1c6b3ab96c02992542e501c8350b09 | [
"MIT"
] | null | null | null | lib/client/helpers.py | realphant0m/Osmedeus | 41350b581f1c6b3ab96c02992542e501c8350b09 | [
"MIT"
] | 2 | 2020-12-25T15:25:33.000Z | 2021-07-17T11:11:10.000Z | import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from lib.core import utils
# Console colors
W = '\033[1;0m' # white
R = '\033[1;31m' # red
G = '\033[1;32m' # green
O = '\033[1;33m' # orange
B = '\033[1;34m' # blue
Y = '\033[1;93m' # yellow
P = '\033[1;35m' # ... | 30.383459 | 92 | 0.62534 |
79808bf7634f4fdf4331e59102c81a04066d1626 | 1,307 | py | Python | lamby/test/log_test.py | lamby-ml/lamby-cli | c6f7d21750c94e47ced05bdb2e11a7e882e77f93 | [
"MIT"
] | null | null | null | lamby/test/log_test.py | lamby-ml/lamby-cli | c6f7d21750c94e47ced05bdb2e11a7e882e77f93 | [
"MIT"
] | 7 | 2019-02-04T19:39:42.000Z | 2019-04-18T16:33:54.000Z | lamby/test/log_test.py | lamby-ml/lamby-cli | c6f7d21750c94e47ced05bdb2e11a7e882e77f93 | [
"MIT"
] | null | null | null | import os
from lamby.src.log import log
def test_commit_basic(runner):
with runner.isolated_filesystem():
os.mkdir('./.lamby')
file = open('./.lamby/log', 'w+')
log_str = """
{
"test.onnx": [
{
"timestamp": 1550182122,
... | 22.929825 | 60 | 0.45065 |
79809142800409a0842dea76656bb5c8f422fd04 | 11,699 | py | Python | WinWindow.py | v2okimochi/Keasy | 0c4d480a4b9fc88f47bbc11ed4ca248cbdc488f2 | [
"MIT"
] | 1 | 2018-10-25T01:31:15.000Z | 2018-10-25T01:31:15.000Z | WinWindow.py | v2okimochi/Keasy | 0c4d480a4b9fc88f47bbc11ed4ca248cbdc488f2 | [
"MIT"
] | 1 | 2018-07-16T01:39:39.000Z | 2018-07-16T01:39:39.000Z | WinWindow.py | v2okimochi/Keasy | 0c4d480a4b9fc88f47bbc11ed4ca248cbdc488f2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
import traceback
from ctypes import byref
from ctypes.wintypes import POINT
from os import path as os_path
from re import search as re_search
from time import sleep as time_sleep
from WinTimerThread import TimerThread
# Keasy uses keyboard ver.0.11.0.
import keyboard
from P... | 39.928328 | 79 | 0.549278 |
79809155825c51f02629aff48cd0bf706ee5504f | 4,869 | py | Python | main/migrations/0001_initial.py | mpuhacz/studnet | fb69307de9b4569a93351dc178d5bf1cb338d59e | [
"MIT"
] | 1 | 2018-01-14T18:57:07.000Z | 2018-01-14T18:57:07.000Z | main/migrations/0001_initial.py | mpuhacz/studnet | fb69307de9b4569a93351dc178d5bf1cb338d59e | [
"MIT"
] | null | null | null | main/migrations/0001_initial.py | mpuhacz/studnet | fb69307de9b4569a93351dc178d5bf1cb338d59e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-05-14 20:10
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migratio... | 39.266129 | 164 | 0.548573 |
798092498a5d38e28bdc6b4117d0ad73b7c86d45 | 2,066 | py | Python | tests/test_parametric_components/test_rotated_isosceles_triangle.py | zmarkan/paramak | ecf9a46394adb4d6bb5744000ec6e2f74c30f2ba | [
"MIT"
] | 9 | 2019-12-28T16:48:49.000Z | 2020-05-20T13:38:49.000Z | tests/test_parametric_components/test_rotated_isosceles_triangle.py | zmarkan/paramak | ecf9a46394adb4d6bb5744000ec6e2f74c30f2ba | [
"MIT"
] | 8 | 2019-08-23T10:17:19.000Z | 2020-05-21T18:47:22.000Z | tests/test_parametric_components/test_rotated_isosceles_triangle.py | zmarkan/paramak | ecf9a46394adb4d6bb5744000ec6e2f74c30f2ba | [
"MIT"
] | 1 | 2020-05-07T16:14:26.000Z | 2020-05-07T16:14:26.000Z |
import unittest
import paramak
import pytest
class TestRotatedIsoscelesTriangle(unittest.TestCase):
def setUp(self):
self.test_shape = paramak.RotatedIsoscelesTriangle(
height=10,
base_length=20,
pivot_angle=0,
pivot_point=(100, 50),
rotation... | 26.487179 | 78 | 0.64424 |
79809281e9d4027020756cfd454bdc522f968f03 | 2,152 | py | Python | examples/ad_manager/v201802/user_team_association_service/get_user_team_associations_for_user.py | khanhnhk/googleads-python-lib | 1e882141b8eb663b55dd582ce0f4fbf3cd2f672d | [
"Apache-2.0"
] | 1 | 2021-12-30T15:21:42.000Z | 2021-12-30T15:21:42.000Z | examples/ad_manager/v201802/user_team_association_service/get_user_team_associations_for_user.py | benlistyg/googleads-python-lib | 1e882141b8eb663b55dd582ce0f4fbf3cd2f672d | [
"Apache-2.0"
] | null | null | null | examples/ad_manager/v201802/user_team_association_service/get_user_team_associations_for_user.py | benlistyg/googleads-python-lib | 1e882141b8eb663b55dd582ce0f4fbf3cd2f672d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2016 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 requir... | 38.428571 | 80 | 0.72026 |
79809397b730f37c738309845321274551166c7a | 3,482 | py | Python | fastai/newsLearnClassifiersAuto.py | jtbr/tv-news-quality | 0aa57a67ff3f3207e5cdf4129d58ea967e698e90 | [
"MIT"
] | null | null | null | fastai/newsLearnClassifiersAuto.py | jtbr/tv-news-quality | 0aa57a67ff3f3207e5cdf4129d58ea967e698e90 | [
"MIT"
] | null | null | null | fastai/newsLearnClassifiersAuto.py | jtbr/tv-news-quality | 0aa57a67ff3f3207e5cdf4129d58ea967e698e90 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''Use fastai to train text classifiers for each label group in each fold of the specified directory'''
from fastai.text import *
bs = 128 # size of minibatch (32 on iceberg)
# written with fastai v1.0.48
from collections import defaultdict
model_path = Path('/data/fasta... | 45.815789 | 134 | 0.653647 |
798093fca7a7676a7181fed17092e45e710142ce | 10,177 | py | Python | choir/modeling/test_time_augmentation.py | scwangdyd/large_vocabulary_hoi_detection | db7a4397c3050b1bf9a3f7473edf125e2b1046c4 | [
"MIT"
] | 9 | 2021-11-13T17:14:07.000Z | 2022-03-29T00:27:54.000Z | choir/modeling/test_time_augmentation.py | scwangdyd/large_vocabulary_hoi_detection | db7a4397c3050b1bf9a3f7473edf125e2b1046c4 | [
"MIT"
] | 1 | 2022-02-04T16:28:01.000Z | 2022-02-04T16:28:01.000Z | choir/modeling/test_time_augmentation.py | scwangdyd/large_vocabulary_hoi_detection | db7a4397c3050b1bf9a3f7473edf125e2b1046c4 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import copy
import numpy as np
from itertools import count
import torch
from fvcore.transforms import HFlipTransform, NoOpTransform
from torch import nn
from torch.nn.parallel import DistributedDataParallel
from choir.data.detection_utils import re... | 42.760504 | 99 | 0.65029 |
7980943b6a3df3bd8e7e5badd9d7092b1f0101a2 | 4,439 | py | Python | get_root_zone.py | paulehoffman/early-metrics | ade2d4934cc5389788eb0bab710eabbfd87f3b2e | [
"BSD-3-Clause"
] | null | null | null | get_root_zone.py | paulehoffman/early-metrics | ade2d4934cc5389788eb0bab710eabbfd87f3b2e | [
"BSD-3-Clause"
] | null | null | null | get_root_zone.py | paulehoffman/early-metrics | ade2d4934cc5389788eb0bab710eabbfd87f3b2e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
''' Gets the root zone '''
# Run as the metrics user under cron, every 15 minutes
import logging, os, pickle, re, requests, subprocess
if __name__ == "__main__":
# Get the base for the log directory
log_dir = "{}/Logs".format(os.path.expanduser("~"))
if not os.path.exists(log_dir):
os.mkd... | 37.940171 | 142 | 0.74296 |
798094470a3acd4a39f6d53386f7f94a1a7af247 | 750 | py | Python | scraper/scraper/celery.py | fahmirevo/ratingpredictor | 02d008c85eab4fa9b9d4f276b6715d651c92a506 | [
"MIT"
] | 2 | 2018-08-15T09:13:59.000Z | 2018-10-04T03:59:22.000Z | scraper/scraper/celery.py | fahmirevo/ratingpredictor | 02d008c85eab4fa9b9d4f276b6715d651c92a506 | [
"MIT"
] | null | null | null | scraper/scraper/celery.py | fahmirevo/ratingpredictor | 02d008c85eab4fa9b9d4f276b6715d651c92a506 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, unicode_literals
import os
from celery import Celery
from django.conf import settings
# set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'scraper.settings')
app = Celery('scraper')
# Using a string here means the ... | 31.25 | 67 | 0.78 |
798094b8ea567bd3002f75469f869012b70491cf | 1,469 | py | Python | test.py | move-ton/ticktimer | 0f91ff75de2e1fc885d5de535d5099332cee4e56 | [
"Apache-2.0"
] | 1 | 2020-11-23T19:31:29.000Z | 2020-11-23T19:31:29.000Z | test.py | move-ton/ticktimer | 0f91ff75de2e1fc885d5de535d5099332cee4e56 | [
"Apache-2.0"
] | null | null | null | test.py | move-ton/ticktimer | 0f91ff75de2e1fc885d5de535d5099332cee4e56 | [
"Apache-2.0"
] | 1 | 2021-08-30T15:05:55.000Z | 2021-08-30T15:05:55.000Z | import tonos_ts4.ts4 as ts4
import unittest
import time
EXCHANGER_COMMISSION = 3
class key:
secret: str
public: str
class TestPair(unittest.TestCase):
secret = "bc891ad1f7dc0705db795a81761cf7ea0b74c9c2a93cbf9ac1bad8bd30c9b3b75a4889716084010dd2d013e48b366424c8ba9d391c867e46adce51b18718eb67"
public = "0... | 36.725 | 143 | 0.674609 |
7980950e8f1b7e6f54148c58299dc42207c76383 | 2,058 | py | Python | finetuned/deep_optical_flow.py | vineeths96/Video-Interpolation-using-Deep-Optical-Flow | 5dd536bcc2d6c0d0d1718dccb09eb71ca77d2d94 | [
"MIT"
] | 5 | 2021-04-17T15:26:29.000Z | 2021-10-11T13:17:56.000Z | finetuned/deep_optical_flow.py | vineeths96/Video-Interpolation-using-Deep-Optical-Flow | 5dd536bcc2d6c0d0d1718dccb09eb71ca77d2d94 | [
"MIT"
] | null | null | null | finetuned/deep_optical_flow.py | vineeths96/Video-Interpolation-using-Deep-Optical-Flow | 5dd536bcc2d6c0d0d1718dccb09eb71ca77d2d94 | [
"MIT"
] | 2 | 2021-11-28T06:40:23.000Z | 2022-01-17T12:20:21.000Z | import cv2
import numpy as np
import scipy.ndimage
from flownet2.Flownet2ControllerFineTune import FlowControllerFineTune
def deep_optical_flow(model_path, firstImage, secondImage, lr, num_iter, image_ind, dataset):
"""
FlowNet2 Deep Optical flow estimation between firstImage and secondImage
:param model_... | 38.830189 | 101 | 0.691934 |
7980951696a9bdf89cf4182e625fc445dfbfb750 | 837 | py | Python | pygsti/extras/__init__.py | colibri-coruscans/pyGSTi | da54f4abf668a28476030528f81afa46a1fbba33 | [
"Apache-2.0"
] | 73 | 2016-01-28T05:02:05.000Z | 2022-03-30T07:46:33.000Z | pygsti/extras/__init__.py | colibri-coruscans/pyGSTi | da54f4abf668a28476030528f81afa46a1fbba33 | [
"Apache-2.0"
] | 113 | 2016-02-25T15:32:18.000Z | 2022-03-31T13:18:13.000Z | pygsti/extras/__init__.py | colibri-coruscans/pyGSTi | da54f4abf668a28476030528f81afa46a1fbba33 | [
"Apache-2.0"
] | 41 | 2016-03-15T19:32:07.000Z | 2022-02-16T10:22:05.000Z | #***************************************************************************************************
# Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
# Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government retains certain rights
# in this software.
# Licensed... | 59.785714 | 100 | 0.574671 |
7980955dc6d17af4e5217df12fa11dc62532159b | 267 | py | Python | src/test_provider.py | gregbugaj/marie-ai | f51a74f19ab5d7231c9f8a426284feff1671b974 | [
"MIT"
] | 4 | 2021-09-23T22:38:48.000Z | 2022-01-19T12:03:02.000Z | src/test_provider.py | gregbugaj/marie-icr | f51a74f19ab5d7231c9f8a426284feff1671b974 | [
"MIT"
] | 17 | 2021-12-22T16:37:21.000Z | 2022-03-16T16:07:34.000Z | src/test_provider.py | gregbugaj/marie-ai | f51a74f19ab5d7231c9f8a426284feff1671b974 | [
"MIT"
] | null | null | null | import os
from utils.utils import FileSystem, ensure_exists
if __name__ == '__main__':
img_path = 'word/0001.png'
base_dir = FileSystem.get_share_directory()
path = os.path.abspath(os.path.join(base_dir, img_path))
print(base_dir)
print(path)
| 20.538462 | 60 | 0.71161 |
798095b3b2812457d5980851da15f77fabb74d8a | 538 | py | Python | src/analyze_latent.py | mpaloni/pioneer | c49efa2e071307b2534ca2abe7560f57683d2d9e | [
"MIT"
] | null | null | null | src/analyze_latent.py | mpaloni/pioneer | c49efa2e071307b2534ca2abe7560f57683d2d9e | [
"MIT"
] | null | null | null | src/analyze_latent.py | mpaloni/pioneer | c49efa2e071307b2534ca2abe7560f57683d2d9e | [
"MIT"
] | null | null | null | import torch, torchvision
import os
import argparse
def main():
parser = argparse.ArgumentParser(description='PIONEER Zeta')
parser.add_argument('--first', type=str, help='Subject on the left side of the operator')
args=parser.parse_args()
f1=torch.load(os.path.expanduser(args.first))
#First is the file to be... | 18.551724 | 90 | 0.69145 |
798096a567c774024283e4b712020c9acfe5ed78 | 61,751 | py | Python | pyscf/shciscf/shci.py | januseriksen/pyscf | d40f5b728b6e26766343388b2240ef023b71766d | [
"Apache-2.0"
] | 1 | 2021-01-07T15:26:49.000Z | 2021-01-07T15:26:49.000Z | pyscf/shciscf/shci.py | ghb24/pyscf | 5cd81a47fb67cdf81ad2837a1a857effd48c472f | [
"Apache-2.0"
] | null | null | null | pyscf/shciscf/shci.py | ghb24/pyscf | 5cd81a47fb67cdf81ad2837a1a857effd48c472f | [
"Apache-2.0"
] | null | null | null | #!/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... | 37.40218 | 151 | 0.532785 |
79809a5f5ca2353331a625888391efd1d7d3d157 | 652 | py | Python | urbarium/title/models.py | nikerzetic/zacasno-ime | 7ca42665a0f64cae7233c994c879f2d81502efec | [
"MIT"
] | null | null | null | urbarium/title/models.py | nikerzetic/zacasno-ime | 7ca42665a0f64cae7233c994c879f2d81502efec | [
"MIT"
] | 5 | 2021-03-30T14:18:31.000Z | 2021-09-22T19:35:18.000Z | urbarium/title/models.py | nikerzetic/zacasno-ime | 7ca42665a0f64cae7233c994c879f2d81502efec | [
"MIT"
] | 1 | 2020-09-08T10:38:54.000Z | 2020-09-08T10:38:54.000Z | from django.db import models
from governing_body.models import GoverningBody
from character.models import Character
from django.urls import reverse
class Title(models.Model):
name = models.CharField(max_length=100)
concerning = models.ForeignKey(GoverningBody, blank=True, null=True, on_delete=models.SET_NULL... | 29.636364 | 99 | 0.731595 |
79809aef1104ce305a6480c04be47489ba810a01 | 717 | py | Python | tests/basics/int_big_error.py | MakeItZone/circuitpython | 7f803c0b51c333210ed267502422ed7bb28b9be7 | [
"Unlicense",
"BSD-3-Clause",
"MIT-0",
"MIT"
] | 13,648 | 2015-01-01T01:34:51.000Z | 2022-03-31T16:19:53.000Z | tests/basics/int_big_error.py | MakeItZone/circuitpython | 7f803c0b51c333210ed267502422ed7bb28b9be7 | [
"Unlicense",
"BSD-3-Clause",
"MIT-0",
"MIT"
] | 7,092 | 2015-01-01T07:59:11.000Z | 2022-03-31T23:52:18.000Z | tests/basics/int_big_error.py | MakeItZone/circuitpython | 7f803c0b51c333210ed267502422ed7bb28b9be7 | [
"Unlicense",
"BSD-3-Clause",
"MIT-0",
"MIT"
] | 4,942 | 2015-01-02T11:48:50.000Z | 2022-03-31T19:57:10.000Z | # test errors operating on bignum
i = 1 << 65
try:
i << -1
except ValueError:
print("ValueError")
try:
len(i)
except TypeError:
print("TypeError")
try:
1 in i
except TypeError:
print("TypeError")
# overflow because arg of bytearray is being converted to machine int
try:
bytearray(i)
exc... | 17.071429 | 80 | 0.67364 |
79809b52432dbb1dd5b2c342348e5393dd667d75 | 3,582 | py | Python | setup.py | ofek/compose | 854c14a5bcf566792ee8a972325c37590521656b | [
"Apache-2.0"
] | null | null | null | setup.py | ofek/compose | 854c14a5bcf566792ee8a972325c37590521656b | [
"Apache-2.0"
] | null | null | null | setup.py | ofek/compose | 854c14a5bcf566792ee8a972325c37590521656b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import codecs
import os
import re
import sys
import pkg_resources
from setuptools import find_packages
from setuptools import setup
def read(*parts):
path = os.path.join(os.path.dirname(__file__), *parts)
with codecs.open(path, encoding='utf-8') as fobj:
... | 31.982143 | 83 | 0.593523 |
79809bbbab181eb51301bc409d55771d641d64ea | 2,280 | py | Python | web/toolapp/urls.py | Simon-Will/cohviz | b5d0097cbd5f3586dcd03e05d9b17c3e46cc356f | [
"MIT"
] | null | null | null | web/toolapp/urls.py | Simon-Will/cohviz | b5d0097cbd5f3586dcd03e05d9b17c3e46cc356f | [
"MIT"
] | null | null | null | web/toolapp/urls.py | Simon-Will/cohviz | b5d0097cbd5f3586dcd03e05d9b17c3e46cc356f | [
"MIT"
] | null | null | null | from django.urls import include, path
from django.contrib import admin
from cohapp import apis
from cohapp import views as cohviews
# Temporary urls
# http://stackoverflow.com/questions/1360101/how-to-generate-temporary-urls-in-django
urlpatterns = [
path('admin/', admin.site.urls),
path('', cohviews.index, ... | 60 | 117 | 0.725 |
79809ca4e39676714d4ca2157132f825b276b5b9 | 21,790 | py | Python | Refining Economics.py | Ranga2904/Refining-Economics | 09cce288a0208827fdbf9225e9c07fb23f871ed6 | [
"MIT"
] | null | null | null | Refining Economics.py | Ranga2904/Refining-Economics | 09cce288a0208827fdbf9225e9c07fb23f871ed6 | [
"MIT"
] | null | null | null | Refining Economics.py | Ranga2904/Refining-Economics | 09cce288a0208827fdbf9225e9c07fb23f871ed6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[288]:
# This code performs analysis and visualization seen in 'Refining Margins Over the Years'
# In[289]:
# (1) Import necessary packages, modules
import pandas as pd, numpy as np
import matplotlib.pyplot as plt
import matplotlib.pylab as plab
import matplotlib.ticker... | 36.316667 | 212 | 0.661955 |
79809e3ee02b35a10038ae2060b7c3dd5d528260 | 20,399 | py | Python | cathy.py | binsento42/Cathy-python | 861959c939519cc41cfd59a64e8d876d6377413b | [
"CC0-1.0"
] | 13 | 2021-03-26T09:01:42.000Z | 2022-03-15T14:08:21.000Z | cathy.py | binsento42/Cathy-python | 861959c939519cc41cfd59a64e8d876d6377413b | [
"CC0-1.0"
] | 5 | 2021-03-16T13:10:51.000Z | 2022-03-12T12:11:33.000Z | cathy.py | binsento42/Cathy-python | 861959c939519cc41cfd59a64e8d876d6377413b | [
"CC0-1.0"
] | 5 | 2021-10-09T20:27:42.000Z | 2022-02-28T18:45:07.000Z | #!python3
'''
attempt to build a python class to read cathy's .caf file (by Jerome)
2017/05/31 got entrydat.cpp from Robert Vasicek rvas01@gmx.net :)
2017/06/02 first reading/struct. conversion from entrydat.cpp
2017/06/03 first complete read of a .caf
first query functions
cat.pathcat # catalo... | 32.124409 | 169 | 0.657336 |
79809ed8643d00d52677bb4daa91aac798180b17 | 1,210 | py | Python | cogs/event_listeners/error_listener.py | Nhalrath/Chie | 082e8fb95166ac60f7a6fe8d2a1e14c11a12d5fd | [
"Apache-2.0"
] | null | null | null | cogs/event_listeners/error_listener.py | Nhalrath/Chie | 082e8fb95166ac60f7a6fe8d2a1e14c11a12d5fd | [
"Apache-2.0"
] | 4 | 2021-01-29T14:37:38.000Z | 2021-06-13T15:34:27.000Z | cogs/event_listeners/error_listener.py | Nhalrath/Chie | 082e8fb95166ac60f7a6fe8d2a1e14c11a12d5fd | [
"Apache-2.0"
] | 2 | 2021-01-14T05:59:10.000Z | 2021-01-14T07:28:25.000Z | # Copyright 2020-2021 Nhalrath
#
# 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... | 37.8125 | 160 | 0.703306 |
7980a013c83e23bfe3b7981a0825754d1902f677 | 2,458 | py | Python | kklogger/util/__init__.py | kaka19ace/kklogger | 2d15372ce4ecb5fcaf43be89668b3220f7153790 | [
"MIT"
] | null | null | null | kklogger/util/__init__.py | kaka19ace/kklogger | 2d15372ce4ecb5fcaf43be89668b3220f7153790 | [
"MIT"
] | null | null | null | kklogger/util/__init__.py | kaka19ace/kklogger | 2d15372ce4ecb5fcaf43be89668b3220f7153790 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# @file __init__.py
# @date Dec 23 2015
# @brief
#
import os
import json
def read_from_yaml(path):
from ..util.yaml_helper import YamlHelper
return YamlHelper.get_config_data(path)
def read_from_etcd(
read_type='env',
env_host_key="KKLOG... | 28.252874 | 109 | 0.630187 |
7980a0aadb0cdf7db45732ad95622c651190f172 | 729 | py | Python | shell/database/Linux86/execc.py | dromero1452/shellsploit-framework | 38ce78542fd2dd2ac30f6567972d695ede1e4709 | [
"MIT"
] | 10 | 2016-10-09T10:21:43.000Z | 2020-04-20T05:28:50.000Z | shell/database/Linux86/execc.py | badfish5150/shellsploit-framework | 22bb910d33379ca29ddd10ba93a63e9ff1eab99d | [
"MIT"
] | null | null | null | shell/database/Linux86/execc.py | badfish5150/shellsploit-framework | 22bb910d33379ca29ddd10ba93a63e9ff1eab99d | [
"MIT"
] | 7 | 2017-03-22T18:21:34.000Z | 2019-12-02T20:22:47.000Z | from lib.payloads.shellcode import Shellcode
class Payload(Shellcode):
Shellcode.info["author"] = "Unkown"
Shellcode.info["name"] = "Linux/x86 - exec shellcode"
def __init__(self, **kwargs):
db = []
for x in kwargs["execommand"]:
db.append("\\x" + x.encode("hex"))
kw... | 30.375 | 79 | 0.559671 |
7980a1f99f8709373a271c5110007fe20edce36e | 10,481 | py | Python | geckopy/integration/relaxation.py | ginkgobioworks/geckopy | 3a226f0ba3a66094d2c3b21445e71eb6434723d9 | [
"Apache-2.0"
] | 5 | 2021-05-27T10:19:49.000Z | 2021-11-20T18:17:23.000Z | geckopy/integration/relaxation.py | ginkgobioworks/geckopy | 3a226f0ba3a66094d2c3b21445e71eb6434723d9 | [
"Apache-2.0"
] | 3 | 2021-06-14T15:01:41.000Z | 2021-06-28T09:21:10.000Z | geckopy/integration/relaxation.py | ginkgobioworks/geckopy | 3a226f0ba3a66094d2c3b21445e71eb6434723d9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Ginkgo Bioworks
# 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,... | 38.533088 | 85 | 0.675126 |
7980a33e42bb3cb1cf9ca03af2419fd94b33b4a0 | 277 | py | Python | kattis/Karte.py | jaredliw/python-question-bank | 9c8c246623d8d171f875700b57772df0afcbdcdf | [
"MIT"
] | 1 | 2021-04-08T07:49:15.000Z | 2021-04-08T07:49:15.000Z | kattis/Karte.py | jaredliw/leetcode-solutions | 9c8c246623d8d171f875700b57772df0afcbdcdf | [
"MIT"
] | null | null | null | kattis/Karte.py | jaredliw/leetcode-solutions | 9c8c246623d8d171f875700b57772df0afcbdcdf | [
"MIT"
] | 1 | 2022-01-23T02:12:24.000Z | 2022-01-23T02:12:24.000Z | # CPU: 0.05 s
string = input()
seen = set()
counts = {"P": 13, "K": 13, "H": 13, "T": 13}
for idx in range(0, len(string), 3):
card = string[idx:idx + 3]
if card in seen:
print("GRESKA")
break
else:
seen.add(card)
counts[card[0]] -= 1
else:
print(*counts.values())
| 18.466667 | 45 | 0.577617 |
7980a36fa04593befc96ca37f86062386237f752 | 1,079 | py | Python | app/user/views.py | Wang-Shiyu/recipe_app_api | 69d3f9c103864e1b8a98d474874b2af8383f515e | [
"MIT"
] | null | null | null | app/user/views.py | Wang-Shiyu/recipe_app_api | 69d3f9c103864e1b8a98d474874b2af8383f515e | [
"MIT"
] | null | null | null | app/user/views.py | Wang-Shiyu/recipe_app_api | 69d3f9c103864e1b8a98d474874b2af8383f515e | [
"MIT"
] | null | null | null | from rest_framework import generics, authentication, permissions
from rest_framework.authtoken.views import ObtainAuthToken
from rest_framework.settings import api_settings
from user.serializers import UserSerializer, AuthTokenSerializer
class CreateUserView(generics.CreateAPIView):
"""Create a new user in the sy... | 35.966667 | 74 | 0.779425 |
7980a38220efb7342fb01fe37335b022e1cab70d | 391 | py | Python | findyour3d/users/migrations/0004_remove_user_is_trial.py | hqpr/findyour3d | 8ad3d2cb7bd0adfd080bb2314df1c78b94d3973a | [
"MIT"
] | null | null | null | findyour3d/users/migrations/0004_remove_user_is_trial.py | hqpr/findyour3d | 8ad3d2cb7bd0adfd080bb2314df1c78b94d3973a | [
"MIT"
] | null | null | null | findyour3d/users/migrations/0004_remove_user_is_trial.py | hqpr/findyour3d | 8ad3d2cb7bd0adfd080bb2314df1c78b94d3973a | [
"MIT"
] | 1 | 2020-11-26T10:52:20.000Z | 2020-11-26T10:52:20.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-10-04 10:47
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('users', '0003_auto_20171003_1106'),
]
operations = [
migrations.RemoveField(
... | 19.55 | 48 | 0.611253 |
7980a444a794a06423e62d01e050a24686840db9 | 46,655 | py | Python | nova/tests/unit/pci/test_stats.py | bopopescu/nova-token | ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/pci/test_stats.py | bopopescu/nova-token | ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/pci/test_stats.py | bopopescu/nova-token | ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2 | [
"Apache-2.0"
] | 2 | 2017-07-20T17:31:34.000Z | 2020-07-24T02:42:19.000Z | begin_unit
comment|'# Copyright (c) 2012 OpenStack Foundation'
nl|'\n'
comment|'# All Rights Reserved.'
nl|'\n'
comment|'#'
nl|'\n'
comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may'
nl|'\n'
comment|'# not use this file except in compliance with the License. You may obtain'
nl|'\n... | 11.877546 | 88 | 0.588147 |
7980a4a094c96321a73bb776988b9c30f349c619 | 13,682 | py | Python | venv/Lib/site-packages/django/contrib/gis/db/models/fields.py | RiccardoCherchi/Barcode-Stock | 699b977fa70ea14a7ac4d33bb7bb2f107aa2ca20 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/django/contrib/gis/db/models/fields.py | RiccardoCherchi/Barcode-Stock | 699b977fa70ea14a7ac4d33bb7bb2f107aa2ca20 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/django/contrib/gis/db/models/fields.py | RiccardoCherchi/Barcode-Stock | 699b977fa70ea14a7ac4d33bb7bb2f107aa2ca20 | [
"MIT"
] | null | null | null | from collections import defaultdict, namedtuple
from django.contrib.gis import forms, gdal
from django.contrib.gis.db.models.proxy import SpatialProxy
from django.contrib.gis.gdal.error import GDALException
from django.contrib.gis.geos import (
GeometryCollection, GEOSException, GEOSGeometry, LineString,
Multi... | 35.910761 | 119 | 0.656044 |
7980a4c4bf91887d8e25da2e7ac9ad3704c21e6a | 4,189 | py | Python | basic-syntax.py | Paunczki/regression-model-suite | 0913ef9e1171a38b4da0f7776788765ab75606a2 | [
"MIT"
] | 2 | 2019-07-28T04:12:16.000Z | 2019-07-28T04:39:33.000Z | basic-syntax.py | Paunczki/regression-model-suite | 0913ef9e1171a38b4da0f7776788765ab75606a2 | [
"MIT"
] | 16 | 2019-08-01T23:17:01.000Z | 2019-08-02T00:10:28.000Z | basic-syntax.py | Paunczki/regression-model-suite | 0913ef9e1171a38b4da0f7776788765ab75606a2 | [
"MIT"
] | 2 | 2019-07-30T00:13:01.000Z | 2019-07-30T05:07:55.000Z | # This is a file to serve as a tutorial about how to
# make comments, use operators, and create functions in Python
# To start, we can already see that the hashtag (#) is used to designate a line of code
# as a comment. Commenting can be used to describe what a section of code is supposed to do,
# as well as to prev... | 31.496241 | 115 | 0.678921 |
7980a5236f69069b026e345cf1409275e3ccf354 | 13,498 | py | Python | sdk/python/pulumi_azure/lb/rule.py | kenny-wealth/pulumi-azure | e57e3a81f95bf622e7429c53f0bff93e33372aa1 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/lb/rule.py | kenny-wealth/pulumi-azure | e57e3a81f95bf622e7429c53f0bff93e33372aa1 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/lb/rule.py | kenny-wealth/pulumi-azure | e57e3a81f95bf622e7429c53f0bff93e33372aa1 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class Rule(p... | 70.670157 | 599 | 0.723737 |
7980a550fca10e7f16b7a7d62ea84b4e047f7b58 | 1,261 | py | Python | setup.py | silverriver/AdaLabel | baefd765d79d90869ed4d28f76418c1a39eb0ae8 | [
"MIT"
] | 15 | 2021-05-27T17:49:22.000Z | 2022-03-03T13:18:03.000Z | setup.py | silverriver/AdaLabel | baefd765d79d90869ed4d28f76418c1a39eb0ae8 | [
"MIT"
] | 2 | 2021-05-28T13:54:48.000Z | 2021-05-28T13:55:17.000Z | setup.py | silverriver/AdaLabel | baefd765d79d90869ed4d28f76418c1a39eb0ae8 | [
"MIT"
] | 7 | 2021-05-28T02:16:30.000Z | 2022-03-16T09:18:41.000Z | #!/usr/bin/env python
from setuptools import setup, find_packages
from os import path
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'ONMT_README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='OpenNMT-py',
description='A python implementat... | 30.02381 | 78 | 0.608247 |
7980a581e0781a7352523af2bd6d66a3179ca24e | 28,788 | py | Python | salt/utils/schedule.py | dr4Ke/salt | 8ffa4903c9ed10c81e1a6c7b967dc9532f320c0b | [
"Apache-2.0"
] | 1 | 2018-09-18T05:45:43.000Z | 2018-09-18T05:45:43.000Z | salt/utils/schedule.py | dr4Ke/salt | 8ffa4903c9ed10c81e1a6c7b967dc9532f320c0b | [
"Apache-2.0"
] | null | null | null | salt/utils/schedule.py | dr4Ke/salt | 8ffa4903c9ed10c81e1a6c7b967dc9532f320c0b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Scheduling routines are located here. To activate the scheduler make the
schedule option available to the master or minion configurations (master config
file or for the minion via config or pillar)
code-block:: yaml
schedule:
job1:
function: state.sls
seconds: 360... | 37.145806 | 112 | 0.481798 |
7980a5f90b810cb754659ac1f12a4b3483a6651d | 873 | py | Python | client.py | litesh1998/TCPMessenger | 28ea4f1b9d57a2449042ade7fb2fe597e447291c | [
"MIT"
] | null | null | null | client.py | litesh1998/TCPMessenger | 28ea4f1b9d57a2449042ade7fb2fe597e447291c | [
"MIT"
] | null | null | null | client.py | litesh1998/TCPMessenger | 28ea4f1b9d57a2449042ade7fb2fe597e447291c | [
"MIT"
] | null | null | null | import socket
import threading
from sys import exit
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.connect(("127.0.0.1", 55556))
nickname = input('Pls Enter a nickname')
def recive():
while True:
try:
message = server.recv(1024).decode("ascii")
if message == "N... | 21.825 | 58 | 0.575029 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.