hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6dcaeb849dac27d32f03c3324adf7bb087b9a3ee | 290 | py | Python | pytest/fixtures/test_fixure_Demo2.py | islam-shamiul/Selenium_python | ee4cea5e58ab9afa88b3ba3e70aef52ec4808d4a | [
"MIT"
] | null | null | null | pytest/fixtures/test_fixure_Demo2.py | islam-shamiul/Selenium_python | ee4cea5e58ab9afa88b3ba3e70aef52ec4808d4a | [
"MIT"
] | null | null | null | pytest/fixtures/test_fixure_Demo2.py | islam-shamiul/Selenium_python | ee4cea5e58ab9afa88b3ba3e70aef52ec4808d4a | [
"MIT"
] | 1 | 2020-07-21T08:43:25.000Z | 2020-07-21T08:43:25.000Z | import pytest
@pytest.yield_fixture()
def setup():
print("this will run once before every method")
yield
print("this will run once after every method")
def test_method1(setup):
print("this is test method one")
def test_method2(setup):
print("this is test method two") | 22.307692 | 51 | 0.706897 |
c79e0e454c0efcac4061f5fe1d8a0b4f68f06dbe | 376 | py | Python | Leetcode/unique_occurences.py | HarshCasper/Data-Structures-Algorithms | 3f070bfa48c30d484e4218a137a7b6b80273d7da | [
"MIT"
] | 10 | 2020-05-02T14:42:15.000Z | 2021-01-26T16:51:47.000Z | Leetcode/unique_occurences.py | idiosyncratic4/Data-Structures-Algorithms | cc228dbc1ceb943f2a887eb2ab901c04bef030bc | [
"MIT"
] | null | null | null | Leetcode/unique_occurences.py | idiosyncratic4/Data-Structures-Algorithms | cc228dbc1ceb943f2a887eb2ab901c04bef030bc | [
"MIT"
] | 13 | 2020-03-05T13:31:11.000Z | 2021-01-29T08:14:26.000Z | # https://leetcode.com/problems/unique-number-of-occurrences/
arr = list(map(int, input().split()))
occurence={}
for i in arr:
if i in occurence:
occurence[i]+=1
else:
occurence[i]=1
flag=1
duplicate=set()
for i in occurence:
if occurence[i] in duplicate:
flag=0
else:
duplicate.add(occurence[i]... | 17.090909 | 61 | 0.654255 |
2d47b43757cbb4fc7bc02c25148c272bce23aed5 | 1,475 | py | Python | sgk/transformer/layers.py | egonrian/google-research | 8177adbe9ca0d7e5a9463b54581fe6dd27be0974 | [
"Apache-2.0"
] | 3 | 2021-01-18T04:46:49.000Z | 2021-03-05T09:21:40.000Z | sgk/transformer/layers.py | Alfaxad/google-research | 2c0043ecd507e75e2df9973a3015daf9253e1467 | [
"Apache-2.0"
] | 7 | 2021-11-10T19:44:38.000Z | 2022-02-10T06:48:39.000Z | sgk/transformer/layers.py | Alfaxad/google-research | 2c0043ecd507e75e2df9973a3015daf9253e1467 | [
"Apache-2.0"
] | 4 | 2021-02-08T10:25:45.000Z | 2021-04-17T14:46:26.000Z | # coding=utf-8
# Copyright 2020 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 35.119048 | 75 | 0.738983 |
00cf42c6fb4ceaa1885d8d4f1835d3fea62b87d3 | 2,500 | py | Python | brut.py | evilcloud/brutalist_write | 5e70f63d6dcb922b680f5084ae38a4485029297d | [
"MIT"
] | 2 | 2019-11-15T08:16:09.000Z | 2019-11-15T08:18:34.000Z | brut.py | evilcloud/brutal_write | 5e70f63d6dcb922b680f5084ae38a4485029297d | [
"MIT"
] | 8 | 2019-11-15T23:51:58.000Z | 2019-11-18T07:33:53.000Z | brut.py | evilcloud/brutal_write | 5e70f63d6dcb922b680f5084ae38a4485029297d | [
"MIT"
] | null | null | null | from subprocess import call
from os import name as osname
from datetime import date, datetime
import csv
# CONFIG
global session_start_time
global session_date
session_start_time = datetime.now()
session_date = str(session_start_time.date())
# FILE FUNCTIONS
def save_line(line):
file_name = str(session_date) + "... | 21.73913 | 88 | 0.5848 |
2f3f8969d61996118db085c0f6739c9b29a6ba70 | 12,340 | py | Python | rlpyt/algos/dqn/dqn.py | vzhuang/rlpyt | 3abf873e4bae0cd9cccbb9e5c9cc4c875710f6b6 | [
"MIT"
] | 1 | 2020-11-07T08:09:57.000Z | 2020-11-07T08:09:57.000Z | rlpyt/algos/dqn/dqn.py | vzhuang/rlpyt | 3abf873e4bae0cd9cccbb9e5c9cc4c875710f6b6 | [
"MIT"
] | null | null | null | rlpyt/algos/dqn/dqn.py | vzhuang/rlpyt | 3abf873e4bae0cd9cccbb9e5c9cc4c875710f6b6 | [
"MIT"
] | null | null | null |
import torch
from collections import namedtuple
from rlpyt.algos.base import RlAlgorithm
from rlpyt.utils.quick_args import save__init__args
from rlpyt.utils.logging import logger
from rlpyt.replays.non_sequence.frame import (UniformReplayFrameBuffer,
PrioritizedReplayFrameBuffer, AsyncUniformReplayFrameBuffer,
... | 45.367647 | 90 | 0.639546 |
3f28433dc914456c3b45bd2ba87318913dd34cbf | 7,859 | py | Python | tfx/types/component_spec_test.py | romiosarkar6991/tfx-romio | 0703c1dd037c676e1d438c2e5ce831decfc9eed9 | [
"Apache-2.0"
] | 1 | 2019-10-10T06:06:12.000Z | 2019-10-10T06:06:12.000Z | tfx/types/component_spec_test.py | romiosarkar6991/tfx-romio | 0703c1dd037c676e1d438c2e5ce831decfc9eed9 | [
"Apache-2.0"
] | null | null | null | tfx/types/component_spec_test.py | romiosarkar6991/tfx-romio | 0703c1dd037c676e1d438c2e5ce831decfc9eed9 | [
"Apache-2.0"
] | 1 | 2019-10-06T03:39:58.000Z | 2019-10-06T03:39:58.000Z | # 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 required by applicable law or a... | 32.341564 | 80 | 0.674132 |
9ea198c44c50d7c133797580e1f51b0b9b4a7ac2 | 5,157 | py | Python | programs/ani_depthplot2.py | yamamon75/PmagPy | fa5b189800a239683fc17c6b312cdfdd839a46c3 | [
"BSD-3-Clause"
] | 2 | 2020-07-05T01:11:33.000Z | 2020-07-05T01:11:39.000Z | programs/ani_depthplot2.py | yamamon75/PmagPy | fa5b189800a239683fc17c6b312cdfdd839a46c3 | [
"BSD-3-Clause"
] | null | null | null | programs/ani_depthplot2.py | yamamon75/PmagPy | fa5b189800a239683fc17c6b312cdfdd839a46c3 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env pythonw
from __future__ import print_function
from builtins import str
import wx
import os
import sys
import matplotlib
if matplotlib.get_backend() != "WXAgg":
matplotlib.use("WXAgg")
import matplotlib.pyplot as plt
import pmagpy.command_line_extractor as extractor
import pmagpy.ipmag as ipmag
import ... | 41.926829 | 330 | 0.600155 |
5709d132f21f2d6b970e473a010b4421a701b865 | 3,240 | py | Python | MLP_TensorFfow.py | RuchiraGamage/Artficial-Neural-Networks | 09b79727a42eb7f9c48e61f9daf9d2ee3957c231 | [
"MIT"
] | null | null | null | MLP_TensorFfow.py | RuchiraGamage/Artficial-Neural-Networks | 09b79727a42eb7f9c48e61f9daf9d2ee3957c231 | [
"MIT"
] | null | null | null | MLP_TensorFfow.py | RuchiraGamage/Artficial-Neural-Networks | 09b79727a42eb7f9c48e61f9daf9d2ee3957c231 | [
"MIT"
] | null | null | null | """ Multilayer Perceptron.
"""
# ------------------------------------------------------------------
#
# THIS EXAMPLE HAS BEEN RENAMED 'neural_network.py', FOR SIMPLICITY.
#
# ------------------------------------------------------------------
from __future__ import print_function
# Import MNIST data
from tensorflow... | 33.75 | 90 | 0.664506 |
11f18eeea1d0d862ff49ae6d8490bbb3a476c94a | 667 | py | Python | tqsdk/demo/tq/tutorial/t20.py | wanchangyan/tqsdk-python | ff935ee89c35cfe1f69da1bc981e21a6e1a7e21c | [
"Apache-2.0"
] | 1 | 2019-06-21T02:57:45.000Z | 2019-06-21T02:57:45.000Z | tqsdk/demo/tq/tutorial/t20.py | wanchangyan/tqsdk-python | ff935ee89c35cfe1f69da1bc981e21a6e1a7e21c | [
"Apache-2.0"
] | null | null | null | tqsdk/demo/tq/tutorial/t20.py | wanchangyan/tqsdk-python | ff935ee89c35cfe1f69da1bc981e21a6e1a7e21c | [
"Apache-2.0"
] | null | null | null | from tqsdk import TqApi
api = TqApi()
# 获取cu1812合约的行情
quote = api.get_quote("SHFE.cu1812")
print(quote["datetime"], quote["last_price"])
while True:
api.wait_update()
# 如果 cu1812 的任何字段有变化,is_changing就会返回 True
if api.is_changing(quote):
print(quote)
# 只有当 cu1812 的最新价有变化,is_changing才会返回 True
... | 33.35 | 107 | 0.692654 |
98205fc8a384f0fe917d9c7fb2f8086472bf6f0f | 910 | py | Python | python/edna/src/edna/core/plans/physicalgraph/PhysicalGraphNode.py | prernaagarwal/cs6235Project | 9e7c5717ea2afdb5f1afef9f9b632b5a765fce4e | [
"Apache-2.0"
] | 3 | 2020-10-04T22:40:27.000Z | 2021-12-14T14:28:11.000Z | python/edna/src/edna/core/plans/physicalgraph/PhysicalGraphNode.py | prernaagarwal/cs6235Project | 9e7c5717ea2afdb5f1afef9f9b632b5a765fce4e | [
"Apache-2.0"
] | 1 | 2020-10-22T19:58:53.000Z | 2020-10-22T19:58:53.000Z | python/edna/src/edna/core/plans/physicalgraph/PhysicalGraphNode.py | prernaagarwal/cs6235Project | 9e7c5717ea2afdb5f1afef9f9b632b5a765fce4e | [
"Apache-2.0"
] | 4 | 2020-10-15T03:12:52.000Z | 2021-03-25T20:03:54.000Z | from __future__ import annotations
from typing import List, Dict
from edna.core.plans.streamgraph import StreamGraphNode
from edna.types.enums import PhysicalGraphNodeType
from edna.types.builtin import GraphNode
from edna.utils.NameUtils import NameUtils
class PhysicalGraphNode(GraphNode):
physical_graph_node_t... | 29.354839 | 80 | 0.741758 |
a13bd9ee35c53d71056a1aac5619be7add18dd5d | 7,441 | py | Python | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_daemon_set_spec.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_daemon_set_spec.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_daemon_set_spec.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: release-1.15
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1Dae... | 33.367713 | 254 | 0.637146 |
8e330f743e5a7d037735efe3bd124c1214e4bf63 | 135 | py | Python | Interface/app/main/people/__init__.py | droid866/SYSUIST-software-engineering-group-4-project | a5a9befcf88869b3656583ba60ad1ec93c9e96ab | [
"MIT"
] | 1 | 2020-06-10T07:02:13.000Z | 2020-06-10T07:02:13.000Z | Interface/app/main/people/__init__.py | droid866/SYSUIST-software-engineering-group-4-project | a5a9befcf88869b3656583ba60ad1ec93c9e96ab | [
"MIT"
] | null | null | null | Interface/app/main/people/__init__.py | droid866/SYSUIST-software-engineering-group-4-project | a5a9befcf88869b3656583ba60ad1ec93c9e96ab | [
"MIT"
] | null | null | null | from flask import Blueprint
book = Blueprint('book', __name__, url_prefix='/people',template_folder='templates')
from . import views
| 22.5 | 84 | 0.77037 |
34d7ac78d59fd4dc570de02faf3168b5ffce9972 | 5,607 | py | Python | basic_block_gp/blockchain.py | Anubhav311/CSEU2_Blockchain_TL | 15736d793fa3f4b10e941221b9e1d3d9d70c2c6d | [
"MIT"
] | null | null | null | basic_block_gp/blockchain.py | Anubhav311/CSEU2_Blockchain_TL | 15736d793fa3f4b10e941221b9e1d3d9d70c2c6d | [
"MIT"
] | null | null | null | basic_block_gp/blockchain.py | Anubhav311/CSEU2_Blockchain_TL | 15736d793fa3f4b10e941221b9e1d3d9d70c2c6d | [
"MIT"
] | null | null | null | import hashlib
import json
from time import time
from uuid import uuid4
from flask import Flask, jsonify, request
class Blockchain(object):
def __init__(self):
self.chain = []
self.current_transactions = []
# Create the genesis block
self.new_block(previous_hash=1, proof=100)
... | 31.677966 | 147 | 0.632602 |
694f8712f08304065275c9261e46e7ae25ba7571 | 506 | py | Python | Mod1_DS9P2_script.py | KeiandraK/Lambdata-BW3-Keiandra | df759d9ff20322ff22bbe2fa05aaf5fa08b1ba70 | [
"MIT"
] | null | null | null | Mod1_DS9P2_script.py | KeiandraK/Lambdata-BW3-Keiandra | df759d9ff20322ff22bbe2fa05aaf5fa08b1ba70 | [
"MIT"
] | null | null | null | Mod1_DS9P2_script.py | KeiandraK/Lambdata-BW3-Keiandra | df759d9ff20322ff22bbe2fa05aaf5fa08b1ba70 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
causes_death=pd.read_csv('https://data.cdc.gov/api/views/bi63-dtpu/rows.csv?accessType=DOWNLOAD')
causes_death.shape
causes_death.isnull().sum()
causes_death.head()
from sklearn.model_selection import train_test_split
train, ... | 31.625 | 97 | 0.719368 |
30adb13b75638755190c8a7efc4071ca647cf1b6 | 17,450 | py | Python | openprocurement/tender/cfaua/tests/auction_blanks.py | openprocurement/openprocurement.tender.cfaua | 1f84b15838c3b5980409734f57361540e6e6f676 | [
"Apache-2.0"
] | null | null | null | openprocurement/tender/cfaua/tests/auction_blanks.py | openprocurement/openprocurement.tender.cfaua | 1f84b15838c3b5980409734f57361540e6e6f676 | [
"Apache-2.0"
] | 3 | 2018-09-28T12:57:52.000Z | 2018-10-29T13:54:38.000Z | openprocurement/tender/cfaua/tests/auction_blanks.py | ProzorroUKR/openprocurement.tender.cfaua | 7b2d0f514be6dca090ea96b83df8ce01bdc7dc0d | [
"Apache-2.0"
] | 1 | 2018-09-10T07:40:41.000Z | 2018-09-10T07:40:41.000Z | # -*- coding: utf-8 -*-
from copy import deepcopy
from datetime import timedelta
from openprocurement.api.utils import get_now
from openprocurement.tender.belowthreshold.tests.auction_blanks import update_patch_data
def post_tender_1lot_auction_not_changed(self):
self.app.authorization = ('Basic', ('auction', ''))... | 50.874636 | 136 | 0.635759 |
1e50241184576b55a0c1fc5541f6fc20f6489452 | 1,855 | py | Python | TensorFlow_v1/cifar.py | leimao/Graph_Frozen_Load_TensorFlow | 8767d1ee8aa5e5b340a52dd0a8208896687c3131 | [
"MIT"
] | 200 | 2019-03-09T14:15:17.000Z | 2020-12-25T09:57:10.000Z | TensorFlow_v1/cifar.py | leimao/Graph_Frozen_Load_TensorFlow | 8767d1ee8aa5e5b340a52dd0a8208896687c3131 | [
"MIT"
] | 13 | 2020-02-15T13:53:47.000Z | 2020-12-12T20:57:55.000Z | TensorFlow_v1/cifar.py | leimao/Graph_Frozen_Load_TensorFlow | 8767d1ee8aa5e5b340a52dd0a8208896687c3131 | [
"MIT"
] | 58 | 2019-06-03T16:45:11.000Z | 2020-12-21T06:57:48.000Z | import tensorflow as tf
import numpy as np
def train_test_split(x, y, train_fraction=0.9):
# Split the data into training data and test data
assert len(x) == len(y)
dataset_size = len(x)
idx = np.arange(len(x))
np.random.shuffle(idx)
idx_split = int(dataset_size * train_fraction)
x_train ... | 34.351852 | 77 | 0.578437 |
0f8a5218c6edb66ad45e602ac790c40e60ac70b9 | 1,233 | py | Python | examples/example_polar.py | shimpe/pyvectortween | aff071180474739060ec2d3102c39c8e73510988 | [
"MIT"
] | 6 | 2017-05-17T23:34:41.000Z | 2022-03-15T17:12:19.000Z | examples/example_polar.py | shimpe/pyvectortween | aff071180474739060ec2d3102c39c8e73510988 | [
"MIT"
] | null | null | null | examples/example_polar.py | shimpe/pyvectortween | aff071180474739060ec2d3102c39c8e73510988 | [
"MIT"
] | null | null | null | if __name__ == "__main__":
import gizeh
import moviepy.editor as mpy
from vectortween.PolarAnimation import PolarAnimation
def random_color():
import random
return (random.uniform(0, 1) for _ in range(3))
W, H = 250, 250 # width, height, in pixels
duration = 10 # duration ... | 29.357143 | 102 | 0.602595 |
094bf56d54579904a6926cff0753fe181ac74fc3 | 5,602 | py | Python | frappe/config/setup.py | rohitw1991/smarttailorfrappe | d42adde9cadf1095e10ebdea039ba55a35ab197e | [
"MIT"
] | 1 | 2022-03-05T16:02:39.000Z | 2022-03-05T16:02:39.000Z | frappe/config/setup.py | rohitw1991/smarttailorfrappe | d42adde9cadf1095e10ebdea039ba55a35ab197e | [
"MIT"
] | null | null | null | frappe/config/setup.py | rohitw1991/smarttailorfrappe | d42adde9cadf1095e10ebdea039ba55a35ab197e | [
"MIT"
] | null | null | null | from frappe import _
from frappe.widgets.moduleview import add_setup_section
def get_data():
data = [
{
"label": _("Users and Permissions"),
"icon": "icon-group",
"items": [
{
"type": "doctype",
"name": "User",
"description": _("System and Website Users")
},
{
"type": "docty... | 23.940171 | 83 | 0.532488 |
1821a6ac7b4ee0ed53d7b0022ab6cc709bd82073 | 338 | py | Python | models/sys_modul.py | lonerzacky/FlaskPonyORM | 7deba4302368b8dd61238e97dfd2522aea0735fe | [
"MIT"
] | 3 | 2019-05-07T10:45:56.000Z | 2021-08-06T08:21:46.000Z | models/sys_modul.py | lonerzacky/FlaskPonyORM | 7deba4302368b8dd61238e97dfd2522aea0735fe | [
"MIT"
] | null | null | null | models/sys_modul.py | lonerzacky/FlaskPonyORM | 7deba4302368b8dd61238e97dfd2522aea0735fe | [
"MIT"
] | null | null | null | from connection import db, Required, PrimaryKey, Optional
class SysModul(db.Entity):
_table_ = 'sys_modul'
sysmodul_kode = PrimaryKey(str)
sysmodul_nama = Required(str)
sysmodul_url = Required(str)
sysmodul_icon = Required(str)
sysmodul_parent = Optional(str, nullable=True)
sysmodul_no_uru... | 28.166667 | 57 | 0.730769 |
675ce075924ae752110b2e8117e3a31446cfbc1a | 4,994 | py | Python | week_08/files/concatenate_all_fasta.py | oscarvargash/biol_550_2022 | 95d68c1d11b80f6e4069d6642a031a3708c047e1 | [
"MIT"
] | null | null | null | week_08/files/concatenate_all_fasta.py | oscarvargash/biol_550_2022 | 95d68c1d11b80f6e4069d6642a031a3708c047e1 | [
"MIT"
] | null | null | null | week_08/files/concatenate_all_fasta.py | oscarvargash/biol_550_2022 | 95d68c1d11b80f6e4069d6642a031a3708c047e1 | [
"MIT"
] | 2 | 2022-02-17T18:11:52.000Z | 2022-02-21T22:04:10.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Python script to make two kinds of concatenations:
# 1. a concatenation of introns and exons per gene
# 2. a supermatrix concatenation
# for every concatenation the script produces a RAxML partition
# a dataframe is produce with data occupancy per taxon
# a summary text... | 33.293333 | 114 | 0.705046 |
06f4ab9d087731c74aa5393f939fe2cc98d84f33 | 9,614 | py | Python | src/abaqus/Load/Moment.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | 7 | 2022-01-21T09:15:45.000Z | 2022-02-15T09:31:58.000Z | src/abaqus/Load/Moment.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | null | null | null | src/abaqus/Load/Moment.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | null | null | null | import typing
from abaqusConstants import *
from .Load import Load
from ..Region.Region import Region
class Moment(Load):
"""The Moment object stores the data for a moment.
The Moment object is derived from the Load object.
Attributes
----------
name: str
A String specifying the load re... | 48.311558 | 135 | 0.649886 |
a1f646c0a8fdd74caa977cd16d56a7cdf315d61a | 7,582 | py | Python | main.py | benwhittington/Fractal | f990e70d7101086519e76c59ba0b7ca49e119a51 | [
"MIT"
] | null | null | null | main.py | benwhittington/Fractal | f990e70d7101086519e76c59ba0b7ca49e119a51 | [
"MIT"
] | null | null | null | main.py | benwhittington/Fractal | f990e70d7101086519e76c59ba0b7ca49e119a51 | [
"MIT"
] | null | null | null |
#+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+//
# //
# main.py ... | 37.349754 | 139 | 0.637035 |
ba4c40bb77e827daf3eebd91771ddba9f5db506d | 1,151 | py | Python | PyPlotter/Example1.py | jecki/CoopSim | 65756b0a98d894e5a10c63431bb119a0b9c3e363 | [
"MIT"
] | 4 | 2015-09-06T18:48:36.000Z | 2021-04-13T00:38:06.000Z | PyPlotter/Example1.py | jecki/CoopSim | 65756b0a98d894e5a10c63431bb119a0b9c3e363 | [
"MIT"
] | null | null | null | PyPlotter/Example1.py | jecki/CoopSim | 65756b0a98d894e5a10c63431bb119a0b9c3e363 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Test.py: demonstration of the Graph.Cartesian class
"""
Test.py - This is a simple example of the use of the
Graph.Cartesian class to plot a graph on a cartesian
coordinate plain.
"""
import math
import Graph, Gfx, Compatibility
GfxDriver = Compatibility.GetDriver()
print("Using Driver: "+GfxDrive... | 25.577778 | 83 | 0.679409 |
88a619a39e1a0e8e64620d0970aee1f33d3cccc9 | 329 | py | Python | tests/test_init.py | m-vdb/mailgun-python-sdk | 63b9ed7e0e55a55d473670b10edcd06c6a9abfda | [
"MIT"
] | 4 | 2018-02-15T13:16:55.000Z | 2021-12-10T02:34:07.000Z | tests/test_init.py | m-vdb/mailgun-python-sdk | 63b9ed7e0e55a55d473670b10edcd06c6a9abfda | [
"MIT"
] | null | null | null | tests/test_init.py | m-vdb/mailgun-python-sdk | 63b9ed7e0e55a55d473670b10edcd06c6a9abfda | [
"MIT"
] | 1 | 2021-12-10T02:31:09.000Z | 2021-12-10T02:31:09.000Z | import unittest
import mailgun
from mailgun.api import MailgunApi
class MailgunInitTestCase(unittest.TestCase):
def test_api(self):
self.assertIsInstance(mailgun.api, MailgunApi)
def test_initialize(self):
mailgun.initialize("api-key-xxx")
self.assertEqual(mailgun.api.api_key, "api-k... | 23.5 | 60 | 0.732523 |
094fbfb9f5eba7c1a7cbc405cbe7124c0ba94658 | 7,476 | py | Python | sdk/python/pulumi_azure_nextgen/network/v20160401/zone.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/network/v20160401/zone.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/network/v20160401/zone.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"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
from ... import _utilities, _tables
__a... | 43.976471 | 424 | 0.645265 |
a48485bc699424cc4d550b06e2daece2bfb23a9d | 11,695 | py | Python | ax/modelbridge/model_spec.py | j-wilson/Ax | 555489d0fd743e5422ab3a1994f8e4d44275ae21 | [
"MIT"
] | null | null | null | ax/modelbridge/model_spec.py | j-wilson/Ax | 555489d0fd743e5422ab3a1994f8e4d44275ae21 | [
"MIT"
] | null | null | null | ax/modelbridge/model_spec.py | j-wilson/Ax | 555489d0fd743e5422ab3a1994f8e4d44275ae21 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import json
import warnings
from copy import deepcopy
from dataclasses import dataclass
from typing import Tuple, Lis... | 37.847896 | 88 | 0.64472 |
feab7d2bcaf44f49e4c9e03d0dfdb4f37e84988f | 4,612 | py | Python | pypureclient/flasharray/FA_2_6/models/host_performance_balance.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 14 | 2018-12-07T18:30:27.000Z | 2022-02-22T09:12:33.000Z | pypureclient/flasharray/FA_2_6/models/host_performance_balance.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 28 | 2019-09-17T21:03:52.000Z | 2022-03-29T22:07:35.000Z | pypureclient/flasharray/FA_2_6/models/host_performance_balance.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 15 | 2020-06-11T15:50:08.000Z | 2022-03-21T09:27:25.000Z | # coding: utf-8
"""
FlashArray REST API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.6
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re
import six
import typing
from .... | 32.478873 | 274 | 0.569384 |
db68843080a35e9f22c3819c2f8c3b916e4b1d7e | 7,628 | py | Python | homeassistant/components/deconz/climate.py | NikoM87/core | 7403ba1e81579b4ab83da24e570d4afe864e6312 | [
"Apache-2.0"
] | 5 | 2018-10-23T14:15:05.000Z | 2021-11-26T06:38:44.000Z | homeassistant/components/deconz/climate.py | NikoM87/core | 7403ba1e81579b4ab83da24e570d4afe864e6312 | [
"Apache-2.0"
] | 79 | 2020-07-23T07:13:37.000Z | 2022-03-22T06:02:37.000Z | homeassistant/components/deconz/climate.py | kmdm/home-assistant | 4007430d7262ef035bb80affea13657fdc993b1d | [
"Apache-2.0"
] | 2 | 2019-06-11T12:13:14.000Z | 2020-12-24T23:17:53.000Z | """Support for deCONZ climate devices."""
from __future__ import annotations
from pydeconz.sensor import Thermostat
from homeassistant.components.climate import DOMAIN, ClimateEntity
from homeassistant.components.climate.const import (
FAN_AUTO,
FAN_HIGH,
FAN_LOW,
FAN_MEDIUM,
FAN_OFF,
FAN_ON,
... | 29.680934 | 88 | 0.65666 |
48cdc443512ca9e7b40630250ffc773a1627665f | 1,743 | py | Python | JavPy/utils/torrent.py | awesome-archive/JavPy | 129db8259c9c681ec194eb4d1714a2f2a2a9d278 | [
"MIT"
] | null | null | null | JavPy/utils/torrent.py | awesome-archive/JavPy | 129db8259c9c681ec194eb4d1714a2f2a2a9d278 | [
"MIT"
] | null | null | null | JavPy/utils/torrent.py | awesome-archive/JavPy | 129db8259c9c681ec194eb4d1714a2f2a2a9d278 | [
"MIT"
] | null | null | null | import libtorrent as lt
import time
import tempfile
import shutil
from JavPy.utils.requester import spawn
import requests
__tracker_list_url = "https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best.txt"
__tracker_url = ""
def __set_tracker_list(rsp):
global __tracker_url
__tracker_url =... | 24.9 | 141 | 0.679862 |
6a4566467b3c8a23e5f131a52cada3f944147884 | 1,533 | py | Python | src/edge.py | mattianeroni/milk-logistics | 052f27f8c6426f9d362bd2c2af7daf39f5251752 | [
"Apache-2.0"
] | null | null | null | src/edge.py | mattianeroni/milk-logistics | 052f27f8c6426f9d362bd2c2af7daf39f5251752 | [
"Apache-2.0"
] | null | null | null | src/edge.py | mattianeroni/milk-logistics | 052f27f8c6426f9d362bd2c2af7daf39f5251752 | [
"Apache-2.0"
] | null | null | null | """
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
This file is part of the collaboration between University of Modena and
University of Campania "Luigi Vanvitelli". It is authored by Mattia Neroni and Marta Rinaldi.
The scope is the implementation and validation of sev... | 39.307692 | 95 | 0.630789 |
355814ff7c53e16ba34fa90fd59f403e122ed436 | 31 | py | Python | yelp/__init__.py | zehengl/ezapi-yelp | ddab2bb4c61e3f5f5cad8f9772c113887004f9f2 | [
"MIT"
] | 3 | 2016-01-28T07:56:13.000Z | 2016-07-03T05:13:01.000Z | yelp/__init__.py | zehengl/ezapi_yelp | e37d90522129528aace92ade49e9d12c27ff906b | [
"MIT"
] | 1 | 2017-06-23T22:41:09.000Z | 2017-06-24T21:24:43.000Z | yelp/__init__.py | zehengl/ezapi_yelp | e37d90522129528aace92ade49e9d12c27ff906b | [
"MIT"
] | 1 | 2019-02-16T15:58:28.000Z | 2019-02-16T15:58:28.000Z | from .fusion import YelpFusion
| 15.5 | 30 | 0.83871 |
0019867a69f6903bb14b272af5d6c5dc72934bbd | 224 | py | Python | arvet/database/pymodm_abc.py | jskinn/arvet | 742cf3e7ee8848c4efebfaa887fc9c0fd90a06e9 | [
"BSD-2-Clause"
] | 2 | 2021-05-27T21:48:34.000Z | 2021-06-12T02:58:44.000Z | arvet/database/pymodm_abc.py | jskinn/arvet | 742cf3e7ee8848c4efebfaa887fc9c0fd90a06e9 | [
"BSD-2-Clause"
] | null | null | null | arvet/database/pymodm_abc.py | jskinn/arvet | 742cf3e7ee8848c4efebfaa887fc9c0fd90a06e9 | [
"BSD-2-Clause"
] | null | null | null | import abc
import pymodm
class ABCModelMeta(abc.ABCMeta, pymodm.base.models.TopLevelMongoModelMetaclass):
"""
A quick helper superclass to allow pymodm Models which are also abstract base classes.
"""
pass
| 22.4 | 90 | 0.745536 |
27d6079de380b35dbb39639a9ccf8cfe039f11e1 | 3,177 | py | Python | BoxInceptionResnet.py | apulis/RFCN-tensorflow | 948f5fc79cfcb542ada593bb2ea4b86bb08d5e5c | [
"Apache-2.0"
] | 333 | 2017-03-01T05:40:49.000Z | 2020-08-08T22:31:48.000Z | BoxInceptionResnet.py | breakend2010/RFCN-tensorflow | 948f5fc79cfcb542ada593bb2ea4b86bb08d5e5c | [
"Apache-2.0"
] | 49 | 2017-02-28T23:06:08.000Z | 2020-08-20T12:20:07.000Z | BoxInceptionResnet.py | breakend2010/RFCN-tensorflow | 948f5fc79cfcb542ada593bb2ea4b86bb08d5e5c | [
"Apache-2.0"
] | 154 | 2017-02-27T12:42:42.000Z | 2020-08-08T22:31:49.000Z | # Copyright 2017 Robert Csordas. 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... | 40.21519 | 167 | 0.723009 |
103cf1492faa3613ebe701f5e77ecf4cad907574 | 1,418 | py | Python | app/models/flashcard.py | josephtey/Flashcards | 833123a056b226464e4c76d262b6b97377b4f6d7 | [
"MIT"
] | 37 | 2017-03-17T19:10:10.000Z | 2021-11-20T05:36:16.000Z | app/models/flashcard.py | josephtey/Flashcards | 833123a056b226464e4c76d262b6b97377b4f6d7 | [
"MIT"
] | 3 | 2017-03-26T01:50:40.000Z | 2021-03-04T12:34:20.000Z | app/models/flashcard.py | josephtey/Flashcards | 833123a056b226464e4c76d262b6b97377b4f6d7 | [
"MIT"
] | 21 | 2017-03-22T21:57:47.000Z | 2022-03-16T01:28:55.000Z | from .. import db
from markdown import markdown
import bleach
class Flashcard(db.Model):
__tablename__ = 'flashcard'
id = db.Column(db.Integer, primary_key=True)
question = db.Column(db.Text)
question_html = db.Column(db.Text)
answer = db.Column(db.Text)
answer_html = db.Column(db.Text)
ri... | 41.705882 | 113 | 0.656559 |
2847d140af494d8826947836b8c53e4fdf77bc07 | 424 | py | Python | src/nn/dataset_utils/data_transformers/fastTextEmbeddingOfVarName.py | sola-st/Nalin | 3a6f95cec95d9152a65af970cfbb145179b0bd72 | [
"MIT"
] | null | null | null | src/nn/dataset_utils/data_transformers/fastTextEmbeddingOfVarName.py | sola-st/Nalin | 3a6f95cec95d9152a65af970cfbb145179b0bd72 | [
"MIT"
] | null | null | null | src/nn/dataset_utils/data_transformers/fastTextEmbeddingOfVarName.py | sola-st/Nalin | 3a6f95cec95d9152a65af970cfbb145179b0bd72 | [
"MIT"
] | null | null | null | """
Created on 23-June-2020
@author Jibesh Patra
"""
import fasttext
from typing import Dict
class fastTextEmbeddingOfVarName:
def __init__(self, embedding_path: str):
self.embedding = fasttext.load_model(path=embedding_path)
self.embedding_dim = self.embedding.get_dimension()
def __call_... | 20.190476 | 65 | 0.700472 |
50528ad024d4785e5c57837e221d55df4c4bb98d | 459 | py | Python | delete-bastion-trigger/index.py | thatsamguy/fargate-bastion | 9ca4282ebf18ea6728e27e5bec15192427ee5b4d | [
"MIT"
] | null | null | null | delete-bastion-trigger/index.py | thatsamguy/fargate-bastion | 9ca4282ebf18ea6728e27e5bec15192427ee5b4d | [
"MIT"
] | null | null | null | delete-bastion-trigger/index.py | thatsamguy/fargate-bastion | 9ca4282ebf18ea6728e27e5bec15192427ee5b4d | [
"MIT"
] | null | null | null | import json
import boto3
import os
delete_bastion_function = os.environ['DELETE_FUNCTION']
def lambda_handler(event, context):
user = event['queryStringParameters']['user']
client = boto3.client('lambda')
client.invoke(
FunctionName=delete_bastion_function,
InvocationType='Event',
... | 22.95 | 67 | 0.679739 |
42852b2a82db759296d867517eaac2e97aa94a7f | 3,173 | py | Python | magenta/music/sequence_generator_test.py | fanzhiyan/magenta | 622c47c19bb84c6f57b286ed03b738516b2f27d6 | [
"Apache-2.0"
] | 16 | 2016-09-02T04:59:30.000Z | 2022-01-11T10:38:29.000Z | magenta/music/sequence_generator_test.py | fanzhiyan/magenta | 622c47c19bb84c6f57b286ed03b738516b2f27d6 | [
"Apache-2.0"
] | 2 | 2016-09-25T16:39:59.000Z | 2016-11-18T17:43:41.000Z | magenta/music/sequence_generator_test.py | fanzhiyan/magenta | 622c47c19bb84c6f57b286ed03b738516b2f27d6 | [
"Apache-2.0"
] | 10 | 2016-09-02T04:59:32.000Z | 2021-09-29T06:57:24.000Z | # Copyright 2019 The Magenta Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 32.050505 | 74 | 0.746612 |
dd114ce0615a2e52150ac1b5441fc90c09c76e46 | 202 | py | Python | projecteuler/level02/29.py | polylogarithm/cp | 426cb6f6ba389ff5f492e5bc2e957aac128781b5 | [
"MIT"
] | null | null | null | projecteuler/level02/29.py | polylogarithm/cp | 426cb6f6ba389ff5f492e5bc2e957aac128781b5 | [
"MIT"
] | null | null | null | projecteuler/level02/29.py | polylogarithm/cp | 426cb6f6ba389ff5f492e5bc2e957aac128781b5 | [
"MIT"
] | null | null | null | import math
List = []
for a in range (2,101):
for b in range (2,101):
x = math.pow(a,b)
List.append(x)
List = list(set(List))
print(len(List))
#https://zhuanlan.zhihu.com/p/62291839 | 20.2 | 38 | 0.60396 |
cd9a39a48c3d90692250f2ed96471d21474298f3 | 2,012 | py | Python | linux_proc_extras/setup.py | kzap/integrations-core | 88c3a72dbf5223b496be1c549ca2857d8489c491 | [
"BSD-3-Clause"
] | 1 | 2021-01-28T01:45:37.000Z | 2021-01-28T01:45:37.000Z | linux_proc_extras/setup.py | kzap/integrations-core | 88c3a72dbf5223b496be1c549ca2857d8489c491 | [
"BSD-3-Clause"
] | 3 | 2021-01-27T04:56:40.000Z | 2021-02-26T06:29:22.000Z | linux_proc_extras/setup.py | kzap/integrations-core | 88c3a72dbf5223b496be1c549ca2857d8489c491 | [
"BSD-3-Clause"
] | 1 | 2021-04-07T16:58:27.000Z | 2021-04-07T16:58:27.000Z | # (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from codecs import open # To use a consistent encoding
from os import path
from setuptools import setup
HERE = path.dirname(path.abspath(__file__))
# Get version info
ABOUT = {}
with open(path.join(HE... | 30.953846 | 87 | 0.684394 |
bdfa79046b74cf7c8fe75af98f24fe8c53dd8548 | 3,099 | py | Python | src/transformers/data/metrics/__init__.py | traumasv/transformers | ef3695d20b1b53b156bb44514fccb76ec49d21bb | [
"Apache-2.0"
] | null | null | null | src/transformers/data/metrics/__init__.py | traumasv/transformers | ef3695d20b1b53b156bb44514fccb76ec49d21bb | [
"Apache-2.0"
] | null | null | null | src/transformers/data/metrics/__init__.py | traumasv/transformers | ef3695d20b1b53b156bb44514fccb76ec49d21bb | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. 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 cop... | 35.215909 | 83 | 0.625686 |
4705d8aa1d33606e42adaf61d13611a1007d2ea2 | 649 | py | Python | src/products/migrations/0002_auto_20201025_1557.py | vladimir-grigoriev/python_curse | 2ec55f453f29892bfbd8ba2d4f0712f7c0263ec2 | [
"Apache-2.0"
] | null | null | null | src/products/migrations/0002_auto_20201025_1557.py | vladimir-grigoriev/python_curse | 2ec55f453f29892bfbd8ba2d4f0712f7c0263ec2 | [
"Apache-2.0"
] | null | null | null | src/products/migrations/0002_auto_20201025_1557.py | vladimir-grigoriev/python_curse | 2ec55f453f29892bfbd8ba2d4f0712f7c0263ec2 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.1.2 on 2020-10-25 15:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='book',
name='inclusion_in_catalog_da... | 27.041667 | 98 | 0.622496 |
e455d71e7a9af62c3488052a007d3c3610f6f646 | 2,202 | py | Python | ex-9 lr(0)/lr_0.py | ComputerScientist-01/Compiler-Design-1 | cc009eaad98cac777893bbbb1fc3b93cc7b4e29a | [
"MIT"
] | null | null | null | ex-9 lr(0)/lr_0.py | ComputerScientist-01/Compiler-Design-1 | cc009eaad98cac777893bbbb1fc3b93cc7b4e29a | [
"MIT"
] | 1 | 2022-01-09T15:18:51.000Z | 2022-01-09T15:18:51.000Z | ex-9 lr(0)/lr_0.py | ComputerScientist-01/Compiler-Design-1 | cc009eaad98cac777893bbbb1fc3b93cc7b4e29a | [
"MIT"
] | null | null | null | gram = {
"S":["CC"],
"C":["aC","d"]
}
start = "S"
terms = ["a","d","$"]
non_terms = list(gram)
gram["S'"]= [start]
new_row = {i: "" for i in terms+non_terms}
non_terms += ["S'"]
# each row in state table will be dictionary {nonterms ,term,$}
stateTable = []
# I = [(terminal, closure)]
# I = [("S","... | 24.197802 | 80 | 0.529973 |
d8c7c7ccb736da2a72f88b2398fdd6505a68597a | 135 | py | Python | isensus/defaults/__init__.py | MPI-IS/isensus | 23171afc7f5b1d2b322a4ab2ef274d5bd3457fdc | [
"BSD-3-Clause"
] | null | null | null | isensus/defaults/__init__.py | MPI-IS/isensus | 23171afc7f5b1d2b322a4ab2ef274d5bd3457fdc | [
"BSD-3-Clause"
] | null | null | null | isensus/defaults/__init__.py | MPI-IS/isensus | 23171afc7f5b1d2b322a4ab2ef274d5bd3457fdc | [
"BSD-3-Clause"
] | null | null | null | from pathlib import Path
"""absolute path used as default for the json file database"""
default_path: Path = Path.home() / ".isensus"
| 27 | 62 | 0.733333 |
2d9cca5ae99738a7a7143a0a5e34ca7c208db57d | 246 | py | Python | invenio_app_ils/circulation/jsonresolvers/__init__.py | NRodriguezcuellar/invenio-app-ils | 144a25a6c56330b214c6fd0b832220fa71f2e68a | [
"MIT"
] | 41 | 2018-09-04T13:00:46.000Z | 2022-03-24T20:45:56.000Z | invenio_app_ils/circulation/jsonresolvers/__init__.py | NRodriguezcuellar/invenio-app-ils | 144a25a6c56330b214c6fd0b832220fa71f2e68a | [
"MIT"
] | 720 | 2017-03-10T08:02:41.000Z | 2022-01-14T15:36:37.000Z | invenio_app_ils/circulation/jsonresolvers/__init__.py | NRodriguezcuellar/invenio-app-ils | 144a25a6c56330b214c6fd0b832220fa71f2e68a | [
"MIT"
] | 54 | 2017-03-09T16:05:29.000Z | 2022-03-17T08:34:51.000Z | # -*- coding: utf-8 -*-
#
# Copyright (C) 2020 CERN.
#
# invenio-app-ils is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""ILS circulation resolvers module."""
| 27.333333 | 76 | 0.703252 |
e99e1dd075d9b15fb914620d0738bf4dfea10810 | 18,320 | py | Python | allennlp/models/biattentive_classification_network.py | wjn922/allennlp | 9b0d1be2abbc0b2a7eba1f2283d92b8f73aa9031 | [
"Apache-2.0"
] | null | null | null | allennlp/models/biattentive_classification_network.py | wjn922/allennlp | 9b0d1be2abbc0b2a7eba1f2283d92b8f73aa9031 | [
"Apache-2.0"
] | null | null | null | allennlp/models/biattentive_classification_network.py | wjn922/allennlp | 9b0d1be2abbc0b2a7eba1f2283d92b8f73aa9031 | [
"Apache-2.0"
] | null | null | null | from typing import Dict, Optional, Union
import numpy
from overrides import overrides
import torch
from torch import nn
import torch.nn.functional as F
from allennlp.common import Params
from allennlp.common.checks import check_dimensions_match, ConfigurationError
from allennlp.data import Vocabulary
from allennlp.mo... | 52.643678 | 115 | 0.637172 |
e28c6bec6a54b81d7ad7ec9ea1ef30cfe44cc2c3 | 8,599 | py | Python | allennlp/models/biaffine_dependency_parser_multilang.py | loopylangur/allennlp | 0fc695b08a0376317e45ae0a45584aa9eb14beb6 | [
"Apache-2.0"
] | null | null | null | allennlp/models/biaffine_dependency_parser_multilang.py | loopylangur/allennlp | 0fc695b08a0376317e45ae0a45584aa9eb14beb6 | [
"Apache-2.0"
] | null | null | null | allennlp/models/biaffine_dependency_parser_multilang.py | loopylangur/allennlp | 0fc695b08a0376317e45ae0a45584aa9eb14beb6 | [
"Apache-2.0"
] | null | null | null | from typing import Dict, Optional, Any, List
import logging
from collections import defaultdict
from overrides import overrides
import torch
import numpy
from allennlp.common.checks import ConfigurationError
from allennlp.data import Vocabulary
from allennlp.modules import Seq2SeqEncoder, TextFieldEmbedder, Embedding... | 41.946341 | 105 | 0.663682 |
e41868cb27e495dae68f0911232c75786753e27d | 806 | py | Python | estudo-dirigido/codigo/hill_climbing.py | NinjaDoMato/inteligencia_artificial | 7ca08f9664c9fcb012192326e57c27201acad870 | [
"MIT"
] | null | null | null | estudo-dirigido/codigo/hill_climbing.py | NinjaDoMato/inteligencia_artificial | 7ca08f9664c9fcb012192326e57c27201acad870 | [
"MIT"
] | null | null | null | estudo-dirigido/codigo/hill_climbing.py | NinjaDoMato/inteligencia_artificial | 7ca08f9664c9fcb012192326e57c27201acad870 | [
"MIT"
] | 1 | 2018-11-28T21:57:28.000Z | 2018-11-28T21:57:28.000Z | #!/usr/bin/env python
class HillClimbing(object):
def __init__(self, max_alt, max_sem_alt):
self.max_alt = max_alt
self.max_sem_alt = max_sem_alt
def executa(self, problema):
atual = problema.estado_inicial
i = 0
j = 0
while i < self.max_alt or j < self.max_s... | 26.866667 | 86 | 0.57196 |
0751c604cdc9f7fac4bdc2640484f6a0f20c5004 | 1,492 | py | Python | app/operations/wordcount/action.py | mainulhossain/biowl | 039adc96539fae25843b1fc36074a4e5e55830ec | [
"MIT"
] | null | null | null | app/operations/wordcount/action.py | mainulhossain/biowl | 039adc96539fae25843b1fc36074a4e5e55830ec | [
"MIT"
] | null | null | null | app/operations/wordcount/action.py | mainulhossain/biowl | 039adc96539fae25843b1fc36074a4e5e55830ec | [
"MIT"
] | 1 | 2020-01-05T10:47:21.000Z | 2020-01-05T10:47:21.000Z | from __future__ import print_function
from ...models import Workflow, WorkItem, DataSource, OperationSource, Task
import sys
from subprocess import call
from ..hadoop import runHadoop
import os
from ..tasks import task_manager
from ...util import Utility
#wordcount = Blueprint('wordcount', __name__)
class Action(obje... | 37.3 | 170 | 0.668901 |
9c47f6b25effe13d002594c5a72cccf6a579ab11 | 1,541 | py | Python | Exercicios/Mundo 2/ex068.py | EdsonRomao/CursoEmVideo | caf99f5a54c001069572a0318dfcaa50d028d362 | [
"MIT"
] | null | null | null | Exercicios/Mundo 2/ex068.py | EdsonRomao/CursoEmVideo | caf99f5a54c001069572a0318dfcaa50d028d362 | [
"MIT"
] | null | null | null | Exercicios/Mundo 2/ex068.py | EdsonRomao/CursoEmVideo | caf99f5a54c001069572a0318dfcaa50d028d362 | [
"MIT"
] | null | null | null | """
Faça um programa que jogue par ou impar com o computador. O jogo só será
interrompido quando o jogador perder.
mostrando o total de vitorias consecutivas que ele conquistou no final
do jogo.
"""
from random import randint
soma = 0
print('-=' * 20)
print('JOGO PAR OU IMPAR!')
print('-=' * 20)
cont = 0
while True:
... | 32.787234 | 97 | 0.541856 |
8a41168abb7a73ea69b578d3194717e93afb814c | 1,444 | py | Python | rules/vulnerabilities/rule_graphql.py | TomasTorresB/nerve | 3a5381648999bede564e27facfd24f883cd143f9 | [
"MIT"
] | 365 | 2020-09-23T22:29:35.000Z | 2022-03-31T00:05:08.000Z | rules/vulnerabilities/rule_graphql.py | TomasTorresB/nerve | 3a5381648999bede564e27facfd24f883cd143f9 | [
"MIT"
] | 19 | 2020-10-01T01:10:04.000Z | 2022-01-25T19:22:33.000Z | rules/vulnerabilities/rule_graphql.py | TomasTorresB/nerve | 3a5381648999bede564e27facfd24f883cd143f9 | [
"MIT"
] | 94 | 2020-09-28T21:03:30.000Z | 2022-03-28T11:05:04.000Z | from core.redis import rds
from core.triage import Triage
from core.parser import ScanParser
class Rule:
def __init__(self):
self.rule = 'VLN_FBQP'
self.rule_severity = 2
self.rule_description = 'This rule checks for open GraphQL Interfaces'
self.rule_confirm = 'Exposed GraphQL Interface'
sel... | 28.313725 | 91 | 0.621191 |
1e1cc33c78e10aa4177c7f541c224aae8628dcb5 | 3,010 | py | Python | src/main.py | cafltar/ControlledVocabularyAttributeTool | a19b6de945b78bc42b3f26a6393ac49441655c0f | [
"CC0-1.0"
] | null | null | null | src/main.py | cafltar/ControlledVocabularyAttributeTool | a19b6de945b78bc42b3f26a6393ac49441655c0f | [
"CC0-1.0"
] | null | null | null | src/main.py | cafltar/ControlledVocabularyAttributeTool | a19b6de945b78bc42b3f26a6393ac49441655c0f | [
"CC0-1.0"
] | null | null | null | from attribute_reader import AttributeReader
import google_sheets_io
import inventory_reader
import inventory_attribute
import attribute_reader
import pandas as pd
import pathlib
def main(
path_to_inventory,
path_to_attributes,
path_to_token,
path_to_credentials):
print("Main")
"""Entry poin... | 33.820225 | 153 | 0.649502 |
cdebdcd2973940e9b9daba6c56fdf0cdfb86aab5 | 322 | py | Python | streamweb/site_config.py | tkeech1/streamweb | 28b2e0952e9020eeb8e1c7c4787014a137c5b163 | [
"MIT"
] | null | null | null | streamweb/site_config.py | tkeech1/streamweb | 28b2e0952e9020eeb8e1c7c4787014a137c5b163 | [
"MIT"
] | null | null | null | streamweb/site_config.py | tkeech1/streamweb | 28b2e0952e9020eeb8e1c7c4787014a137c5b163 | [
"MIT"
] | null | null | null | from typing import Dict
website_id: str = "http://toddkeech.com/"
website_title: str = "toddkeech.com"
website_url: str = "http://toddkeech.com/"
website_description: str = "Notes."
website_author: Dict[str, str] = {"name": "Todd Keech", "email": "tk@toddkeech.com"}
website_language: str = "en"
environment: str = "dev... | 32.2 | 84 | 0.708075 |
429cb38e094daa2a7ac51e1e46a8cc8b69971815 | 7,440 | py | Python | datumaro/datumaro/components/extractors/datumaro.py | godlikejay/cvat | 50c40ba70dd8f890478068f29ce3de1057ec848c | [
"MIT"
] | 1 | 2019-08-23T06:06:45.000Z | 2019-08-23T06:06:45.000Z | datumaro/datumaro/components/extractors/datumaro.py | godlikejay/cvat | 50c40ba70dd8f890478068f29ce3de1057ec848c | [
"MIT"
] | null | null | null | datumaro/datumaro/components/extractors/datumaro.py | godlikejay/cvat | 50c40ba70dd8f890478068f29ce3de1057ec848c | [
"MIT"
] | 1 | 2020-01-24T15:52:00.000Z | 2020-01-24T15:52:00.000Z |
# Copyright (C) 2019 Intel Corporation
#
# SPDX-License-Identifier: MIT
from collections import defaultdict
import json
import os.path as osp
from datumaro.components.extractor import (Extractor, DatasetItem,
DEFAULT_SUBSET_NAME,
AnnotationType,
LabelObject, MaskObject, PointsObject, PolygonObject,
P... | 34.766355 | 80 | 0.59422 |
567f34f0ef5f2b8a81a72566c3543371dbc333b6 | 16,081 | py | Python | rules/IAM_USER_USED_LAST_90_DAYS/IAM_USER_USED_LAST_90_DAYS_test.py | pandover/aws-config-engine-for-compliance-as-code | 0a3d256f7b118c6d6ab99dd01656257c7fae3ab3 | [
"Apache-2.0"
] | 1 | 2019-08-25T18:58:08.000Z | 2019-08-25T18:58:08.000Z | rules/IAM_USER_USED_LAST_90_DAYS/IAM_USER_USED_LAST_90_DAYS_test.py | eshack94/aws-config-engine-for-compliance-as-code | 942efb4b88e662cee7032bbd2f0fe7b375979a9b | [
"Apache-2.0"
] | 1 | 2020-10-14T08:12:31.000Z | 2020-10-14T08:16:47.000Z | rules/IAM_USER_USED_LAST_90_DAYS/IAM_USER_USED_LAST_90_DAYS_test.py | eshack94/aws-config-engine-for-compliance-as-code | 942efb4b88e662cee7032bbd2f0fe7b375979a9b | [
"Apache-2.0"
] | 1 | 2020-09-18T18:15:57.000Z | 2020-09-18T18:15:57.000Z | import unittest
try:
from unittest.mock import MagicMock, patch, ANY
except ImportError:
import mock
from mock import MagicMock, patch, ANY
import botocore
from botocore.exceptions import ClientError
import sys
import datetime
import json
from dateutil.tz import tzutc
from datetime import timedelta
config_... | 53.963087 | 248 | 0.723462 |
9c0c833315da97ef0d8fa592a586616bdfc072dc | 889 | py | Python | account/migrations/0002_auto_20170902_1438.py | ahDDD/jwt-template | a342995fc1d63195696698dba8ea79445c5e28dc | [
"MIT"
] | 1 | 2017-11-14T07:54:31.000Z | 2017-11-14T07:54:31.000Z | account/migrations/0002_auto_20170902_1438.py | ahDDD/jwt-template | a342995fc1d63195696698dba8ea79445c5e28dc | [
"MIT"
] | null | null | null | account/migrations/0002_auto_20170902_1438.py | ahDDD/jwt-template | a342995fc1d63195696698dba8ea79445c5e28dc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-09-02 06:38
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('account', '0001_initial'),
]
operations = [
migrations.AlterField(
... | 28.677419 | 125 | 0.575928 |
00ffb73105f7058f1a87d7baaf9688adb7618e5b | 26,038 | py | Python | cwltool/main.py | philres/cwltool | ce00d7361ba271961f3c8da0dd63ca24abc45162 | [
"Apache-2.0"
] | null | null | null | cwltool/main.py | philres/cwltool | ce00d7361ba271961f3c8da0dd63ca24abc45162 | [
"Apache-2.0"
] | null | null | null | cwltool/main.py | philres/cwltool | ce00d7361ba271961f3c8da0dd63ca24abc45162 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from __future__ import absolute_import
from __future__ import print_function
import argparse
import collections
import functools
import json
import logging
import os
import sys
import warnings
from typing import (IO, Any, Callable, Dict, List, Text, Tuple,
Union, cast, Mapping... | 40.306502 | 140 | 0.559375 |
e1e4c53b5401fb923176b29be3c1e2a1537b5a35 | 1,117 | py | Python | addons/calendar/__manifest__.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | addons/calendar/__manifest__.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | addons/calendar/__manifest__.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Calendar',
'version': '1.0',
'sequence': 165,
'depends': ['base', 'mail'],
'summary': "Schedule employees' meetings",
'description': """
This is a full-featured calendar system.
=======... | 26.595238 | 74 | 0.57744 |
dcdf8d6d00f8841e24cea6200d55a976264406f2 | 6,388 | py | Python | main.py | ZyadHamed/SimpleHandSignDetector | e5ef37819d594f872cde7dc70c01af8d8cfa0012 | [
"MIT"
] | null | null | null | main.py | ZyadHamed/SimpleHandSignDetector | e5ef37819d594f872cde7dc70c01af8d8cfa0012 | [
"MIT"
] | null | null | null | main.py | ZyadHamed/SimpleHandSignDetector | e5ef37819d594f872cde7dc70c01af8d8cfa0012 | [
"MIT"
] | null | null | null | import math
from playsound import playsound
import sys
import cv2
import time
import mediapipe as mp
import keyboard
import numpy as np
import multiprocessing
import winsound
#Calculating the distance between 2 points
def Distance(landmark1, landmark2, image):
x1 = landmark1.x * image.shape[1]
x2... | 57.035714 | 400 | 0.634784 |
78b949d823055ff450e80d2078d61e23c5706a67 | 998 | py | Python | web/transfer_code.py | eiling/SchoolIdolAPI | a05980fdb33b143dbe2febfc1ad6cf723f025c8d | [
"Apache-2.0"
] | 65 | 2017-12-29T12:28:11.000Z | 2022-03-15T06:42:26.000Z | web/transfer_code.py | eiling/SchoolIdolAPI | a05980fdb33b143dbe2febfc1ad6cf723f025c8d | [
"Apache-2.0"
] | 31 | 2017-12-18T02:03:09.000Z | 2022-01-13T00:43:35.000Z | web/transfer_code.py | eiling/SchoolIdolAPI | a05980fdb33b143dbe2febfc1ad6cf723f025c8d | [
"Apache-2.0"
] | 7 | 2018-08-27T15:11:01.000Z | 2021-08-16T05:15:13.000Z | from django.conf import settings
import base64
import md5
import itertools
def stringxor(message, key):
"""Symmetric xor-based cipher."""
return [chr(ord(x) ^ ord(y)) for (x, y)
in zip(message, itertools.cycle(key))]
def makekey(password):
secret = settings.TRANSFER_CODE_SECRET_KEY
assert(... | 29.352941 | 75 | 0.662325 |
aaf15f8ab715c7612a32bee8db40bd83bc30a34f | 1,023 | py | Python | hoodapp/forms.py | kahiga2244/django-project3 | 48c1b68d494517aa0dc6253b50f4d9173a8f4768 | [
"MIT"
] | null | null | null | hoodapp/forms.py | kahiga2244/django-project3 | 48c1b68d494517aa0dc6253b50f4d9173a8f4768 | [
"MIT"
] | null | null | null | hoodapp/forms.py | kahiga2244/django-project3 | 48c1b68d494517aa0dc6253b50f4d9173a8f4768 | [
"MIT"
] | null | null | null | from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
from .models import Profile, Neighbourhood,Business, Post
from cloudinary.models import CloudinaryField
class RegisterForm(UserCreationForm):
email = forms.EmailField(max_length=254)
cla... | 27.648649 | 80 | 0.680352 |
140c3d1d3b914ef4e3030149ed499ec160013662 | 511 | py | Python | common/conf/default_settings.py | Junzki/joblet.common | de2ac90c069c2c2451a255f3e8a463f5f244acf2 | [
"BSD-3-Clause"
] | 1 | 2021-12-07T02:41:16.000Z | 2021-12-07T02:41:16.000Z | common/conf/default_settings.py | Junzki/joblet.common | de2ac90c069c2c2451a255f3e8a463f5f244acf2 | [
"BSD-3-Clause"
] | null | null | null | common/conf/default_settings.py | Junzki/joblet.common | de2ac90c069c2c2451a255f3e8a463f5f244acf2 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding:utf-8 -*-
DEBUG: bool = False
DEFAULT_DATABASE = 'default'
DATABASES = {
'default': {
'TYPE': 'sqlite',
'HOST': '',
'PORT': '',
'USER': '',
'PASSWORD': '',
'DBNAME': 'db.sqlite3'
}
}
# Enable SQLAlchemy's "automap".
POSTGRES_AUTO_MAP: bool = False
... | 19.653846 | 55 | 0.616438 |
7f23f12c6c5d58b11a9392979d6a61c21ded3952 | 5,183 | py | Python | models/networks/theano/lstm/lstm_2l_vanilla.py | PenTesting/tone-classifier | 680bf9c2e4d27c7a338d55204c544bf9ba1812b8 | [
"MIT"
] | 5 | 2018-01-31T12:45:05.000Z | 2018-12-07T03:36:57.000Z | models/networks/theano/lstm/lstm_2l_vanilla.py | PenTesting/tone-classifier | 680bf9c2e4d27c7a338d55204c544bf9ba1812b8 | [
"MIT"
] | null | null | null | models/networks/theano/lstm/lstm_2l_vanilla.py | PenTesting/tone-classifier | 680bf9c2e4d27c7a338d55204c544bf9ba1812b8 | [
"MIT"
] | 2 | 2017-04-04T14:30:04.000Z | 2018-07-23T15:37:30.000Z | import theano
import numpy as np
import theano.tensor as T
import pickle
class LSTM2lTheano:
def __init__(self, i_size, bptt_truncate=-1):
hl_size = i_size
self.hl_size = hl_size
self.i_size = i_size
self.bptt_truncate = bptt_truncate
x = T.matrix(name='x')
y = T... | 37.021429 | 79 | 0.526336 |
3f1804c606441c99cdf51e701f6184eb4de280e2 | 12,707 | py | Python | dna_com_analysis.py | luccapaldi/dna-com | fae3057ca61ab8aef7841fecfd30085afbecdc0e | [
"MIT"
] | null | null | null | dna_com_analysis.py | luccapaldi/dna-com | fae3057ca61ab8aef7841fecfd30085afbecdc0e | [
"MIT"
] | null | null | null | dna_com_analysis.py | luccapaldi/dna-com | fae3057ca61ab8aef7841fecfd30085afbecdc0e | [
"MIT"
] | null | null | null | """
This script performs a simple analysis on a single DNA moving through a
microfluidic channel.
Input background-subtracted tiff image stack of DNA optained using an Andor
camera and associated metadata file. This analysis calculates the DNA's center
of mass for each frame in the stack, the displacement (step distan... | 34.250674 | 79 | 0.64067 |
5ed7ea5b7a19eb5b96e18138238c05230f8a6d9f | 1,482 | py | Python | antlir/bzl/tests/test_image_unittest_repo_server.py | SaurabhAgarwala/antlir | d9513d35d3eaa9d28717a40057a14d099c6ec775 | [
"MIT"
] | null | null | null | antlir/bzl/tests/test_image_unittest_repo_server.py | SaurabhAgarwala/antlir | d9513d35d3eaa9d28717a40057a14d099c6ec775 | [
"MIT"
] | null | null | null | antlir/bzl/tests/test_image_unittest_repo_server.py | SaurabhAgarwala/antlir | d9513d35d3eaa9d28717a40057a14d099c6ec775 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os
import subprocess
import unittest
from antlir.config import load_repo_config
from antlir.fs_utils import tem... | 36.146341 | 74 | 0.590418 |
2901112753d9415f537a61f8db0e9681509587e9 | 3,493 | py | Python | junk/permutation.py | spencerparkin/LatchCube | e1936e588bf2d9daaa83a60e050d858f42e5ff6e | [
"MIT"
] | null | null | null | junk/permutation.py | spencerparkin/LatchCube | e1936e588bf2d9daaa83a60e050d858f42e5ff6e | [
"MIT"
] | null | null | null | junk/permutation.py | spencerparkin/LatchCube | e1936e588bf2d9daaa83a60e050d858f42e5ff6e | [
"MIT"
] | null | null | null | def Lcm( number_list ):
walk_list = number_list.copy()
while not all( [ walk_list[0] == walk_list[i] for i in range( 1, len( walk_list ) ) ] ):
j = 0
for i in range( 1, len( walk_list ) ):
if walk_list[i] < walk_list[j]:
j = i
walk_list[j] += number_list[j]
... | 33.266667 | 92 | 0.532207 |
3495b821045cef48d843bec5cecf21e37dee5606 | 628 | py | Python | manage.py | imekenye/Awwwards | bb495e091c8a81aff172528d233c41c36fc1d2aa | [
"Unlicense"
] | null | null | null | manage.py | imekenye/Awwwards | bb495e091c8a81aff172528d233c41c36fc1d2aa | [
"Unlicense"
] | 12 | 2020-02-12T00:22:15.000Z | 2022-03-11T23:47:32.000Z | manage.py | rosekairu/Awwwards | 12e9fa8190b7831dd8ca7b19f3d9fe8aa9a4f607 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Awwwards.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise Impor... | 28.545455 | 73 | 0.683121 |
5a9f688953b20b43d550269d26b2c195849af6e0 | 65,681 | py | Python | bak/enumerate_acquisition2.py | mkarim2017/standard_process | d50750e507cf1d4c9e3f9e7520476f1de8b42e77 | [
"Apache-2.0"
] | null | null | null | bak/enumerate_acquisition2.py | mkarim2017/standard_process | d50750e507cf1d4c9e3f9e7520476f1de8b42e77 | [
"Apache-2.0"
] | 15 | 2019-05-20T22:24:00.000Z | 2022-02-11T22:44:10.000Z | bak/enumerate_acquisition2.py | mkarim2017/standard_process | d50750e507cf1d4c9e3f9e7520476f1de8b42e77 | [
"Apache-2.0"
] | 3 | 2019-03-15T06:08:17.000Z | 2019-05-08T17:05:22.000Z | #!/usr/bin/env python
"""
Determine all combinations of topsApp configurations"
"""
from __future__ import division
from builtins import str
from builtins import range
from past.utils import old_div
import os, sys, re, requests, json, logging, traceback, argparse, copy, bisect
import hashlib
from itertools import prod... | 44.711368 | 124 | 0.495623 |
203e1798466f0a5bbb3dca1dc378764142d34f9b | 351 | py | Python | mayan/apps/document_comments/migrations/0006_auto_20210130_0658.py | nattangwiwat/Mayan-EDMS-recitation | fcf16afb56eae812fb99144d65ae1ae6749de0b7 | [
"Apache-2.0"
] | 343 | 2015-01-05T14:19:35.000Z | 2018-12-10T19:07:48.000Z | mayan/apps/document_comments/migrations/0006_auto_20210130_0658.py | nattangwiwat/Mayan-EDMS-recitation | fcf16afb56eae812fb99144d65ae1ae6749de0b7 | [
"Apache-2.0"
] | 191 | 2015-01-03T00:48:19.000Z | 2018-11-30T09:10:25.000Z | mayan/apps/document_comments/migrations/0006_auto_20210130_0658.py | nattangwiwat/Mayan-EDMS-recitation | fcf16afb56eae812fb99144d65ae1ae6749de0b7 | [
"Apache-2.0"
] | 257 | 2019-05-14T10:26:37.000Z | 2022-03-30T03:37:36.000Z | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('document_comments', '0005_auto_20210130_0658'),
]
operations = [
migrations.AlterField(
model_name='comment',
name='text',
field=models.TextField(verbose_... | 21.9375 | 57 | 0.598291 |
59ac9d6e6f0689cb666ca6ba85784ccf8a3d1144 | 567 | py | Python | blog/models.py | satyap54/blog-app | 6c56ba77c040fb09f75879eea1237c61619a8311 | [
"MIT"
] | null | null | null | blog/models.py | satyap54/blog-app | 6c56ba77c040fb09f75879eea1237c61619a8311 | [
"MIT"
] | null | null | null | blog/models.py | satyap54/blog-app | 6c56ba77c040fb09f75879eea1237c61619a8311 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from django.urls import reverse
# Create your models here.
class Post(models.Model):
title = models.CharField(max_length = 100)
content = models.TextField()
date_posted = models.DateTimeField(auto_now_add = True)
date_updated = models.DateTim... | 35.4375 | 63 | 0.767196 |
5dd705423681413e98a2fb9802088661f682905a | 5,325 | py | Python | Deploy/stacks/web/land_use/scripts/download-crop-data.py | cambridge-cares/TheWorldAvatar | baf08ddc090414c6d01e48c74b408f2192461e9e | [
"MIT"
] | 21 | 2021-03-08T01:58:25.000Z | 2022-03-09T15:46:16.000Z | Deploy/stacks/web/land_use/scripts/download-crop-data.py | cambridge-cares/TheWorldAvatar | baf08ddc090414c6d01e48c74b408f2192461e9e | [
"MIT"
] | 63 | 2021-05-04T15:05:30.000Z | 2022-03-23T14:32:29.000Z | Deploy/stacks/web/land_use/scripts/download-crop-data.py | cambridge-cares/TheWorldAvatar | baf08ddc090414c6d01e48c74b408f2192461e9e | [
"MIT"
] | 15 | 2021-03-08T07:52:03.000Z | 2022-03-29T04:46:20.000Z | """
This script queries the KG for crop data for a number of
different counties, before exporting to a GeoJSON file.
Once produced, the GeoJSON file is too large to plot using
MapBox so must be converted to MBTiles and uploaded to their
website manually.
Author: support<@>cmclinnovations.com
"""
import os
i... | 25.724638 | 100 | 0.687887 |
33ca40c07c03c15bf7349aef791b8c02e5caf36b | 10,645 | py | Python | svinst/defchk.py | sgherbst/pysvinst | a984a62ac692164d955a923959a633b15c2800a1 | [
"MIT"
] | 10 | 2020-03-03T22:24:46.000Z | 2021-11-20T08:13:10.000Z | svinst/defchk.py | sgherbst/pysvinst | a984a62ac692164d955a923959a633b15c2800a1 | [
"MIT"
] | 8 | 2020-05-28T20:42:15.000Z | 2020-11-11T23:58:55.000Z | svinst/defchk.py | sgherbst/pysvinst | a984a62ac692164d955a923959a633b15c2800a1 | [
"MIT"
] | 3 | 2020-10-21T19:10:29.000Z | 2021-12-03T05:58:21.000Z | from pathlib import Path
from pprint import pformat
import subprocess
import yaml
import sys
def error_text(s):
return f'**{s}**'
class SVInstParsingError(Exception):
"""Exception raised for errors while parsing.
Attributes:
error_set: Set of file indices that have parsing errors (starts at zero)... | 30.765896 | 113 | 0.576421 |
6dad709cc00356ed49932943649abb58753e70bf | 643 | py | Python | xonsh/xoreutils/yes.py | ion201/xonsh | 7cf0307a0d53d198b8c05c83456d86af14c0daa4 | [
"BSD-2-Clause-FreeBSD"
] | 7,986 | 2015-11-07T11:59:21.000Z | 2022-03-27T17:20:49.000Z | xonsh/xoreutils/yes.py | ion201/xonsh | 7cf0307a0d53d198b8c05c83456d86af14c0daa4 | [
"BSD-2-Clause-FreeBSD"
] | 3,644 | 2016-06-07T05:55:42.000Z | 2022-03-31T13:25:57.000Z | xonsh/xoreutils/yes.py | ion201/xonsh | 7cf0307a0d53d198b8c05c83456d86af14c0daa4 | [
"BSD-2-Clause-FreeBSD"
] | 576 | 2016-06-07T06:28:32.000Z | 2022-03-31T02:46:15.000Z | """An implementation of yes for xonsh."""
def yes(args, stdin, stdout, stderr):
"""A yes command."""
if "--help" in args:
print(YES_HELP, file=stdout)
return 0
to_print = ["y"] if len(args) == 0 else [str(i) for i in args]
while True:
print(*to_print, file=stdout)
return... | 24.730769 | 78 | 0.634526 |
1c4226e431d31b4206940f44ee3e0b27310391b5 | 2,196 | py | Python | scripts/csv_handling/dataload_format_to_csv.py | samholt/NeuralSymbolicRegressionThatScales | da023e5a3fdf157ab60e56a966eeea0129366bfc | [
"MIT"
] | 27 | 2021-06-17T07:31:55.000Z | 2022-03-16T14:52:16.000Z | scripts/csv_handling/dataload_format_to_csv.py | samholt/NeuralSymbolicRegressionThatScales | da023e5a3fdf157ab60e56a966eeea0129366bfc | [
"MIT"
] | 9 | 2021-07-05T12:58:42.000Z | 2022-03-31T15:11:36.000Z | scripts/csv_handling/dataload_format_to_csv.py | samholt/NeuralSymbolicRegressionThatScales | da023e5a3fdf157ab60e56a966eeea0129366bfc | [
"MIT"
] | 5 | 2021-06-26T19:07:43.000Z | 2022-03-23T15:09:31.000Z | import pandas as pd
import numpy as np
import multiprocessing
from multiprocessing import Manager
import click
import warnings
from tqdm import tqdm
import json
import os
from nesymres.dataset import generator
import time
import signal
from pathlib import Path
import pickle
from sympy import lambdify
from nesymres.uti... | 32.776119 | 98 | 0.718124 |
6064ac218646bcb4e221ad9a45c68260ea81a207 | 2,160 | py | Python | src/sga.py | nicklasbekkevold/feature-selection | 391c817e32f332221720aa08722079fd63de0d17 | [
"MIT"
] | null | null | null | src/sga.py | nicklasbekkevold/feature-selection | 391c817e32f332221720aa08722079fd63de0d17 | [
"MIT"
] | null | null | null | src/sga.py | nicklasbekkevold/feature-selection | 391c817e32f332221720aa08722079fd63de0d17 | [
"MIT"
] | null | null | null | import numpy as np
from common import (Diversity, Fitness, create_offsping,
generate_initial_population)
class SGA:
@staticmethod
def rank_selection(population_size, population, fitness_function, replace=False):
ranking = sorted(population, key=fitness_function)
rank_sum ... | 45 | 117 | 0.687963 |
9a663d376d3c004d8d880183c0bccbefc31eaf5c | 21,772 | py | Python | trinity/sync/beam/state.py | renaynay/trinity | b85f37281b21c00dce91b7c61ba018788467c270 | [
"MIT"
] | 3 | 2019-06-17T13:59:20.000Z | 2021-05-02T22:09:13.000Z | trinity/sync/beam/state.py | renaynay/trinity | b85f37281b21c00dce91b7c61ba018788467c270 | [
"MIT"
] | null | null | null | trinity/sync/beam/state.py | renaynay/trinity | b85f37281b21c00dce91b7c61ba018788467c270 | [
"MIT"
] | 2 | 2019-12-14T02:52:32.000Z | 2021-02-18T23:04:44.000Z | import asyncio
from collections import Counter
from concurrent.futures import CancelledError
import itertools
import typing
from typing import (
FrozenSet,
Iterable,
Set,
Tuple,
Type,
)
from lahja import EndpointAPI
from eth_hash.auto import keccak
from eth_utils import (
to_checksum_address,
... | 39.948624 | 100 | 0.630718 |
860c20d22110f83357263919f5ff6eb683e047cf | 2,085 | py | Python | doc/pyplots/text_layout.py | pierre-haessig/matplotlib | 0d945044ca3fbf98cad55912584ef80911f330c6 | [
"MIT",
"PSF-2.0",
"BSD-3-Clause"
] | 16 | 2016-06-14T19:45:35.000Z | 2020-11-30T19:02:58.000Z | doc/pyplots/text_layout.py | pierre-haessig/matplotlib | 0d945044ca3fbf98cad55912584ef80911f330c6 | [
"MIT",
"PSF-2.0",
"BSD-3-Clause"
] | 7 | 2015-05-08T19:36:25.000Z | 2015-06-30T15:32:17.000Z | doc/pyplots/text_layout.py | pierre-haessig/matplotlib | 0d945044ca3fbf98cad55912584ef80911f330c6 | [
"MIT",
"PSF-2.0",
"BSD-3-Clause"
] | 14 | 2015-10-05T04:15:46.000Z | 2020-06-11T18:06:02.000Z | import matplotlib.pyplot as plt
import matplotlib.patches as patches
# build a rectangle in axes coords
left, width = .25, .5
bottom, height = .25, .5
right = left + width
top = bottom + height
fig = plt.figure()
ax = fig.add_axes([0,0,1,1])
# axes coordinates are 0,0 is bottom left and 1,1 is upper right
p = patche... | 26.730769 | 64 | 0.648441 |
1c6a64dfc6544042269fac2ea38ebb41bc611404 | 215 | py | Python | rest/__init__.py | klen/aio-rest | d37bc4a43aaf68152ed0873a8037ce5c78606a66 | [
"MIT"
] | null | null | null | rest/__init__.py | klen/aio-rest | d37bc4a43aaf68152ed0873a8037ce5c78606a66 | [
"MIT"
] | null | null | null | rest/__init__.py | klen/aio-rest | d37bc4a43aaf68152ed0873a8037ce5c78606a66 | [
"MIT"
] | null | null | null | import logging
__version__ = "0.0.2"
__license__ = "MIT"
logger = logging.getLogger('restj')
from .api import API # noqa
from .endpoint import Endpoint # noqa
from .exceptions import * # noqa
| 16.538462 | 38 | 0.660465 |
0e56189f26f561d502ba6bacc0716f368ff8b62e | 5,784 | py | Python | accounts/views.py | Francis-Ebere-Emeafu/carehome | 2a708ac0edbc5c5f58e1ffb570da4fdaec2512b1 | [
"MIT"
] | null | null | null | accounts/views.py | Francis-Ebere-Emeafu/carehome | 2a708ac0edbc5c5f58e1ffb570da4fdaec2512b1 | [
"MIT"
] | null | null | null | accounts/views.py | Francis-Ebere-Emeafu/carehome | 2a708ac0edbc5c5f58e1ffb570da4fdaec2512b1 | [
"MIT"
] | null | null | null | from django.contrib import messages
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.shortcuts import redirect, render, get_object_or_404
from django.utils import timezone
from accounts.models i... | 35.268293 | 100 | 0.674447 |
bd3ccffbbe28ce41e8c820ca91de38906e90000c | 7,668 | py | Python | cmibs/ieee8023_lag_mib.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 84 | 2017-10-22T11:01:39.000Z | 2022-02-27T03:43:48.000Z | cmibs/ieee8023_lag_mib.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 22 | 2017-12-11T07:21:56.000Z | 2021-09-23T02:53:50.000Z | cmibs/ieee8023_lag_mib.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 23 | 2017-12-06T06:59:52.000Z | 2022-02-24T00:02:25.000Z | # ----------------------------------------------------------------------
# IEEE8023-LAG-MIB
# Compiled MIB
# Do not modify this file directly
# Run ./noc mib make-cmib instead
# ----------------------------------------------------------------------
# Copyright (C) 2007-2020 The NOC Project
# See LICENSE for details
# -... | 62.852459 | 104 | 0.665754 |
0b39f5d24010bfca420e4ba1a14c7e88a3c4924c | 477 | py | Python | Home/urls.py | NAL0/Website | 66f210317843f847fffc4dd75560d4bcaa2d403f | [
"MIT"
] | null | null | null | Home/urls.py | NAL0/Website | 66f210317843f847fffc4dd75560d4bcaa2d403f | [
"MIT"
] | null | null | null | Home/urls.py | NAL0/Website | 66f210317843f847fffc4dd75560d4bcaa2d403f | [
"MIT"
] | null | null | null | #from django.conf.urls import url
from . import views
from django.urls import path
#urlpatterns = [
# url(r'^$', views.index, name='index'),
# url(r'^mission', views.index2, name='index2'),
#]
urlpatterns = [
path('', views.index, name='index'),
path('mission/', views.index2, name='index2'),
path('d... | 29.8125 | 57 | 0.633124 |
9def988cf544363416e63d096244340c2cffe725 | 1,624 | py | Python | scripts/deep-coref/unpack_corpora.py | natemalek/molen-pater-nathan-rma-thesis-coreference-with-singletons | 3d2d6c751eadd6438a80b0c24f48b2635bc6acc7 | [
"MIT"
] | null | null | null | scripts/deep-coref/unpack_corpora.py | natemalek/molen-pater-nathan-rma-thesis-coreference-with-singletons | 3d2d6c751eadd6438a80b0c24f48b2635bc6acc7 | [
"MIT"
] | null | null | null | scripts/deep-coref/unpack_corpora.py | natemalek/molen-pater-nathan-rma-thesis-coreference-with-singletons | 3d2d6c751eadd6438a80b0c24f48b2635bc6acc7 | [
"MIT"
] | null | null | null | '''
Unpack corpora stored in one *_conll file into a directory, one file for each document.
Automatically look recursively and mirror the directory structure found in input dir.
Usage:
unpack_corpora.py <inp_dir> <out_dir>
'''
from docopt import docopt
from cort.core.corpora import Corpus
from baselines import copy_... | 35.304348 | 87 | 0.666872 |
76143c6c89e389b71e1cb6464631209849d1185a | 11,308 | py | Python | lib/obsolete/spectrum_annotator - Copy.py | edeutsch/RunAssessor | 18c1e565b0a172c272290ea15c30ae1f5bf9d413 | [
"Apache-2.0"
] | null | null | null | lib/obsolete/spectrum_annotator - Copy.py | edeutsch/RunAssessor | 18c1e565b0a172c272290ea15c30ae1f5bf9d413 | [
"Apache-2.0"
] | null | null | null | lib/obsolete/spectrum_annotator - Copy.py | edeutsch/RunAssessor | 18c1e565b0a172c272290ea15c30ae1f5bf9d413 | [
"Apache-2.0"
] | 1 | 2020-05-08T15:16:04.000Z | 2020-05-08T15:16:04.000Z | #!/usr/bin/env python3
import sys
def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs)
#### Import some standard modules
import os
import argparse
import os.path
import re
import itertools
from peptidoform import Peptidoform
from mass_reference import MassReference
##################################... | 45.781377 | 160 | 0.571896 |
6a2d82098cdf11179e5ac4f82419b3a3a6d138d5 | 37,882 | py | Python | instances/passenger_demand/pas-20210421-2109-int6000000000000001e-1/99.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null | instances/passenger_demand/pas-20210421-2109-int6000000000000001e-1/99.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null | instances/passenger_demand/pas-20210421-2109-int6000000000000001e-1/99.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null |
"""
PASSENGERS
"""
numPassengers = 1400
passenger_arriving = (
(0, 4, 3, 1, 0, 0, 6, 2, 4, 0, 3, 0), # 0
(1, 3, 5, 1, 0, 0, 5, 1, 0, 1, 1, 0), # 1
(1, 3, 4, 2, 1, 0, 2, 3, 1, 2, 3, 0), # 2
(4, 8, 3, 4, 1, 0, 5, 5, 4, 5, 0, 0), # 3
(2, 3, 2, 2, 0, 0, 2, 4, 1, 0, 0, 0), # 4
(2, 3, 0, 1, 2, 0, 5, 3, 2, 2, 3,... | 113.080597 | 218 | 0.729053 |
950f7e6d980d046c6dd8fa24cf21fe0ecc49cfad | 2,169 | py | Python | tools/setup.py | psignoret/azure-cli | 1a4a043750315f9a7f2894b4287126089978b615 | [
"MIT"
] | 1 | 2020-11-29T19:26:37.000Z | 2020-11-29T19:26:37.000Z | tools/setup.py | psignoret/azure-cli | 1a4a043750315f9a7f2894b4287126089978b615 | [
"MIT"
] | 2 | 2021-01-15T09:24:07.000Z | 2021-01-15T09:30:10.000Z | tools/setup.py | psignoret/azure-cli | 1a4a043750315f9a7f2894b4287126089978b615 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 30.125 | 94 | 0.568004 |
9ebdd23056503f94ce4e383bd400bd4ca1dd0ee8 | 10,350 | py | Python | sdk/python/pulumi_azure_native/compute/v20170330/availability_set.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/compute/v20170330/availability_set.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/compute/v20170330/availability_set.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"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
from ... import _utilities, _tables
from... | 55.053191 | 2,086 | 0.69285 |
ed44a11c7b7b0489fb505c96e6854cd34b71f3df | 3,196 | py | Python | installer_quick/ui/simpleinstalldialog.py | Holt59/modorganizer-python_plugins | f3404b1c3d9b8f5a6aa2133b47f7fc0218c18dc9 | [
"MIT"
] | null | null | null | installer_quick/ui/simpleinstalldialog.py | Holt59/modorganizer-python_plugins | f3404b1c3d9b8f5a6aa2133b47f7fc0218c18dc9 | [
"MIT"
] | null | null | null | installer_quick/ui/simpleinstalldialog.py | Holt59/modorganizer-python_plugins | f3404b1c3d9b8f5a6aa2133b47f7fc0218c18dc9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'simpleinstalldialog.ui'
#
# Created by: PyQt5 UI code generator 5.14.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_SimpleInstallDialog(object):
def setupUi(self, Simple... | 47 | 122 | 0.739675 |
366569118d5a9f85213ab10c8dfbc406071b09ec | 150 | py | Python | python/tests/test_decode_morse.py | matyama/codewars | 3386dbdb1cd3fa6556356591f377a72bf4bba4e6 | [
"MIT"
] | null | null | null | python/tests/test_decode_morse.py | matyama/codewars | 3386dbdb1cd3fa6556356591f377a72bf4bba4e6 | [
"MIT"
] | null | null | null | python/tests/test_decode_morse.py | matyama/codewars | 3386dbdb1cd3fa6556356591f377a72bf4bba4e6 | [
"MIT"
] | null | null | null | from codewars.decode_morse import decodeMorse
def test_decode_morse() -> None:
assert decodeMorse('.... . -.-- .--- ..- -.. .') == 'HEY JUDE'
| 25 | 68 | 0.593333 |
f21b48ad548c30340683fc2fce8a5c8a8a044aad | 4,455 | py | Python | migration/ontology_changes/change_property_range.py | carter-e-veldhuizen/RACK | 8ae9b4ecd17d812966aed985d6bc51b1b7ca6e79 | [
"BSD-3-Clause"
] | null | null | null | migration/ontology_changes/change_property_range.py | carter-e-veldhuizen/RACK | 8ae9b4ecd17d812966aed985d6bc51b1b7ca6e79 | [
"BSD-3-Clause"
] | null | null | null | migration/ontology_changes/change_property_range.py | carter-e-veldhuizen/RACK | 8ae9b4ecd17d812966aed985d6bc51b1b7ca6e79 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Galois, Inc.
#
# All Rights Reserved
#
# This material is based upon work supported by the Defense Advanced Research
# Projects Agency (DARPA) under Contract No. FA8750-20-C-0203.
#
# Any opinions, findings and conclusions or recommendations expressed in this
# material are those of the author(s) ... | 34.534884 | 104 | 0.60853 |
70fa2cf86f7982c1308a0a496c1a987be879b19e | 1,604 | py | Python | dialogue-engine/test/programytest/extensions/survey/test_survey.py | cotobadesign/cotoba-agent-oss | 3833d56e79dcd7529c3e8b3a3a8a782d513d9b12 | [
"MIT"
] | 104 | 2020-03-30T09:40:00.000Z | 2022-03-06T22:34:25.000Z | dialogue-engine/test/programytest/extensions/survey/test_survey.py | cotobadesign/cotoba-agent-oss | 3833d56e79dcd7529c3e8b3a3a8a782d513d9b12 | [
"MIT"
] | 25 | 2020-06-12T01:36:35.000Z | 2022-02-19T07:30:44.000Z | dialogue-engine/test/programytest/extensions/survey/test_survey.py | cotobadesign/cotoba-agent-oss | 3833d56e79dcd7529c3e8b3a3a8a782d513d9b12 | [
"MIT"
] | 10 | 2020-04-02T23:43:56.000Z | 2021-05-14T13:47:01.000Z | """
Copyright (c) 2020 COTOBA DESIGN, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distri... | 43.351351 | 126 | 0.769327 |
87ded8816717b6a5b3742fd99eac7eff16649a62 | 1,649 | py | Python | bin/aaFoamYPlusAir.py | guillaume-florent/aaFoam | 8e821f13cc0a67f1ba26c3ba74db5512fb288928 | [
"MIT"
] | null | null | null | bin/aaFoamYPlusAir.py | guillaume-florent/aaFoam | 8e821f13cc0a67f1ba26c3ba74db5512fb288928 | [
"MIT"
] | null | null | null | bin/aaFoamYPlusAir.py | guillaume-florent/aaFoam | 8e821f13cc0a67f1ba26c3ba74db5512fb288928 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
r"""yPlus computations in air
example use:
aaFoamYPlusAir.py 1 1 1
"""
import sys
import logging
from argparse import ArgumentParser
from aa_foam.y_plus import y_plus_calc
logger = logging.getLogger(__name__)
if __name__ == "__main__":
logging.basicConfig(level=logging.... | 27.949153 | 99 | 0.585203 |
bd30142b582092656974eec4061de7c57c69c78f | 763 | py | Python | digsby/src/tests/testgui/testthemecombos.py | ifwe/digsby | f5fe00244744aa131e07f09348d10563f3d8fa99 | [
"Python-2.0"
] | 35 | 2015-08-15T14:32:38.000Z | 2021-12-09T16:21:26.000Z | digsby/src/tests/testgui/testthemecombos.py | niterain/digsby | 16a62c7df1018a49eaa8151c0f8b881c7e252949 | [
"Python-2.0"
] | 4 | 2015-09-12T10:42:57.000Z | 2017-02-27T04:05:51.000Z | digsby/src/tests/testgui/testthemecombos.py | niterain/digsby | 16a62c7df1018a49eaa8151c0f8b881c7e252949 | [
"Python-2.0"
] | 15 | 2015-07-10T23:58:07.000Z | 2022-01-23T22:16:33.000Z | import wx
def main():
from tests.testapp import testapp
from tests.mock.mockbuddy import MockBuddy
from path import path
a = testapp('../../..')
from gui.imwin.messagearea import MessageArea
from gui.imwin.styles import get_theme
from common.logger import history_from_files
from gui i... | 24.612903 | 81 | 0.686763 |
0ed368c9108d1819eefc5ed4421a3a4b162c9216 | 3,401 | py | Python | PoseControlDrone/Pretrained/drone_pose_contol.py | udayagopi587/ArealRobotics_AutonomousDrone | 6bc10ee167076086abb3b2eef311ae43f457f21d | [
"MIT"
] | 1 | 2022-03-12T00:47:24.000Z | 2022-03-12T00:47:24.000Z | PoseControlDrone/Pretrained/drone_pose_contol.py | udayagopi587/ArealRobotics_AutonomousDrone | 6bc10ee167076086abb3b2eef311ae43f457f21d | [
"MIT"
] | null | null | null | PoseControlDrone/Pretrained/drone_pose_contol.py | udayagopi587/ArealRobotics_AutonomousDrone | 6bc10ee167076086abb3b2eef311ae43f457f21d | [
"MIT"
] | 1 | 2022-03-14T23:42:57.000Z | 2022-03-14T23:42:57.000Z | # -*- coding: utf-8 -*-
"""
Created on Fri Mar 4 15:23:50 2022
@author: udaya
"""
import cv2
import pickle
from djitellopy import Tello
import mediapipe as mp
import numpy as np
mp_drawing = mp.solutions.drawing_utils
mp_drawing_styles = mp.solutions.drawing_styles
mp_pose = mp.solutions.pose
de... | 31.785047 | 111 | 0.642164 |
b9b0d71084431c6c0a15a8b3b6b3e59cccc5fab3 | 4,337 | py | Python | tests/test_stack.py | cu2/aldebaran | affd692bd568cdb5a3a1840c6bc02b5197da1064 | [
"MIT"
] | 4 | 2018-11-20T07:31:48.000Z | 2020-12-29T22:04:03.000Z | tests/test_stack.py | cu2/aldebaran | affd692bd568cdb5a3a1840c6bc02b5197da1064 | [
"MIT"
] | 7 | 2020-09-04T22:49:12.000Z | 2022-02-26T11:19:39.000Z | tests/test_stack.py | cu2/aldebaran | affd692bd568cdb5a3a1840c6bc02b5197da1064 | [
"MIT"
] | null | null | null | import unittest
from unittest.mock import Mock
from hardware.cpu.stack import (
Stack,
StackOverflowError, StackUnderflowError,
)
class TestStack(unittest.TestCase):
def setUp(self):
self.bottom_of_stack = 0x1234
self.stack = Stack(self.bottom_of_stack)
self.registers = Mock()
... | 32.365672 | 66 | 0.606641 |
f3357a51da3f7efdc7bd76ab68570633f6eae2c3 | 11,610 | py | Python | infrastructure-provisioning/src/ssn/scripts/configure_billing.py | roolrd/incubator-datalab | 2045207ecd1b381193f1a1ec143cc968716ad989 | [
"Apache-2.0"
] | 66 | 2020-10-03T08:36:48.000Z | 2022-03-20T23:16:20.000Z | infrastructure-provisioning/src/ssn/scripts/configure_billing.py | roolrd/incubator-datalab | 2045207ecd1b381193f1a1ec143cc968716ad989 | [
"Apache-2.0"
] | 48 | 2019-02-28T12:11:33.000Z | 2020-09-15T08:27:08.000Z | infrastructure-provisioning/src/ssn/scripts/configure_billing.py | roolrd/incubator-datalab | 2045207ecd1b381193f1a1ec143cc968716ad989 | [
"Apache-2.0"
] | 44 | 2019-01-14T10:31:55.000Z | 2020-09-22T17:53:33.000Z | #!/usr/bin/python3
# *****************************************************************************
#
# 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 A... | 57.761194 | 108 | 0.692506 |
af07922109202918e700b5fe5e6d9b96c8b8aec7 | 1,023 | py | Python | vedacore/hooks/sampler_seed.py | carpedkm/vedatad | 55f8dced57f698ee9fc0da9bcf471d171e718d0c | [
"Apache-2.0"
] | 36 | 2021-05-22T04:36:22.000Z | 2022-03-17T06:42:54.000Z | vedacore/hooks/sampler_seed.py | carpedkm/vedatad | 55f8dced57f698ee9fc0da9bcf471d171e718d0c | [
"Apache-2.0"
] | 16 | 2021-07-26T07:43:53.000Z | 2022-03-30T08:48:58.000Z | vedacore/hooks/sampler_seed.py | carpedkm/vedatad | 55f8dced57f698ee9fc0da9bcf471d171e718d0c | [
"Apache-2.0"
] | 15 | 2021-07-06T12:51:53.000Z | 2022-03-09T14:11:19.000Z | # Copyright (c) Open-MMLab. All rights reserved.
from vedacore.misc import registry
from .base_hook import BaseHook
@registry.register_module('hook')
class DistSamplerSeedHook(BaseHook):
"""Data-loading sampler for distributed training.
When distributed training, it is only useful in conjunction with
:ob... | 36.535714 | 75 | 0.69306 |
c7fab97f063cf5db5c4282af236369edbf5ea805 | 257 | py | Python | transmute_core/function/__init__.py | yunstanford/transmute-core | a8e5dd055f0f3d39327d71dd61bf0ee147f59ebe | [
"MIT"
] | 42 | 2016-06-04T00:16:16.000Z | 2021-06-11T02:09:31.000Z | transmute_core/function/__init__.py | yunstanford/transmute-core | a8e5dd055f0f3d39327d71dd61bf0ee147f59ebe | [
"MIT"
] | 55 | 2016-06-11T13:58:46.000Z | 2021-12-21T06:29:20.000Z | transmute_core/function/__init__.py | yunstanford/transmute-core | a8e5dd055f0f3d39327d71dd61bf0ee147f59ebe | [
"MIT"
] | 18 | 2016-05-18T20:50:53.000Z | 2021-11-18T09:09:59.000Z | from ..attributes import TransmuteAttributes
from .signature import FunctionSignature
from .response import Response
from .transmute_function import TransmuteFunction
__all__ = ["FunctionSignature", "Response", "TransmuteAttributes", "TransmuteFunction"]
| 32.125 | 87 | 0.832685 |
423c521eed8d6977cf2ecc779c42b34395678f04 | 3,683 | py | Python | CS_4085 Python/AnimalSubclass/animalGenerator.py | hickmanjv/hickmanjv | 390e22317b9ace552855897af19963ffb416b1b7 | [
"MIT"
] | null | null | null | CS_4085 Python/AnimalSubclass/animalGenerator.py | hickmanjv/hickmanjv | 390e22317b9ace552855897af19963ffb416b1b7 | [
"MIT"
] | null | null | null | CS_4085 Python/AnimalSubclass/animalGenerator.py | hickmanjv/hickmanjv | 390e22317b9ace552855897af19963ffb416b1b7 | [
"MIT"
] | null | null | null | """
Name: Josh Hickman
Pawprint: hickmanjv
Assignment: Challenge: Animal Subclass
Date: 04/03/20
"""
import Animal as an
def main():
""" Function that will prompt the user to create animal objects
until the user decides to stop. There are 2 types of Animal
subclasses, Mammals and Birds. Once the loop is t... | 36.83 | 88 | 0.604127 |
314f04abdef439ea397a8cbaa493d3bbf32abb79 | 1,379 | py | Python | experiments/Genetics/run_NPL_genetics.py | edfong/npl | 9e94287a7c253a33addcafb431c384be8a7dd8df | [
"BSD-3-Clause"
] | 6 | 2019-05-05T15:59:07.000Z | 2021-05-19T16:36:53.000Z | experiments/Genetics/run_NPL_genetics.py | edfong/npl | 9e94287a7c253a33addcafb431c384be8a7dd8df | [
"BSD-3-Clause"
] | null | null | null | experiments/Genetics/run_NPL_genetics.py | edfong/npl | 9e94287a7c253a33addcafb431c384be8a7dd8df | [
"BSD-3-Clause"
] | 2 | 2019-05-05T15:59:09.000Z | 2019-08-11T23:20:27.000Z | """
main script for running NPL
"""
import numpy as np
import scipy as sp
import pandas as pd
import copy
import time
from npl import bootstrap_logreg as bbl
import pickle
from tqdm import tqdm
np.random.seed(25)
#load genetics dataset
with open('./data/gen_data', 'rb') as handle:
gen_train = pickle.load(handl... | 22.606557 | 113 | 0.715011 |
f0d617eefb09d76a9e54e83e47fe0b6b5c937deb | 2,742 | py | Python | cloud_enforcer/cli.py | dimitry-dukhovny/cloud_enforcer | e9672c57723ac676671232f7f9cae50facc4db34 | [
"MIT"
] | null | null | null | cloud_enforcer/cli.py | dimitry-dukhovny/cloud_enforcer | e9672c57723ac676671232f7f9cae50facc4db34 | [
"MIT"
] | null | null | null | cloud_enforcer/cli.py | dimitry-dukhovny/cloud_enforcer | e9672c57723ac676671232f7f9cae50facc4db34 | [
"MIT"
] | null | null | null | """Console script for cloud_enforcer."""
import sys
import os
import click
try:
import cloud_enforcer.cloud_enforcer as ce
except:
import cloud_enforcer as ce
import colorama
def OUT(outstring=''):
'''
Simple output printer.
Will halt the program if it fails to write to stdout.
Args:
... | 29.804348 | 98 | 0.65062 |
758d20de15119fae5c0d620a1dcfd1782e0da240 | 13,381 | py | Python | covid/rpc/rpc_server.py | pinksheetscrypto/covid-blockchain | 6360f93be99129898d349a3ad8414069c567988c | [
"Apache-2.0"
] | 14 | 2021-07-28T09:56:07.000Z | 2022-02-09T04:28:14.000Z | covid/rpc/rpc_server.py | pinksheetscrypto/covid-blockchain | 6360f93be99129898d349a3ad8414069c567988c | [
"Apache-2.0"
] | 23 | 2021-07-28T10:16:56.000Z | 2022-03-26T10:43:53.000Z | covid/rpc/rpc_server.py | pinksheetscrypto/covid-blockchain | 6360f93be99129898d349a3ad8414069c567988c | [
"Apache-2.0"
] | 9 | 2021-07-28T02:41:24.000Z | 2022-03-15T08:32:49.000Z | import asyncio
import json
import logging
import traceback
from pathlib import Path
from typing import Any, Callable, Dict, List, Optional
import aiohttp
from covid.server.outbound_message import NodeType
from covid.server.server import ssl_context_for_server
from covid.types.peer_info import PeerInfo
from covid.util... | 39.125731 | 118 | 0.578656 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.