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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e8d67cf3fce33bd49eff17c42e4968cc24888b10 | 680 | py | Python | 108-convert-sorted-array-to-binary-search-tree/108-convert-sorted-array-to-binary-search-tree.py | MayaScarlet/leetcode-python | 8ef0c5cadf2e975957085c0ef84a8c3d90a64b6a | [
"MIT"
] | null | null | null | 108-convert-sorted-array-to-binary-search-tree/108-convert-sorted-array-to-binary-search-tree.py | MayaScarlet/leetcode-python | 8ef0c5cadf2e975957085c0ef84a8c3d90a64b6a | [
"MIT"
] | null | null | null | 108-convert-sorted-array-to-binary-search-tree/108-convert-sorted-array-to-binary-search-tree.py | MayaScarlet/leetcode-python | 8ef0c5cadf2e975957085c0ef84a8c3d90a64b6a | [
"MIT"
] | null | null | null | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def sortedArrayToBST(self, nums: List[int]) -> Optional[TreeNode]:
def helper(left, right):... | 29.565217 | 70 | 0.482353 |
37c3fa5c48369ec4b1c0aa5ebe2f13f0e625121c | 2,979 | py | Python | AuE893_spring20_Shubham_Horane/src/assignment5_trackingandfollowing/nodes/Part_1a_follow_line_step_hsv.py | shorane/ROS_Autonomous_TurtleBot | 0da048aa5f8e03f2d5c1c9d686586b59ed7dfec5 | [
"MIT"
] | null | null | null | AuE893_spring20_Shubham_Horane/src/assignment5_trackingandfollowing/nodes/Part_1a_follow_line_step_hsv.py | shorane/ROS_Autonomous_TurtleBot | 0da048aa5f8e03f2d5c1c9d686586b59ed7dfec5 | [
"MIT"
] | null | null | null | AuE893_spring20_Shubham_Horane/src/assignment5_trackingandfollowing/nodes/Part_1a_follow_line_step_hsv.py | shorane/ROS_Autonomous_TurtleBot | 0da048aa5f8e03f2d5c1c9d686586b59ed7dfec5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy
import cv2
import numpy as np
from cv_bridge import CvBridge, CvBridgeError
from geometry_msgs.msg import Twist
from sensor_msgs.msg import Image
from move_robot import MoveTurtlebot3
from decimal import *
class LineFollower(object):
def __init__(self):
self.bridge_... | 28.92233 | 128 | 0.618328 |
a28aba08cf767eb65724ace4bfd0e38b6e75589a | 649 | bzl | Python | source/bazel/deps/pegtl/get.bzl | luxe/CodeLang-compiler | 78837d90bdd09c4b5aabbf0586a5d8f8f0c1e76a | [
"MIT"
] | 1 | 2019-01-06T08:45:46.000Z | 2019-01-06T08:45:46.000Z | source/bazel/deps/pegtl/get.bzl | luxe/CodeLang-compiler | 78837d90bdd09c4b5aabbf0586a5d8f8f0c1e76a | [
"MIT"
] | 264 | 2015-11-30T08:34:00.000Z | 2018-06-26T02:28:41.000Z | source/bazel/deps/pegtl/get.bzl | UniLang/compiler | c338ee92994600af801033a37dfb2f1a0c9ca897 | [
"MIT"
] | null | null | null | # Do not edit this file directly.
# It was auto-generated by: code/programs/reflexivity/reflexive_refresh
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
def pegtl():
http_archive(
name = "pegtl",
build_file = "... | 38.176471 | 103 | 0.708783 |
9ab2f199b941a93004ff3ce28b98d28787cda918 | 238 | py | Python | request.py | ashok-kumar-s-01/diabetes-prediction | f3c1638b0c53698421081daabd2242f30aae1491 | [
"MIT"
] | null | null | null | request.py | ashok-kumar-s-01/diabetes-prediction | f3c1638b0c53698421081daabd2242f30aae1491 | [
"MIT"
] | null | null | null | request.py | ashok-kumar-s-01/diabetes-prediction | f3c1638b0c53698421081daabd2242f30aae1491 | [
"MIT"
] | null | null | null | import requests
url = 'http://localhost:5000/predict_api'
r = requests.post(url,json={'Pregnancies':6,'Glucose':148,'BloodPressure':72,'SkinThickness':35,'Insulin':0,'BMI':33.6,'DiabetesPedigreeFunction':0.627,'Age':50})
print(r.json()) | 39.666667 | 162 | 0.731092 |
29a1e467f9b32a9184bc567563bbbbf1c44655b9 | 1,615 | py | Python | tardsquad_discord_bot/__main__.py | Tardsquad/tardsquad-discord-bot | 851eed29e4f3c2fcffc151ab5b5fb0758b9c02d8 | [
"MIT"
] | 3 | 2021-12-18T00:35:47.000Z | 2021-12-19T01:19:04.000Z | tardsquad_discord_bot/__main__.py | erikw/tardsquad-discord-bot | 295ca24729fb5849d12623e6fd76047c3b564c58 | [
"MIT"
] | 3 | 2022-02-01T08:07:23.000Z | 2022-02-01T08:07:23.000Z | tardsquad_discord_bot/__main__.py | erikw/tardsquad-discord-bot | 295ca24729fb5849d12623e6fd76047c3b564c58 | [
"MIT"
] | 1 | 2021-12-17T20:10:02.000Z | 2021-12-17T20:10:02.000Z | # Entry point when called as a module
# $ python -m tardsquad_discord_bot
import logging
import os
import sys
from dotenv import load_dotenv
# from tardsquad_discord_bot.gcp_port import start_gcp_port
from tardsquad_discord_bot.client import TardsquadClient
from tardsquad_discord_bot.commands_general import TardBotG... | 28.333333 | 73 | 0.762229 |
356916d4b5e5ae6fa7701115045180a2b7024a94 | 3,756 | py | Python | neutron_plugin/subnet.py | conkiztador/cloudify-openstack-plugin | 073922b8419a1f37aad67aee0cd89e7019b0b4f6 | [
"Apache-2.0"
] | null | null | null | neutron_plugin/subnet.py | conkiztador/cloudify-openstack-plugin | 073922b8419a1f37aad67aee0cd89e7019b0b4f6 | [
"Apache-2.0"
] | null | null | null | neutron_plugin/subnet.py | conkiztador/cloudify-openstack-plugin | 073922b8419a1f37aad67aee0cd89e7019b0b4f6 | [
"Apache-2.0"
] | null | null | null | #########
# Copyright (c) 2014 GigaSpaces Technologies Ltd. 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... | 35.102804 | 79 | 0.686635 |
a21a41701f106bb16171c7a5616ba38707f7913b | 607 | py | Python | website/models.py | ghantoos/doonia.org | 24169a038bd587dbcba3ea6b8dd77571d551ed69 | [
"WTFPL"
] | null | null | null | website/models.py | ghantoos/doonia.org | 24169a038bd587dbcba3ea6b8dd77571d551ed69 | [
"WTFPL"
] | null | null | null | website/models.py | ghantoos/doonia.org | 24169a038bd587dbcba3ea6b8dd77571d551ed69 | [
"WTFPL"
] | null | null | null | from flask.ext.mongoengine import Document
from mongoengine import StringField, URLField, ObjectIdField, DateTimeField
class Khabar(Document):
_id = ObjectIdField()
title = StringField()
link = URLField()
description = StringField()
img = URLField()
date = DateTimeField(... | 30.35 | 75 | 0.596376 |
52b32fcdada81252c68b89b129b5fc45f1fd5f65 | 11,152 | py | Python | main.py | BryanPlummer/two_branch_networks | b7126d3f92c58231549d05ac81499ab45d8a52e1 | [
"MIT"
] | 36 | 2018-11-01T01:45:14.000Z | 2022-02-05T13:13:52.000Z | main.py | BryanPlummer/two_branch_networks | b7126d3f92c58231549d05ac81499ab45d8a52e1 | [
"MIT"
] | 2 | 2021-05-31T13:08:57.000Z | 2021-11-25T05:54:56.000Z | main.py | BryanPlummer/two_branch_networks | b7126d3f92c58231549d05ac81499ab45d8a52e1 | [
"MIT"
] | 9 | 2019-03-26T09:27:47.000Z | 2022-03-02T07:25:54.000Z | from __future__ import division
from __future__ import print_function
import argparse
import sys
import os
import numpy as np
import shutil
import torch
import torch.optim as optim
import torch.utils.data
from torch.autograd import Variable
import torch.backends.cudnn as cudnn
from dataset_utils import DatasetLoader... | 44.608 | 153 | 0.674229 |
c33e0c0007604305a9dd909adedbf9507dee7747 | 1,294 | py | Python | test/test_reproducibility.py | orionw/configtune | c2afd0cacf0c1e14e04a981592d5045593b5c2f5 | [
"MIT"
] | 1 | 2019-08-09T23:35:46.000Z | 2019-08-09T23:35:46.000Z | test/test_reproducibility.py | orionw/tuningDEAP | c2afd0cacf0c1e14e04a981592d5045593b5c2f5 | [
"MIT"
] | 20 | 2019-08-14T21:52:55.000Z | 2019-08-29T20:57:18.000Z | test/test_reproducibility.py | orionw/tuningDEAP | c2afd0cacf0c1e14e04a981592d5045593b5c2f5 | [
"MIT"
] | null | null | null | import unittest
from test.dummy_model import DummyModel
from configtune import TuningDeap
import json
import os
import logging
logging.basicConfig(level=logging.INFO)
class TestRepoducibility(unittest.TestCase):
def setUp(self):
cwd = os.getcwd()
with open(os.path.join(cwd, "test", "tuning_config_... | 43.133333 | 132 | 0.693199 |
e145eef50af346f2a0a35c569ba0c79136b0eb42 | 1,212 | py | Python | src/main/resources/cloudfoundry/rename-application.py | xebialabs-community/xld-cloud-foundry-plugin | ab1b5a9d6c5cbce607011afbc5d64beacc5b0405 | [
"MIT"
] | 1 | 2015-01-05T14:31:52.000Z | 2015-01-05T14:31:52.000Z | src/main/resources/cloudfoundry/rename-application.py | xebialabs-community/xld-cloud-foundry-plugin | ab1b5a9d6c5cbce607011afbc5d64beacc5b0405 | [
"MIT"
] | 2 | 2017-06-01T16:02:08.000Z | 2017-12-12T22:35:33.000Z | src/main/resources/cloudfoundry/rename-application.py | xebialabs-community/xld-cloud-foundry-plugin | ab1b5a9d6c5cbce607011afbc5d64beacc5b0405 | [
"MIT"
] | 3 | 2015-01-19T10:25:33.000Z | 2016-12-08T17:09:15.000Z | #
# Copyright 2019 XEBIALABS
#
# 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, distribute, subli... | 80.8 | 462 | 0.806106 |
ab030d05b00267c1721dc28e5546a21ca1a13b2b | 3,648 | py | Python | scripts/concoct/extract_16S_fasta.py | EnvGen/toolbox | a644560d989316fffd72c696e60c95ed713f6236 | [
"MIT"
] | 5 | 2018-07-02T06:34:09.000Z | 2021-06-09T00:32:45.000Z | scripts/concoct/extract_16S_fasta.py | EnvGen/toolbox | a644560d989316fffd72c696e60c95ed713f6236 | [
"MIT"
] | 5 | 2016-09-23T08:52:53.000Z | 2019-12-19T08:49:11.000Z | scripts/concoct/extract_16S_fasta.py | EnvGen/toolbox | a644560d989316fffd72c696e60c95ed713f6236 | [
"MIT"
] | 1 | 2020-04-28T18:45:56.000Z | 2020-04-28T18:45:56.000Z | import pandas as pd
import argparse
from collections import defaultdict
import os
import math
from Bio import SeqIO
"""A script to extract rrna sequences for approved MAGs given the metaxa results.
"""
def main(args):
clustering = pd.read_table(args.clustering_file, sep=',', names=['contig_id', 'cluster_id'], in... | 42.418605 | 157 | 0.690241 |
5e69cd1a447a15071e98bd2d8abd9bae40ec7572 | 22,971 | py | Python | pyseer/__main__.py | johnlees/pyseer | acfdfaa088d57b6f4cba730553f6c8c6a8c9ff3b | [
"Apache-2.0"
] | 1 | 2018-01-04T17:10:52.000Z | 2018-01-04T17:10:52.000Z | pyseer/__main__.py | johnlees/pyseer | acfdfaa088d57b6f4cba730553f6c8c6a8c9ff3b | [
"Apache-2.0"
] | null | null | null | pyseer/__main__.py | johnlees/pyseer | acfdfaa088d57b6f4cba730553f6c8c6a8c9ff3b | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Marco Galardini and John Lees
'''Python reimplementation of SEER for bacterial GWAS'''
import os
import sys
import gzip
import warnings
import itertools
import operator
import re
from collections import deque
from .utils import set_env
# avoid numpy taking up more than one thread
with set_env(MKL_NUM... | 41.84153 | 157 | 0.512864 |
74c54c0789e057090aba95dc8a41b554e5b48e2b | 1,735 | py | Python | Stack/infix_postfix.py | lakshyarawal/pythonPractice | 4b400342198a8270c5ac0c6306afb555f927c6c1 | [
"MIT"
] | null | null | null | Stack/infix_postfix.py | lakshyarawal/pythonPractice | 4b400342198a8270c5ac0c6306afb555f927c6c1 | [
"MIT"
] | null | null | null | Stack/infix_postfix.py | lakshyarawal/pythonPractice | 4b400342198a8270c5ac0c6306afb555f927c6c1 | [
"MIT"
] | null | null | null | """ Converting an infix expression into Postfix expression"""
def check_precedence(op):
operators = ['(', ')', '^', '*', '/', '+', '-']
has_op = {'(': 0, ')': 0, '^': 3, '*': 2, '/': 2, '+': 1, '-': 1}
for i in range(len(operators)):
if op == operators[i]:
return has_op[operators[i]]
... | 29.40678 | 69 | 0.41902 |
fae64cb558fa611f8ea7ee78634f0df46857370d | 402 | py | Python | apps/user/migrations/0008_run_sql_for_full_index.py | sparcs-kaist/new-ara-api | 63998da575cb148347708199fe1345c4e7ee3e1b | [
"MIT"
] | 19 | 2017-09-13T07:51:58.000Z | 2022-03-28T11:04:03.000Z | apps/user/migrations/0008_run_sql_for_full_index.py | sparcs-kaist/new-ara-api | 63998da575cb148347708199fe1345c4e7ee3e1b | [
"MIT"
] | 147 | 2017-09-14T13:45:30.000Z | 2022-03-14T15:54:09.000Z | apps/user/migrations/0008_run_sql_for_full_index.py | sparcs-kaist/new-ara-api | 63998da575cb148347708199fe1345c4e7ee3e1b | [
"MIT"
] | 5 | 2019-08-31T13:13:30.000Z | 2021-03-26T15:46:38.000Z | # Generated by Jooyon
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('user', '0007_userprofile_group'),
]
operations = [
migrations.RunSQL(
sql='CREATE FULLTEXT INDEX `idx_nickname` on user_userprofile(`nickname`);',
rev... | 22.333333 | 88 | 0.646766 |
cbdfcdecb62b43e7650a95697e152bd005b1dd2b | 48,296 | py | Python | LuaKitProject/src/Projects/base/android/jni_generator/jni_generator.py | andrewvmail/luakit | edbadd7824bd17b6a430d8323f255d404498c27a | [
"MIT"
] | 321 | 2018-06-17T03:52:46.000Z | 2022-03-18T02:34:52.000Z | LuaKitProject/src/Projects/base/android/jni_generator/jni_generator.py | andrewvmail/luakit | edbadd7824bd17b6a430d8323f255d404498c27a | [
"MIT"
] | 19 | 2018-06-26T10:37:45.000Z | 2020-12-09T03:16:45.000Z | LuaKitProject/src/Projects/base/android/jni_generator/jni_generator.py | andrewvmail/luakit | edbadd7824bd17b6a430d8323f255d404498c27a | [
"MIT"
] | 58 | 2018-06-21T10:43:03.000Z | 2022-03-29T12:42:11.000Z | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Extracts native methods from a Java file and generates the JNI bindings.
If you change this, please run and update the tests."""... | 37.093702 | 80 | 0.641026 |
85bfaffa68f188b0e564287b5655c4b6e08cc3fc | 11,068 | py | Python | sdk/python/pulumi_oci/apigateway/get_gateway.py | EladGabay/pulumi-oci | 6841e27d4a1a7e15c672306b769912efbfd3ba99 | [
"ECL-2.0",
"Apache-2.0"
] | 5 | 2021-08-17T11:14:46.000Z | 2021-12-31T02:07:03.000Z | sdk/python/pulumi_oci/apigateway/get_gateway.py | pulumi-oci/pulumi-oci | 6841e27d4a1a7e15c672306b769912efbfd3ba99 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-09-06T11:21:29.000Z | 2021-09-06T11:21:29.000Z | sdk/python/pulumi_oci/apigateway/get_gateway.py | pulumi-oci/pulumi-oci | 6841e27d4a1a7e15c672306b769912efbfd3ba99 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2021-08-24T23:31:30.000Z | 2022-01-02T19:26:54.000Z | # 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 warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... | 41.453184 | 326 | 0.671124 |
95e55b451c65f294d4f65608c4710af7ef81e2a6 | 3,590 | py | Python | google/cloud/texttospeech/v1beta1/texttospeech-v1beta1-py/noxfile.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/cloud/texttospeech/v1beta1/texttospeech-v1beta1-py/noxfile.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/cloud/texttospeech/v1beta1/texttospeech-v1beta1-py/noxfile.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 26.992481 | 96 | 0.627855 |
0dddaccd5583665cf7ce3b5c2200e84edbc8d134 | 2,255 | py | Python | gaphor/UML/classes/enumerationpropertypages.py | vanillajonathan/gaphor | d39f436aea7d667c194dd62c6ae79411c23a3b26 | [
"Apache-2.0"
] | 867 | 2018-01-09T00:19:09.000Z | 2022-03-31T02:49:23.000Z | gaphor/UML/classes/enumerationpropertypages.py | vanillajonathan/gaphor | d39f436aea7d667c194dd62c6ae79411c23a3b26 | [
"Apache-2.0"
] | 790 | 2018-01-13T23:47:07.000Z | 2022-03-31T16:04:27.000Z | gaphor/UML/classes/enumerationpropertypages.py | vanillajonathan/gaphor | d39f436aea7d667c194dd62c6ae79411c23a3b26 | [
"Apache-2.0"
] | 117 | 2018-01-09T02:24:49.000Z | 2022-03-23T08:07:42.000Z | from gi.repository import Gtk
from gaphor import UML
from gaphor.core.format import format
from gaphor.diagram.propertypages import (
PropertyPageBase,
PropertyPages,
on_text_cell_edited,
)
from gaphor.transaction import transactional
from gaphor.UML.classes.classespropertypages import (
AttributesPage... | 30.890411 | 82 | 0.68071 |
ddcf1d5faf26ca59b2cd56c9093f528474999024 | 26,920 | py | Python | tensorflow/python/compiler/tensorrt/test/tf_trt_integration_test_base.py | zyeric/tensorflow | 446123397ef3dae2b4cbcc7362731b15388c24a7 | [
"Apache-2.0"
] | 4 | 2021-02-01T01:01:11.000Z | 2021-07-21T15:22:20.000Z | tensorflow/python/compiler/tensorrt/test/tf_trt_integration_test_base.py | zyeric/tensorflow | 446123397ef3dae2b4cbcc7362731b15388c24a7 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/compiler/tensorrt/test/tf_trt_integration_test_base.py | zyeric/tensorflow | 446123397ef3dae2b4cbcc7362731b15388c24a7 | [
"Apache-2.0"
] | 1 | 2021-02-01T01:02:23.000Z | 2021-02-01T01:02:23.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 39.356725 | 80 | 0.700743 |
da783e1009b5938952e15b2d73193b637c37c44f | 10,496 | py | Python | country_tag.py | Jaykingamez/Imperator-Modding-Scripts | ec455993ec27dcd81f9836a2b154bc333d161e28 | [
"MIT"
] | null | null | null | country_tag.py | Jaykingamez/Imperator-Modding-Scripts | ec455993ec27dcd81f9836a2b154bc333d161e28 | [
"MIT"
] | null | null | null | country_tag.py | Jaykingamez/Imperator-Modding-Scripts | ec455993ec27dcd81f9836a2b154bc333d161e28 | [
"MIT"
] | null | null | null | tag_dictionary = {'REB': 'rebels', 'PIR': 'pirates', 'BAR': 'barbarians', 'MER': 'mercenaries', 'CHN': 'channel_islands', 'FRA': 'france', 'GBR': 'great_britain', 'GIB': 'gibraltar', 'IOM': 'isle_of_man', 'LUX': 'luxemburg', 'NED': 'netherlands', 'POR': 'portugal', 'SPA': 'spain', 'ANH': 'anhalt', 'AUS': 'austria', 'BA... | 10,496 | 10,496 | 0.569264 |
9ba88afe952e5efc85216630320afef198550b9c | 555 | py | Python | Code/utils/get_mel_frequency_bands.py | eceboran/AudioMalfunctionDetection | d0321f5cae84788c848c08874fd53aa04e0c1411 | [
"MIT"
] | null | null | null | Code/utils/get_mel_frequency_bands.py | eceboran/AudioMalfunctionDetection | d0321f5cae84788c848c08874fd53aa04e0c1411 | [
"MIT"
] | null | null | null | Code/utils/get_mel_frequency_bands.py | eceboran/AudioMalfunctionDetection | d0321f5cae84788c848c08874fd53aa04e0c1411 | [
"MIT"
] | null | null | null | import numpy as np
import librosa
def get_mel_frequency_bands(fs, n_mels, n_fft=1000, fmin=0, fmax=None):
# Default min frequency is zero
# Default max frequency is half of the sampling frequency
if fmax == None:
fmax = fs / 2
# Default n_fft is 1000
# Centers of mel filter bands
fil... | 29.210526 | 73 | 0.688288 |
65601634b0a6c47e5ca817f5566885eba456c0e0 | 148 | py | Python | exe2.py | adriano-pacheco/atividades-mentorama | 45d3d8b65994eb12aaaa025426e3a230693e25f4 | [
"MIT"
] | null | null | null | exe2.py | adriano-pacheco/atividades-mentorama | 45d3d8b65994eb12aaaa025426e3a230693e25f4 | [
"MIT"
] | null | null | null | exe2.py | adriano-pacheco/atividades-mentorama | 45d3d8b65994eb12aaaa025426e3a230693e25f4 | [
"MIT"
] | null | null | null | #Escreva um programa para criar uma tupla com numeros de 1 a 4 e imprima um item.
tuplaNumeros = ()
quantidade = 0
while quantidade < 4:
| 18.5 | 81 | 0.689189 |
badd79dde58fb12f372ad45227252f370c862c23 | 347 | py | Python | app/demo_app.py | sababa11/elb_exercise | ccd642f8ab5ad87ec29dabfa1e25e07341cb473b | [
"Apache-2.0"
] | null | null | null | app/demo_app.py | sababa11/elb_exercise | ccd642f8ab5ad87ec29dabfa1e25e07341cb473b | [
"Apache-2.0"
] | null | null | null | app/demo_app.py | sababa11/elb_exercise | ccd642f8ab5ad87ec29dabfa1e25e07341cb473b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python2.7
from flask import Flask
import platform
import sys
sys.path.insert(0, '/var/www/demo-app/app')
app = Flask(__name__)
app.config.from_object(__name__)
print "configuration finished"
@app.route('/')
def hello_world():
return platform.node()
if __name__ == '__main__':
app.run(host='0.0.0.... | 18.263158 | 50 | 0.708934 |
3a7dcfc760ecb89576279bedfbb7628457b1a0d1 | 214 | py | Python | gipc/__init__.py | TylerWilley/gipc | 16096200a6de65c3d0081bfdfee758c4b836dcd9 | [
"MIT"
] | null | null | null | gipc/__init__.py | TylerWilley/gipc | 16096200a6de65c3d0081bfdfee758c4b836dcd9 | [
"MIT"
] | null | null | null | gipc/__init__.py | TylerWilley/gipc | 16096200a6de65c3d0081bfdfee758c4b836dcd9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# flake8: noqa
# Copyright 2012-2020 Dr. Jan-Philip Gehrcke. See LICENSE file for details.
__version__ = '1.1.1'
from .gipc import pipe, start_process, GIPCError, GIPCClosed, GIPCLocked
| 21.4 | 75 | 0.714953 |
ca981be5662fc40155a559bf91fa032ff8c61022 | 1,192 | py | Python | grr/server/grr_response_server/databases/mysql_stats.py | 4ndygu/grr | cfc725b5ee3a2626ac4cdae7fb14471612da4522 | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/databases/mysql_stats.py | 4ndygu/grr | cfc725b5ee3a2626ac4cdae7fb14471612da4522 | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/databases/mysql_stats.py | 4ndygu/grr | cfc725b5ee3a2626ac4cdae7fb14471612da4522 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""MySQL implementation of DB methods for handling server metrics."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from future.builtins import int
from typing import Iterable, Optional, Text, Sequence, Tuple
from grr_response_co... | 27.72093 | 71 | 0.724832 |
b78dcdfdd42c9fb3750945802c1a77742ccc947b | 3,803 | py | Python | pcapkit/protocols/application/ftp.py | JarryShaw/jspcap | 9d4c980598e3c5e0af864044976f91b9b96e2e3e | [
"BSD-3-Clause"
] | 3 | 2018-01-21T15:22:21.000Z | 2018-06-22T01:27:59.000Z | pcapkit/protocols/application/ftp.py | JarryShaw/jspcap | 9d4c980598e3c5e0af864044976f91b9b96e2e3e | [
"BSD-3-Clause"
] | null | null | null | pcapkit/protocols/application/ftp.py | JarryShaw/jspcap | 9d4c980598e3c5e0af864044976f91b9b96e2e3e | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""file transfer protocol
:mod:`pcapkit.protocols.application.ftp` contains
:class:`~pcapkit.protocols.application.ftp.FTP` only,
which implements extractor for File Transfer Protocol
(FTP) [*]_.
.. [*] https://en.wikipedia.org/wiki/File_Transfer_Protocol
"""
import re
from typing import TYPE... | 28.810606 | 121 | 0.536419 |
fb62d17761472edd0cfe408826c24c84d18d5c8a | 2,734 | py | Python | sphinx/events.py | zhsj/sphinx | 169297d0b76bf0b503033dadeb14f9a2b735e422 | [
"BSD-2-Clause"
] | 69 | 2019-02-18T12:07:35.000Z | 2022-03-12T10:38:32.000Z | sphinx/events.py | zhsj/sphinx | 169297d0b76bf0b503033dadeb14f9a2b735e422 | [
"BSD-2-Clause"
] | 12 | 2018-12-06T22:06:49.000Z | 2022-02-25T17:40:44.000Z | sphinx/events.py | zhsj/sphinx | 169297d0b76bf0b503033dadeb14f9a2b735e422 | [
"BSD-2-Clause"
] | 28 | 2019-03-22T01:07:13.000Z | 2022-02-21T16:38:27.000Z | # -*- coding: utf-8 -*-
"""
sphinx.events
~~~~~~~~~~~~~
Sphinx core events.
Gracefully adapted from the TextPress system by Armin.
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from __future__ import print_function
from collectio... | 30.719101 | 93 | 0.625091 |
ba14887d850c97fde2f5bdce288c930c28eeadab | 1,943 | py | Python | mermaid/image_manipulations.py | HastingsGreer/mermaid | bd13c5fc427eb8cd9054973a8eaaeb302078182d | [
"Apache-2.0"
] | 120 | 2019-10-29T23:53:02.000Z | 2022-03-30T02:59:58.000Z | mermaid/image_manipulations.py | AlexanderChristgau/mermaid | ba07883cc3cb5982e4655048a434b4495cb49c6d | [
"Apache-2.0"
] | 10 | 2019-11-05T09:28:35.000Z | 2022-01-09T19:12:51.000Z | mermaid/image_manipulations.py | AlexanderChristgau/mermaid | ba07883cc3cb5982e4655048a434b4495cb49c6d | [
"Apache-2.0"
] | 19 | 2019-11-10T13:34:39.000Z | 2022-03-13T20:30:10.000Z | """
Various methods to manipulate images
"""
from __future__ import print_function
from builtins import object
import numpy as np
class IntensityNormalizeImage(object):
def __init__(self):
"""
Constructor
"""
self.default_normalization_mode = 'percentile_normalization'
"""D... | 33.5 | 107 | 0.61966 |
8b75b20739b80a785e597898aba610b91bfd0024 | 925 | py | Python | codegen/python/fixtures/method/catch_all_recursive_url/client/aiohttp/tree_service.py | mrpotes/go-raml | f151e1e143c47282b294fe70c5e56f113988ed10 | [
"BSD-2-Clause"
] | 142 | 2016-02-11T06:23:34.000Z | 2022-03-24T06:05:22.000Z | codegen/python/fixtures/method/catch_all_recursive_url/client/aiohttp/tree_service.py | mrpotes/go-raml | f151e1e143c47282b294fe70c5e56f113988ed10 | [
"BSD-2-Clause"
] | 297 | 2016-02-04T06:23:13.000Z | 2020-08-20T13:23:22.000Z | codegen/python/fixtures/method/catch_all_recursive_url/client/aiohttp/tree_service.py | mrpotes/go-raml | f151e1e143c47282b294fe70c5e56f113988ed10 | [
"BSD-2-Clause"
] | 49 | 2016-02-01T10:59:50.000Z | 2021-05-20T15:04:01.000Z | # DO NOT EDIT THIS FILE. This file will be overwritten when re-running go-raml.
from .File import File
from .unhandled_api_error import UnhandledAPIError
from .unmarshall_error import UnmarshallError
class TreeService:
def __init__(self, client):
self.client = client
async def get(self, path, headers... | 34.259259 | 96 | 0.637838 |
f4b96c8f1ca49cf45b6f1487c5aa5cca50c26dd3 | 14,894 | py | Python | pandas/core/reshape/melt.py | henriqueribeiro/pandas | 996f361f8e6986ea1c65ccb164a4c585e1f4a027 | [
"BSD-3-Clause"
] | 2 | 2019-01-09T07:43:12.000Z | 2020-05-30T05:49:11.000Z | pandas/core/reshape/melt.py | henriqueribeiro/pandas | 996f361f8e6986ea1c65ccb164a4c585e1f4a027 | [
"BSD-3-Clause"
] | null | null | null | pandas/core/reshape/melt.py | henriqueribeiro/pandas | 996f361f8e6986ea1c65ccb164a4c585e1f4a027 | [
"BSD-3-Clause"
] | 1 | 2020-02-08T10:16:39.000Z | 2020-02-08T10:16:39.000Z | # pylint: disable=E1101,E1103
# pylint: disable=W0703,W0622,W0613,W0201
import numpy as np
from pandas.core.dtypes.common import is_list_like
from pandas import compat
from pandas.core.arrays import Categorical
from pandas.core.dtypes.generic import ABCMultiIndex
from pandas.core.frame import _shared_docs
from panda... | 33.469663 | 79 | 0.51692 |
2724beb99648d8f1464bca846d64c2c50da47b21 | 14,330 | py | Python | chemfp/futures/process.py | flc/chem-fingerprints | 8c1b27374355f08105c5332db376b3428b6e30b2 | [
"MIT"
] | 3 | 2017-02-07T20:13:45.000Z | 2022-01-02T13:21:01.000Z | chemfp/futures/process.py | wangz10/chem-fingerprints | 44b0a2e0cee9307d302b307255889e09db22184a | [
"MIT"
] | null | null | null | chemfp/futures/process.py | wangz10/chem-fingerprints | 44b0a2e0cee9307d302b307255889e09db22184a | [
"MIT"
] | 1 | 2019-07-23T03:28:40.000Z | 2019-07-23T03:28:40.000Z | # Copyright 2009 Brian Quinlan. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Implements ProcessPoolExecutor.
The follow diagram and text describe the data-flow through the system:
|======================= In-process =====================|== Out-of-process ==|
+----------+ +----------... | 41.416185 | 80 | 0.572017 |
b781fe2f00cf5faf530dbe09234bfc8a970b7dcb | 866 | py | Python | tests/test_mixed_metaphors.py | ankita240796/proselint | 50d2a482df8f467737f9c958ace98ba152bec832 | [
"BSD-3-Clause"
] | 4,163 | 2015-10-03T07:37:21.000Z | 2022-03-31T03:52:32.000Z | tests/test_mixed_metaphors.py | ankita240796/proselint | 50d2a482df8f467737f9c958ace98ba152bec832 | [
"BSD-3-Clause"
] | 878 | 2015-09-30T20:03:33.000Z | 2022-03-28T11:06:15.000Z | tests/test_mixed_metaphors.py | ankita240796/proselint | 50d2a482df8f467737f9c958ace98ba152bec832 | [
"BSD-3-Clause"
] | 249 | 2015-10-04T12:21:27.000Z | 2022-02-28T22:13:11.000Z | """Tests for mixed_metaphors.misc check."""
from proselint.checks.mixed_metaphors import misc as chk
from .check import Check
class TestCheck(Check):
"""The test class for mixed_metaphors.misc."""
__test__ = True
@property
def this_check(self):
"""Boilerplate."""
return chk
de... | 27.935484 | 64 | 0.612009 |
8e7cd9b10415740a554445edbb634706dd97857c | 11,652 | py | Python | tensorflow/tools/git/gen_git_source.py | aeverall/tensorflow | 7992bf97711919f56f80bff9e5510cead4ab2095 | [
"Apache-2.0"
] | 52 | 2018-11-12T06:39:35.000Z | 2022-03-08T05:31:27.000Z | tensorflow/tools/git/gen_git_source.py | aeverall/tensorflow | 7992bf97711919f56f80bff9e5510cead4ab2095 | [
"Apache-2.0"
] | 2 | 2018-12-04T08:35:40.000Z | 2020-10-22T16:17:39.000Z | tensorflow/tools/git/gen_git_source.py | aeverall/tensorflow | 7992bf97711919f56f80bff9e5510cead4ab2095 | [
"Apache-2.0"
] | 17 | 2019-03-11T01:17:16.000Z | 2022-02-21T00:44:47.000Z | # 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 applica... | 34.371681 | 80 | 0.692928 |
6ac09aaf1264fff57924d7dd17d0f9a43bdf55c1 | 22,773 | py | Python | Packs/TrustwaveFusion/Integrations/TrustwaveFusion/TrustwaveFusion.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | null | null | null | Packs/TrustwaveFusion/Integrations/TrustwaveFusion/TrustwaveFusion.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 60 | 2022-02-24T14:54:47.000Z | 2022-03-31T10:38:41.000Z | Packs/TrustwaveFusion/Integrations/TrustwaveFusion/TrustwaveFusion.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | null | null | null | """Trustwave Fusion Integration for Cortex XSOAR"""
import demistomock as demisto
from CommonServerPython import * # noqa # pylint: disable=unused-wildcard-import
from CommonServerUserPython import * # noqa
import requests
import traceback
from typing import Dict, Any
import urllib.parse
# Disable insecure warning... | 31.497925 | 90 | 0.573354 |
2c99882e6b0ac74e9e7d54f379bcf0dccc67f5d2 | 2,381 | py | Python | aiostripe/test/resources/test_disputes.py | cypreess/aiostripe | 8453a377b95373192c2e1598b9a951e8437d2bc9 | [
"MIT"
] | null | null | null | aiostripe/test/resources/test_disputes.py | cypreess/aiostripe | 8453a377b95373192c2e1598b9a951e8437d2bc9 | [
"MIT"
] | 1 | 2018-08-18T16:14:50.000Z | 2018-08-18T16:14:50.000Z | aiostripe/test/resources/test_disputes.py | cypreess/aiostripe | 8453a377b95373192c2e1598b9a951e8437d2bc9 | [
"MIT"
] | null | null | null | import unittest
import aiostripe
from aiostripe.test.helper import StripeResourceTest, DUMMY_DISPUTE, NOW
class DisputeTest(StripeResourceTest):
async def test_list_all_disputes(self):
await aiostripe.Dispute.list(created={'lt': NOW})
self.requestor_mock.request.assert_called_with('get', '/v1/di... | 40.355932 | 97 | 0.48047 |
a8180cb3a6e316966b08b1dad2a872831b08c90a | 48,177 | py | Python | sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_models.py | timgates42/azure-sdk-for-python | 12dc44eb39f6d1e3e21356cfcfb4f42f1d03fdf1 | [
"MIT"
] | null | null | null | sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_models.py | timgates42/azure-sdk-for-python | 12dc44eb39f6d1e3e21356cfcfb4f42f1d03fdf1 | [
"MIT"
] | null | null | null | sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_models.py | timgates42/azure-sdk-for-python | 12dc44eb39f6d1e3e21356cfcfb4f42f1d03fdf1 | [
"MIT"
] | null | null | null | # ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
# pylint: disable=too-many-lines,too-many-public-methods
from ._shared import parse_key_vault_id
from ._generated.v7_1 import models
from ._enums import(
Certificat... | 33.903589 | 135 | 0.636341 |
c8e463aa8a4ef9020c2a8d6d5e451f7d83e6eda3 | 79,619 | py | Python | tests/unit/gapic/asset_v1p2beta1/test_asset_service.py | Abdur-rahmaanJ/python-asset | c79d51d31dd04a6cf2b903d91259c093bf200010 | [
"Apache-2.0"
] | null | null | null | tests/unit/gapic/asset_v1p2beta1/test_asset_service.py | Abdur-rahmaanJ/python-asset | c79d51d31dd04a6cf2b903d91259c093bf200010 | [
"Apache-2.0"
] | null | null | null | tests/unit/gapic/asset_v1p2beta1/test_asset_service.py | Abdur-rahmaanJ/python-asset | c79d51d31dd04a6cf2b903d91259c093bf200010 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 38.575097 | 117 | 0.695701 |
8a0fe377f268ec20a74c93cd434c6b13104edaaf | 4,736 | py | Python | lldb/packages/Python/lldbsuite/test/commands/add-dsym/uuid/TestAddDsymCommand.py | medismailben/llvm-project | e334a839032fe500c3bba22bf976ab7af13ce1c1 | [
"Apache-2.0"
] | 2,338 | 2018-06-19T17:34:51.000Z | 2022-03-31T11:00:37.000Z | lldb/packages/Python/lldbsuite/test/commands/add-dsym/uuid/TestAddDsymCommand.py | medismailben/llvm-project | e334a839032fe500c3bba22bf976ab7af13ce1c1 | [
"Apache-2.0"
] | 3,740 | 2019-01-23T15:36:48.000Z | 2022-03-31T22:01:13.000Z | lldb/packages/Python/lldbsuite/test/commands/add-dsym/uuid/TestAddDsymCommand.py | medismailben/llvm-project | e334a839032fe500c3bba22bf976ab7af13ce1c1 | [
"Apache-2.0"
] | 500 | 2019-01-23T07:49:22.000Z | 2022-03-30T02:59:37.000Z | """Test that the 'add-dsym', aka 'target symbols add', command informs the user about success or failure."""
import os
import time
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
@skipUnlessDarwin
class AddDsymCommandCase(TestBase):
... | 36.152672 | 108 | 0.621622 |
0957b60f3a75ba447d090a9f86fde7418e0776ed | 15,509 | py | Python | sktime/forecasting/compose/_pipeline.py | Piyush1729/sktime | aaad994dad7cdd0783713aa75ab103e4d427a2a0 | [
"BSD-3-Clause"
] | null | null | null | sktime/forecasting/compose/_pipeline.py | Piyush1729/sktime | aaad994dad7cdd0783713aa75ab103e4d427a2a0 | [
"BSD-3-Clause"
] | 2 | 2021-04-19T17:38:33.000Z | 2021-07-25T18:44:10.000Z | sktime/forecasting/compose/_pipeline.py | RNKuhns/sktime | f99d161a3ebbca1811477c0cdbfe4af05ef56519 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3 -u
# -*- coding: utf-8 -*-
# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)
"""Implements pipelines for forecasting."""
__author__ = ["mloning", "aiwalter"]
__all__ = ["TransformedTargetForecaster", "ForecastingPipeline"]
from sklearn.base import clone
from sktime.base i... | 33.281116 | 86 | 0.60236 |
e10d99012c872074d78134dac989a30614f1accc | 2,114 | py | Python | src/scaler.py | bagustris/nkululeko | 87a4918b37e2a8599b81c4752c6750fc8adaa079 | [
"MIT"
] | 3 | 2021-11-08T08:26:58.000Z | 2022-02-16T15:26:06.000Z | src/scaler.py | bagustris/nkululeko | 87a4918b37e2a8599b81c4752c6750fc8adaa079 | [
"MIT"
] | 12 | 2021-09-09T10:11:50.000Z | 2022-02-22T15:36:33.000Z | src/scaler.py | bagustris/nkululeko | 87a4918b37e2a8599b81c4752c6750fc8adaa079 | [
"MIT"
] | 1 | 2021-11-08T23:53:48.000Z | 2021-11-08T23:53:48.000Z | # scaler.py
from sklearn.preprocessing import StandardScaler, RobustScaler
import pandas as pd
from util import Util
import glob_conf
class Scaler:
# class to normalize speech parameters
def __init__(self, train_data_df, test_data_df, train_feats, test_feats):
self.util = Util()
scaler_type ... | 35.233333 | 91 | 0.65421 |
53024542b1bc6f8c5fff185287f313d4094e31fb | 797 | py | Python | plugins/filter/nodeset.py | bluebanquise/collection.filters | 072a4e29d9d6b72069f86ec404d994ccb466e3cd | [
"MIT"
] | null | null | null | plugins/filter/nodeset.py | bluebanquise/collection.filters | 072a4e29d9d6b72069f86ec404d994ccb466e3cd | [
"MIT"
] | null | null | null | plugins/filter/nodeset.py | bluebanquise/collection.filters | 072a4e29d9d6b72069f86ec404d994ccb466e3cd | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Make coding more python3-ish
# Original idea from Bruno Travouillon, @btravouillon
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.errors import AnsibleError, AnsibleFilterError
from ClusterShell.NodeSet import NodeSet
from ansible.modul... | 26.566667 | 90 | 0.705144 |
99c7a6f93db175b70722edabddf5b2db69edf409 | 1,033 | py | Python | recipes/Python/576591_Simple_shelve_Linux_file/recipe-576591.py | tdiprima/code | 61a74f5f93da087d27c70b2efe779ac6bd2a3b4f | [
"MIT"
] | 2,023 | 2017-07-29T09:34:46.000Z | 2022-03-24T08:00:45.000Z | recipes/Python/576591_Simple_shelve_Linux_file/recipe-576591.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 32 | 2017-09-02T17:20:08.000Z | 2022-02-11T17:49:37.000Z | recipes/Python/576591_Simple_shelve_Linux_file/recipe-576591.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 780 | 2017-07-28T19:23:28.000Z | 2022-03-25T20:39:41.000Z | #!/usr/bin/env python
import shelve, os, fcntl, new
import __builtin__
from fcntl import LOCK_SH, LOCK_EX, LOCK_UN, LOCK_NB
def _close(self):
shelve.Shelf.close(self)
fcntl.flock(self.lckfile.fileno(), LOCK_UN)
self.lckfile.close()
def open(filename, flag='c', protocol=None, writeback=False, block=True, l... | 27.918919 | 91 | 0.685382 |
1adc16a57d8edaf3b3781f3f5552b57d86f5d9e1 | 2,428 | py | Python | gdsfactory/routing/test_path_length_matching.py | jorgepadilla19/gdsfactory | 68e1c18257a75d4418279851baea417c8899a165 | [
"MIT"
] | 42 | 2020-05-25T09:33:45.000Z | 2022-03-29T03:41:19.000Z | gdsfactory/routing/test_path_length_matching.py | jorgepadilla19/gdsfactory | 68e1c18257a75d4418279851baea417c8899a165 | [
"MIT"
] | 133 | 2020-05-28T18:29:04.000Z | 2022-03-31T22:21:42.000Z | gdsfactory/routing/test_path_length_matching.py | jorgepadilla19/gdsfactory | 68e1c18257a75d4418279851baea417c8899a165 | [
"MIT"
] | 17 | 2020-06-30T07:07:50.000Z | 2022-03-17T15:45:27.000Z | import numpy as np
import gdsfactory as gf
from gdsfactory.component import Component
def test_path_length_matching() -> Component:
c = gf.Component("path_length_match_sample")
dy = 2000.0
xs1 = [-500, -300, -100, -90, -80, -55, -35, 200, 210, 240, 500, 650]
pitch = 100.0
N = len(xs1)
xs2 =... | 28.904762 | 85 | 0.614086 |
8b0e24d2bb11e366d8afd3b1355b57b23a361562 | 116 | py | Python | mapApp/views/termsAndConditions.py | amitra/BikeMaps | eb80eed2e3159ad9c4e46427a9f488e1221794fa | [
"MIT"
] | null | null | null | mapApp/views/termsAndConditions.py | amitra/BikeMaps | eb80eed2e3159ad9c4e46427a9f488e1221794fa | [
"MIT"
] | null | null | null | mapApp/views/termsAndConditions.py | amitra/BikeMaps | eb80eed2e3159ad9c4e46427a9f488e1221794fa | [
"MIT"
] | null | null | null | from django.shortcuts import render
def termsAndConditions(request):
return render(request, 'mapApp/ethics.html')
| 23.2 | 45 | 0.810345 |
4475168665db0d3353fa4b2248cbc7952e30c69f | 627 | py | Python | configs/ssn/hv_ssn_regnet-400mf_secfpn_sbn-all_2x16_2x_nus-3d.py | BB88Lee/mmdetection3d | 62aeeadf70ac1229c595e3a4fe09d8a49df808f1 | [
"Apache-2.0"
] | 136 | 2021-06-03T06:37:56.000Z | 2022-03-29T13:29:03.000Z | configs/ssn/hv_ssn_regnet-400mf_secfpn_sbn-all_2x16_2x_nus-3d.py | BB88Lee/mmdetection3d | 62aeeadf70ac1229c595e3a4fe09d8a49df808f1 | [
"Apache-2.0"
] | 38 | 2021-06-05T12:41:30.000Z | 2022-03-23T07:31:28.000Z | configs/ssn/hv_ssn_regnet-400mf_secfpn_sbn-all_2x16_2x_nus-3d.py | BB88Lee/mmdetection3d | 62aeeadf70ac1229c595e3a4fe09d8a49df808f1 | [
"Apache-2.0"
] | 21 | 2021-12-02T11:07:55.000Z | 2022-03-28T15:25:02.000Z | _base_ = './hv_ssn_secfpn_sbn-all_2x16_2x_nus-3d.py'
# model settings
model = dict(
type='MVXFasterRCNN',
pretrained=dict(pts='open-mmlab://regnetx_400mf'),
pts_backbone=dict(
_delete_=True,
type='NoStemRegNet',
arch=dict(w0=24, wa=24.48, wm=2.54, group_w=16, depth=22, bot_mul=1.0),
... | 33 | 79 | 0.61244 |
d2014fe8e0a2e60a77e7316a5232cd593f9494c8 | 8,635 | py | Python | LPES-video/08.01-podstawy/08.01.01-podstawy.py | opcode-eu-org-website/LPES-wyklady-src | dd4d413f2bb5560790b6365fa7e68e8f1a8a65b0 | [
"MIT"
] | null | null | null | LPES-video/08.01-podstawy/08.01.01-podstawy.py | opcode-eu-org-website/LPES-wyklady-src | dd4d413f2bb5560790b6365fa7e68e8f1a8a65b0 | [
"MIT"
] | null | null | null | LPES-video/08.01-podstawy/08.01.01-podstawy.py | opcode-eu-org-website/LPES-wyklady-src | dd4d413f2bb5560790b6365fa7e68e8f1a8a65b0 | [
"MIT"
] | 1 | 2021-07-03T16:43:47.000Z | 2021-07-03T16:43:47.000Z | # Copyright (c) 2020-2021 Matematyka dla Ciekawych Świata (http://ciekawi.icm.edu.pl/)
# Copyright (c) 2020-2021 Robert Ryszard Paciorek <rrp@opcode.eu.org>
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Soft... | 76.415929 | 234 | 0.753445 |
1e50569f228f328188cab7f9ad71ac1e7efbb6e9 | 234 | py | Python | ReportDbApi/schema.py | sebwink/ClinVAP | a88f49cc11d457de457e5dda45acc3d75efdd32d | [
"MIT"
] | null | null | null | ReportDbApi/schema.py | sebwink/ClinVAP | a88f49cc11d457de457e5dda45acc3d75efdd32d | [
"MIT"
] | null | null | null | ReportDbApi/schema.py | sebwink/ClinVAP | a88f49cc11d457de457e5dda45acc3d75efdd32d | [
"MIT"
] | null | null | null | import os
import json
__PATH__ = os.path.dirname(__file__)
__SCHEMAS__ = os.path.join(__PATH__, 'schema')
def get(name):
schema = os.path.join(__SCHEMAS__, name+'.json')
with open(schema) as fp:
return json.load(fp)
| 21.272727 | 52 | 0.688034 |
91856d7b084c92839ffb0f4effc1ef23b5b44422 | 9,719 | py | Python | src/primaires/interpreteur/editeur/tableau.py | stormi/tsunami | bdc853229834b52b2ee8ed54a3161a1a3133d926 | [
"BSD-3-Clause"
] | null | null | null | src/primaires/interpreteur/editeur/tableau.py | stormi/tsunami | bdc853229834b52b2ee8ed54a3161a1a3133d926 | [
"BSD-3-Clause"
] | null | null | null | src/primaires/interpreteur/editeur/tableau.py | stormi/tsunami | bdc853229834b52b2ee8ed54a3161a1a3133d926 | [
"BSD-3-Clause"
] | null | null | null | # -*-coding:Utf-8 -*
# Copyright (c) 2015 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# lis... | 40.327801 | 79 | 0.564667 |
906b7436390242d02fab1cb20dcb9a043655c076 | 787 | py | Python | src/tempgen/parsers/__init__.py | k5md/Templated-Generator | f3cd2bc6c7de6f68fa1e5835471e8eaa9163d530 | [
"MIT"
] | null | null | null | src/tempgen/parsers/__init__.py | k5md/Templated-Generator | f3cd2bc6c7de6f68fa1e5835471e8eaa9163d530 | [
"MIT"
] | null | null | null | src/tempgen/parsers/__init__.py | k5md/Templated-Generator | f3cd2bc6c7de6f68fa1e5835471e8eaa9163d530 | [
"MIT"
] | null | null | null | from . import docx
from . import xlsx
from . import plaintext
from . import ods
from . import odt
class Parsers():
"""Class contains dictionary of extensions as keys and parser instances as values, providing tools for text extraction and replacement
Attributes
----------
ext_parser_map : Dict[str, Abs... | 31.48 | 138 | 0.618806 |
0678fa0f0658025233678c329a1c5eed4947046d | 2,139 | py | Python | ravenclaw/sampling/UpSampler.py | idin/ravenclaw | 17a9b4c92d662f72c114e832f38b39eb73707bc2 | [
"MIT"
] | 1 | 2019-05-04T07:32:21.000Z | 2019-05-04T07:32:21.000Z | ravenclaw/sampling/UpSampler.py | idin/ravenclaw | 17a9b4c92d662f72c114e832f38b39eb73707bc2 | [
"MIT"
] | null | null | null | ravenclaw/sampling/UpSampler.py | idin/ravenclaw | 17a9b4c92d662f72c114e832f38b39eb73707bc2 | [
"MIT"
] | 1 | 2020-03-28T21:54:11.000Z | 2020-03-28T21:54:11.000Z | import pandas as pd
import math
from random import shuffle
class UpSampler:
def __init__(self, fill_na=None, max_repeats=None):
#self._sm = SMOTE(**kwargs)
self._x_cols = None
self._y_col = None
self._fill_na = fill_na
self._up_sampling_table = None
self._max_repeats = max_repeats
def fit(self, X, y):
... | 29.708333 | 103 | 0.710612 |
04342ae9a1580691a139cbaeb35014849e51bf63 | 83 | py | Python | signals.py | allenling/dbss | 238913e0514ceefee7089cebaaacf12c858652bb | [
"MIT"
] | null | null | null | signals.py | allenling/dbss | 238913e0514ceefee7089cebaaacf12c858652bb | [
"MIT"
] | null | null | null | signals.py | allenling/dbss | 238913e0514ceefee7089cebaaacf12c858652bb | [
"MIT"
] | null | null | null | import django.dispatch
index_update = django.dispatch.Signal(providing_args=[''])
| 20.75 | 58 | 0.795181 |
0f651eb7eb4f923a4b582c708431dd98b71e75da | 8,042 | py | Python | examples/imagenet/input_pipeline.py | joelgarde/flax | 7d12d20f8272ce9c639711e92db89fdaf7f1a94a | [
"Apache-2.0"
] | null | null | null | examples/imagenet/input_pipeline.py | joelgarde/flax | 7d12d20f8272ce9c639711e92db89fdaf7f1a94a | [
"Apache-2.0"
] | null | null | null | examples/imagenet/input_pipeline.py | joelgarde/flax | 7d12d20f8272ce9c639711e92db89fdaf7f1a94a | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The Flax 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 wri... | 34.965217 | 79 | 0.701567 |
63d7921dcf18a892e1154485ace9a6f120667a1a | 2,749 | py | Python | features_python/ImFEATbox/SURF_FeatureDescriptor.py | annikaliebgott/ImFEATbox | e7361303f11390cfe880b9db23472903f69ee3f2 | [
"Apache-2.0"
] | 22 | 2016-11-13T15:23:45.000Z | 2022-03-02T06:40:51.000Z | features_python/ImFEATbox/SURF_FeatureDescriptor.py | alps1122/ImFEATbox | 9bad2e47b363df8a55e97dc512cf77cbbac793f1 | [
"Apache-2.0"
] | 1 | 2017-03-20T11:49:06.000Z | 2017-05-23T09:49:25.000Z | features_python/ImFEATbox/SURF_FeatureDescriptor.py | alps1122/ImFEATbox | 9bad2e47b363df8a55e97dc512cf77cbbac793f1 | [
"Apache-2.0"
] | 16 | 2016-11-15T13:14:50.000Z | 2022-03-05T01:51:04.000Z | import numpy as np
import cv2
def SURF(I, N_s, test=False):
"""Input: - I: A 2D image
- N_s: desired number of strongest points to be selected.
Default: N_s = 25
Output: - Out: A (1x11) vector containing 11 metrics"""
# ******************************************************************... | 28.340206 | 74 | 0.603128 |
d195ab7b24e4054500292dad3f7b5412802c1a1c | 20,773 | py | Python | pytype/pytd/pytd_utils.py | CyberFlameGO/pytype | c8cbeea997634455b5abcb27c76c58aa0dfc25ae | [
"Apache-2.0"
] | null | null | null | pytype/pytd/pytd_utils.py | CyberFlameGO/pytype | c8cbeea997634455b5abcb27c76c58aa0dfc25ae | [
"Apache-2.0"
] | null | null | null | pytype/pytd/pytd_utils.py | CyberFlameGO/pytype | c8cbeea997634455b5abcb27c76c58aa0dfc25ae | [
"Apache-2.0"
] | null | null | null | """Utilities for pytd.
This provides a utility function to access data files in a way that works either
locally or within a larger repository.
"""
# len(x) == 0 is clearer in some places:
# pylint: disable=g-explicit-length-test
import collections
import difflib
import gzip
import itertools
import os
import pickleto... | 32.66195 | 86 | 0.666586 |
39c809d11bb0cc589bba87cd42639a2006e2e442 | 3,837 | py | Python | src/main/python/cobra/mit/_filter.py | tm0nk/cobra-j | daeb85250e63cb21e9c02ecc2acfdf8ba1e44d6b | [
"Apache-2.0"
] | null | null | null | src/main/python/cobra/mit/_filter.py | tm0nk/cobra-j | daeb85250e63cb21e9c02ecc2acfdf8ba1e44d6b | [
"Apache-2.0"
] | null | null | null | src/main/python/cobra/mit/_filter.py | tm0nk/cobra-j | daeb85250e63cb21e9c02ecc2acfdf8ba1e44d6b | [
"Apache-2.0"
] | null | null | null | # Copyright (c) '2015' Cisco Systems, Inc. All Rights Reserved
from ._expr import MoPropExpr, And, Or, Not
from ._expr import eq, ne, gt, ge, lt, le, wcard
from codetalker.pgm import Grammar, Translator
from codetalker.pgm.tokens import STRING, ID, NUMBER, CharToken, WHITE, NEWLINE, re, StringToken, ReToken
from codet... | 23.396341 | 105 | 0.675528 |
9cf01fd3a9e667fe1166c451456955830012a403 | 42,146 | py | Python | python/ccxt/gemini.py | alanwu4321/ccxt | 0472d35b6a3ab650e7ebe1db83ebc711cdaa2f61 | [
"MIT"
] | 1 | 2022-02-23T23:06:27.000Z | 2022-02-23T23:06:27.000Z | python/ccxt/gemini.py | alanwu4321/ccxt | 0472d35b6a3ab650e7ebe1db83ebc711cdaa2f61 | [
"MIT"
] | null | null | null | python/ccxt/gemini.py | alanwu4321/ccxt | 0472d35b6a3ab650e7ebe1db83ebc711cdaa2f61 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
# -----------------------------------------------------------------------------
try:
basestri... | 41.811508 | 270 | 0.499905 |
35925ffd92904a8d48e852d1e2d6ad77cbff5372 | 761 | py | Python | test/midi/parse_midi.py | rnatter/Midi | b455df61dc1f64b234bb549631cc75dcdd93ba7e | [
"MIT"
] | 403 | 2019-02-26T21:10:52.000Z | 2022-03-31T02:23:30.000Z | test/midi/parse_midi.py | rnatter/Midi | b455df61dc1f64b234bb549631cc75dcdd93ba7e | [
"MIT"
] | 83 | 2019-02-15T17:18:43.000Z | 2022-03-06T09:13:59.000Z | test/midi/parse_midi.py | rnatter/Midi | b455df61dc1f64b234bb549631cc75dcdd93ba7e | [
"MIT"
] | 63 | 2019-02-17T14:14:07.000Z | 2022-03-04T07:57:00.000Z | #
# this file is used to generate a ground truth on a midi file
#
from pretty_midi import *
import os
# parse the files
def parse_file(filename):
if os.path.exists('{}.txt'.format(filename)):
os.remove('{}.txt'.format(filename))
midi_data = PrettyMIDI(filename)
with open('{}.txt'.format(filename), 'a') as out... | 25.366667 | 73 | 0.680683 |
ac04adf077d369eb888375e9b4974b8636eaa122 | 382 | py | Python | scripts/count.py | Takuya0510/mypkg | 1a0953b5050c7066ee2e62cfaa494e84d62c6e2c | [
"BSD-3-Clause"
] | null | null | null | scripts/count.py | Takuya0510/mypkg | 1a0953b5050c7066ee2e62cfaa494e84d62c6e2c | [
"BSD-3-Clause"
] | null | null | null | scripts/count.py | Takuya0510/mypkg | 1a0953b5050c7066ee2e62cfaa494e84d62c6e2c | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
#BSD 3-Clause License
#Copyright (c) 2022, Ryuichi Ueda & TakuyaKuzuu
#All rights reserved.
import rospy
from std_msgs.msg import Int32
rospy.init_node('count')
pub = rospy.Publisher('count_up', Int32, queue_size=1)
rate = rospy.Rate(1)
n = 0
while not rospy.is_... | 21.222222 | 54 | 0.641361 |
a94331aa1247854f3421a3caa0d3ba686afea2a3 | 1,264 | py | Python | odmlui/InfoBar.py | jgrewe/odml-ui | 0d7ef1ec10d788db05677422beceaf0e6dfdae9a | [
"BSD-3-Clause"
] | null | null | null | odmlui/InfoBar.py | jgrewe/odml-ui | 0d7ef1ec10d788db05677422beceaf0e6dfdae9a | [
"BSD-3-Clause"
] | null | null | null | odmlui/InfoBar.py | jgrewe/odml-ui | 0d7ef1ec10d788db05677422beceaf0e6dfdae9a | [
"BSD-3-Clause"
] | null | null | null | from gi import pygtkcompat
pygtkcompat.enable()
pygtkcompat.enable_gtk(version='3.0')
import gtk
import gobject
class EditorInfoBar(gtk.InfoBar):
def __init__(self, *args, **kargs):
gtk.InfoBar.__init__(self, *args, **kargs)
self._msg_label = gtk.Label("")
self._msg_label.show()
... | 28.727273 | 75 | 0.643987 |
53846b2a83c62073331d6f4a26d77af724a41344 | 128,742 | py | Python | sdk/python/pulumi_azure/storage/outputs.py | henriktao/pulumi-azure | f1cbcf100b42b916da36d8fe28be3a159abaf022 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/storage/outputs.py | henriktao/pulumi-azure | f1cbcf100b42b916da36d8fe28be3a159abaf022 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/storage/outputs.py | henriktao/pulumi-azure | f1cbcf100b42b916da36d8fe28be3a159abaf022 | [
"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 warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... | 41.105364 | 235 | 0.660243 |
a6c6879b3f347ede1f45891b51f9f08397a4de88 | 6,276 | py | Python | cls_bm/engine/inference.py | anotherTK/aptos2019-blindness-detection | c606c71f7ac4ecb87d0f97d4dbbbe11f9a25645e | [
"MIT"
] | 1 | 2019-10-15T15:52:26.000Z | 2019-10-15T15:52:26.000Z | cls_bm/engine/inference.py | anotherTK/aptos2019-blindness-detection | c606c71f7ac4ecb87d0f97d4dbbbe11f9a25645e | [
"MIT"
] | null | null | null | cls_bm/engine/inference.py | anotherTK/aptos2019-blindness-detection | c606c71f7ac4ecb87d0f97d4dbbbe11f9a25645e | [
"MIT"
] | null | null | null |
import logging
import time
import os
import torch
from tqdm import tqdm
import numpy as np
from cls_bm.config import cfg
from cls_bm.data import make_data_loader
from ..utils.comm import is_main_process, get_world_size
from ..utils.comm import all_gather
from ..utils.comm import synchronize
from ..utils.timer import... | 33.561497 | 85 | 0.599904 |
f37e03f66539f5b0a415fc1e55017e400fdea9fa | 1,639 | py | Python | ukpsummarizer-be/summarizer/performance_utils/timer.py | avineshpvs/vldb2018-sherlock | 5e116f42f44c50bcb289be3c4b4b76e29b238c18 | [
"Apache-2.0"
] | 2 | 2019-01-13T08:41:00.000Z | 2021-03-27T22:55:10.000Z | ukpsummarizer-be/summarizer/performance_utils/timer.py | AIPHES/vldb2018-sherlock | 3746efa35c4c1769cc4aaeb15aeb9453564e1226 | [
"Apache-2.0"
] | null | null | null | ukpsummarizer-be/summarizer/performance_utils/timer.py | AIPHES/vldb2018-sherlock | 3746efa35c4c1769cc4aaeb15aeb9453564e1226 | [
"Apache-2.0"
] | 4 | 2018-11-06T16:12:55.000Z | 2019-08-21T13:22:32.000Z | from collections import defaultdict
from time import clock as timer
TIME = 't'
R1 = 'r1'
R2 = 'r2'
R4 = 'r4'
class Timer(object):
def __init__(self):
self.measurements = defaultdict(dict)
def start_timer(self):
self.t0 = timer()
def stop_timer_for(self, i, score):
self.measurem... | 23.084507 | 119 | 0.591214 |
9b0c8790303cd8ff0e9cfa96a45bb9912b466116 | 28,853 | py | Python | mindspore/parallel/_auto_parallel_context.py | Vincent34/mindspore | a39a60878a46e7e9cb02db788c0bca478f2fa6e5 | [
"Apache-2.0"
] | 1 | 2021-07-03T06:52:20.000Z | 2021-07-03T06:52:20.000Z | mindspore/parallel/_auto_parallel_context.py | Vincent34/mindspore | a39a60878a46e7e9cb02db788c0bca478f2fa6e5 | [
"Apache-2.0"
] | null | null | null | mindspore/parallel/_auto_parallel_context.py | Vincent34/mindspore | a39a60878a46e7e9cb02db788c0bca478f2fa6e5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 40.926241 | 117 | 0.684331 |
74b4b0ac711c2b6133ec7e76ee20a2048fff85b3 | 5,964 | py | Python | odincal/odincal/att_level1_importer.py | Odin-SMR/odincal | 4c40f0d762b5ee8cbfd7f305cf6aa7ed9ec50206 | [
"MIT"
] | null | null | null | odincal/odincal/att_level1_importer.py | Odin-SMR/odincal | 4c40f0d762b5ee8cbfd7f305cf6aa7ed9ec50206 | [
"MIT"
] | null | null | null | odincal/odincal/att_level1_importer.py | Odin-SMR/odincal | 4c40f0d762b5ee8cbfd7f305cf6aa7ed9ec50206 | [
"MIT"
] | null | null | null | from oops import odin
import numpy
import psycopg2
from StringIO import StringIO
from psycopg2 import InternalError, IntegrityError
from odincal.config import config
from odincal.database import ConfiguredDatabase
from datetime import datetime
def djl(year, mon, day, hour, min, secs):
dn = 367 * year - 7 * (year ... | 42.297872 | 113 | 0.45892 |
b6e6f69767cf8cb572e4f1921393c976b429e507 | 2,598 | py | Python | depgrams/conll.py | runelk/CollTools | 6a23a1aba7a85ba44ad45c620ce9eb67781251b9 | [
"MIT"
] | null | null | null | depgrams/conll.py | runelk/CollTools | 6a23a1aba7a85ba44ad45c620ce9eb67781251b9 | [
"MIT"
] | null | null | null | depgrams/conll.py | runelk/CollTools | 6a23a1aba7a85ba44ad45c620ce9eb67781251b9 | [
"MIT"
] | null | null | null |
import collections
import codecs
import re
# id = cells[0]
# form = cells[1]
# lemma = cells[2]
# cpostag = cells[3]
# postag = cells[4]
# feats = cells[5]
# head = cells[6]
# deprel = cells[7]
# phead = cells[8]
# pdeprel = cells[9]
def read(conll_filename):
f = codecs.open(conll_filename, 'r', 'utf-8')
d... | 27.347368 | 73 | 0.524249 |
c313490e327f300765eea7ba9f94213b1d7df2a1 | 12,286 | py | Python | examples/contrib/detection/main.py | louis-she/ignite | d05a8939139e056e5c5daf842c81af0ab5b0caaf | [
"BSD-3-Clause"
] | null | null | null | examples/contrib/detection/main.py | louis-she/ignite | d05a8939139e056e5c5daf842c81af0ab5b0caaf | [
"BSD-3-Clause"
] | null | null | null | examples/contrib/detection/main.py | louis-she/ignite | d05a8939139e056e5c5daf842c81af0ab5b0caaf | [
"BSD-3-Clause"
] | null | null | null | import multiprocessing
import os
import random
from typing import Any, List, Optional, Tuple, Union
import aim
import albumentations as A
import fire
import numpy as np
import torch
from aim.pytorch_ignite import AimLogger
from albumentations.pytorch.transforms import ToTensorV2
from mean_ap import CocoMetric, convert... | 34.804533 | 120 | 0.646427 |
ce36ce0273e240c62c32432a9e161d0fd10a1c0c | 13,218 | py | Python | pytorch_lightning/callbacks/stochastic_weight_avg.py | pollenjp/pytorch-lightning | 06f83492919c4c72a989f9bb8f271b92b479648b | [
"Apache-2.0"
] | 2 | 2020-08-29T14:59:15.000Z | 2020-09-11T11:09:10.000Z | pytorch_lightning/callbacks/stochastic_weight_avg.py | pollenjp/pytorch-lightning | 06f83492919c4c72a989f9bb8f271b92b479648b | [
"Apache-2.0"
] | null | null | null | pytorch_lightning/callbacks/stochastic_weight_avg.py | pollenjp/pytorch-lightning | 06f83492919c4c72a989f9bb8f271b92b479648b | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 44.959184 | 119 | 0.670071 |
304361a48cecc9186761fa01f7025e9e3d9c9f60 | 20,342 | py | Python | zentral/contrib/munki/views.py | synthetic-intelligence/zentral | 774104cea90b7f3d6f2aac655859c1b1f034f8dd | [
"Apache-2.0"
] | null | null | null | zentral/contrib/munki/views.py | synthetic-intelligence/zentral | 774104cea90b7f3d6f2aac655859c1b1f034f8dd | [
"Apache-2.0"
] | null | null | null | zentral/contrib/munki/views.py | synthetic-intelligence/zentral | 774104cea90b7f3d6f2aac655859c1b1f034f8dd | [
"Apache-2.0"
] | null | null | null | from datetime import datetime, timedelta
import json
import logging
from dateutil import parser
from django.contrib.auth.mixins import PermissionRequiredMixin
from django.core.cache import cache
from django.core.exceptions import SuspiciousOperation
from django.http import JsonResponse
from django.shortcuts import get_... | 42.915612 | 119 | 0.655196 |
ad7876a044c282009bc02c3236aab56aef173966 | 11,441 | py | Python | src/finite_rowmix.py | probcomp/cgpm2 | 280ab5bf3dd0d7c61196deaff7cb590692fc412a | [
"Apache-2.0"
] | 3 | 2019-01-20T08:55:06.000Z | 2019-12-02T05:59:26.000Z | src/finite_rowmix.py | probcomp/cgpm2 | 280ab5bf3dd0d7c61196deaff7cb590692fc412a | [
"Apache-2.0"
] | null | null | null | src/finite_rowmix.py | probcomp/cgpm2 | 280ab5bf3dd0d7c61196deaff7cb590692fc412a | [
"Apache-2.0"
] | 3 | 2019-08-06T07:27:34.000Z | 2019-09-28T23:26:57.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2018 MIT Probabilistic Computing Project.
# Released under Apache 2.0; refer to LICENSE.txt.
import numpy as np
from cgpm.utils.general import build_cgpm
from cgpm.utils.general import get_intersection
from cgpm.utils.general import get_prng
from cgpm.utils.general import lcha... | 43.173585 | 80 | 0.587973 |
d85ff9b23e3853a73459cf02bf4a17d6ed166bbd | 8,808 | py | Python | tests/observatory/dags/telescopes/test_grid.py | metasj/observatory-platform | e684f9dc55a1a0fde1b27193eda10532198c4168 | [
"Apache-2.0"
] | null | null | null | tests/observatory/dags/telescopes/test_grid.py | metasj/observatory-platform | e684f9dc55a1a0fde1b27193eda10532198c4168 | [
"Apache-2.0"
] | null | null | null | tests/observatory/dags/telescopes/test_grid.py | metasj/observatory-platform | e684f9dc55a1a0fde1b27193eda10532198c4168 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Curtin University
#
# 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 writi... | 42.346154 | 116 | 0.623297 |
bc73926ae38a3976846a65747ac0f61901ab2d50 | 896 | py | Python | src/guess.py | Ae-bii/guess-random-number-game | e7c6fb0f53faccec96f06c82277c53fe19b0f76b | [
"MIT"
] | null | null | null | src/guess.py | Ae-bii/guess-random-number-game | e7c6fb0f53faccec96f06c82277c53fe19b0f76b | [
"MIT"
] | null | null | null | src/guess.py | Ae-bii/guess-random-number-game | e7c6fb0f53faccec96f06c82277c53fe19b0f76b | [
"MIT"
] | null | null | null | import random
def get_input(string):
for i in range(5):
for attempt in range(10):
try:
return int(input(string))
except:
print('Invalid Input')
else:
break
else:
print('Too many failed attempts.')
... | 26.352941 | 92 | 0.591518 |
c3e1da61330fa65756d8cbfc9de5ec665f7835ef | 20,719 | py | Python | pandas/core/nanops.py | aldanor/pandas | 59559ea4a9c63b1ebe6137707fe476387be50ec4 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 1 | 2015-08-08T20:38:00.000Z | 2015-08-08T20:38:00.000Z | pandas/core/nanops.py | aldanor/pandas | 59559ea4a9c63b1ebe6137707fe476387be50ec4 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | pandas/core/nanops.py | aldanor/pandas | 59559ea4a9c63b1ebe6137707fe476387be50ec4 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | from pandas import compat
import sys
import itertools
import functools
import numpy as np
from pandas.core.common import isnull, notnull, _values_from_object, is_float
import pandas.core.common as com
import pandas.lib as lib
import pandas.algos as algos
import pandas.hashtable as _hash
import pandas.tslib as tslib
... | 28.977622 | 87 | 0.576862 |
bfb5031f04f18d0e6bce6e252d7f5dd267abf654 | 4,161 | py | Python | .serverless/requirements/telegram/files/file.py | kwokyto/anonymous-telegram-bot | f643073c01f11bf811d4027b3a63313f72289214 | [
"MIT"
] | 1 | 2022-03-17T16:30:47.000Z | 2022-03-17T16:30:47.000Z | .serverless/requirements/telegram/files/file.py | kwokyto/anonymous-telegram-bot | f643073c01f11bf811d4027b3a63313f72289214 | [
"MIT"
] | null | null | null | .serverless/requirements/telegram/files/file.py | kwokyto/anonymous-telegram-bot | f643073c01f11bf811d4027b3a63313f72289214 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# A library that provides a Python interface to the Telegram Bot API
# Copyright (C) 2015-2017
# Leandro Toledo de Souza <devs@python-telegram-bot.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as published by
#... | 37.827273 | 99 | 0.653929 |
72985c871cbefa03333fdc22e7478ba0cf5ef7e6 | 918 | py | Python | Django_a/second_project/second_project/urls.py | mohammad716e/python_training | 0654623c603c775ed2cbdc3919dc815891c8fdeb | [
"MIT"
] | null | null | null | Django_a/second_project/second_project/urls.py | mohammad716e/python_training | 0654623c603c775ed2cbdc3919dc815891c8fdeb | [
"MIT"
] | null | null | null | Django_a/second_project/second_project/urls.py | mohammad716e/python_training | 0654623c603c775ed2cbdc3919dc815891c8fdeb | [
"MIT"
] | null | null | null | """second_project URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
C... | 35.307692 | 79 | 0.704793 |
d32a4e16c06180e54533e09a30331c9b349bbae2 | 1,157 | py | Python | led_press1.py | brookshire/pypicamcapper | 13f6f4df7c65fc57cd2cacf4bbf9097b3b565fed | [
"MIT"
] | null | null | null | led_press1.py | brookshire/pypicamcapper | 13f6f4df7c65fc57cd2cacf4bbf9097b3b565fed | [
"MIT"
] | null | null | null | led_press1.py | brookshire/pypicamcapper | 13f6f4df7c65fc57cd2cacf4bbf9097b3b565fed | [
"MIT"
] | null | null | null | #
# Copyright (C) 2016 David Brookshire <dave@brookshire.org>
#
import RPi.GPIO as GPIO
import time
BUTTON = 4
LED1 = 17
LED2 = 18
GPIO.cleanup()
GPIO.setmode(GPIO.BCM)
GPIO.setup(LED1, GPIO.OUT)
print("PIN %d SET FOR OUTPUT" % LED1)
GPIO.setup(LED2, GPIO.OUT)
print("PIN %d SET FOR OUTPUT" % LED2)
GPIO.setup(BUTT... | 22.25 | 60 | 0.547105 |
08d2e67c3e0bcbc6cfe9fe01fa4e61c33c16ed62 | 5,576 | py | Python | applications/admin/services/admin_menu.py | leeyisoft/py_admin | 3300561c5686b674197ffc097cf781a931fd4787 | [
"BSD-3-Clause"
] | 15 | 2018-06-02T14:21:30.000Z | 2020-02-07T07:43:05.000Z | applications/admin/services/admin_menu.py | leeyisoft/py_admin | 3300561c5686b674197ffc097cf781a931fd4787 | [
"BSD-3-Clause"
] | 1 | 2018-06-18T15:08:47.000Z | 2018-10-13T12:14:09.000Z | applications/admin/services/admin_menu.py | leeyisoft/py_admin | 3300561c5686b674197ffc097cf781a931fd4787 | [
"BSD-3-Clause"
] | 4 | 2018-05-20T07:58:01.000Z | 2021-01-12T09:43:50.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
菜单管理
* 以 菜单节点 name 为授权码
* 一颗完整的菜单树为 base_menu 加 0 或者多个 API节点
* 一个经过配置的API节点,有如下信息,如果icon不为空,nav就为1
一个没做任务配置的API节点,会有3项数据
{
name: "login_page",
path: "/admin/login",
component: ""
}
"""
import re
import os
import json
import inspect
from tornado.util impor... | 30.140541 | 93 | 0.465746 |
c738a0d5f6840631a7210c98df06fa4ccce9df09 | 28,495 | py | Python | Wellcheck/Webapps/api.wellcheck/Object/floteur.py | SCcagg5/WellcheckV2 | 5c96a577f460e1f0dee8d3b3c3efc8217d1a2f5b | [
"MIT"
] | 3 | 2020-05-16T19:24:42.000Z | 2020-09-26T17:05:19.000Z | Wellcheck/Webapps/api.wellcheck/Object/floteur.py | SCcagg5/WellcheckV2 | 5c96a577f460e1f0dee8d3b3c3efc8217d1a2f5b | [
"MIT"
] | 30 | 2020-05-16T16:01:17.000Z | 2020-10-08T23:05:08.000Z | Wellcheck/Webapps/api.wellcheck/Object/floteur.py | WellCheck-Co/WellCheck-Web-App | afa076e6451ebbb055d06f938bb2ecc511cf9b6f | [
"MIT"
] | null | null | null | import json, time
import uuid
from .sql import sql
from .mail import Mailer
from .elastic import es
from .users import user
import requests
import hashlib
import random
import math
from elasticsearch import helpers
class floteur:
def __init__(self, usr_id=-1):
self.usr_id = str(usr_id)
... | 39.249311 | 178 | 0.425127 |
cdd2cff0d090446d1a95c9de2bb6a479b09ef9f7 | 9,349 | py | Python | src/preprocessor.py | ksk0629/chatbot_with_gpt2 | 4ca63a48f569c2257d81d60597387dd83fa4d20f | [
"MIT"
] | null | null | null | src/preprocessor.py | ksk0629/chatbot_with_gpt2 | 4ca63a48f569c2257d81d60597387dd83fa4d20f | [
"MIT"
] | null | null | null | src/preprocessor.py | ksk0629/chatbot_with_gpt2 | 4ca63a48f569c2257d81d60597387dd83fa4d20f | [
"MIT"
] | null | null | null | import argparse
from typing import List, Optional
import pandas as pd
import yaml
class LinePreProcessor():
"""Preprocessor for line history"""
def __init__(self, input_username: str, output_username: str, target_year_list: List[str]) -> None:
self.__data = []
self.__cleaned_data... | 33.996364 | 116 | 0.581987 |
219b9e75cf7460182d9a29e1bd496ec17448ee55 | 3,503 | py | Python | pymc3/plots/__init__.py | RaisaDZ/pymc3 | 0bd2d6541f10ad0174a2b20dfe9f34670c5e617d | [
"Apache-2.0"
] | 1 | 2020-09-30T06:26:53.000Z | 2020-09-30T06:26:53.000Z | pymc3/plots/__init__.py | RaisaDZ/pymc3 | 0bd2d6541f10ad0174a2b20dfe9f34670c5e617d | [
"Apache-2.0"
] | null | null | null | pymc3/plots/__init__.py | RaisaDZ/pymc3 | 0bd2d6541f10ad0174a2b20dfe9f34670c5e617d | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The PyMC Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 28.479675 | 100 | 0.613189 |
3d95d6af3c4dae5ec0396faadee3f35820077922 | 5,032 | py | Python | 4 term/MNA/Lab 2/main.py | mrojaczy/Labs | 21cd2ad3ddf8fa3b64cf253d147a4a04ad0667ab | [
"Apache-2.0"
] | 1 | 2020-03-15T17:11:23.000Z | 2020-03-15T17:11:23.000Z | 4 term/MNA/Lab 2/main.py | Asphobel/Labs | ee827143b32b691dd7736ba4888a4a9625b4694a | [
"Apache-2.0"
] | null | null | null | 4 term/MNA/Lab 2/main.py | Asphobel/Labs | ee827143b32b691dd7736ba4888a4a9625b4694a | [
"Apache-2.0"
] | null | null | null | import numpy as np
import numpy.linalg as la
import math
def simpleIterationMethod(n, matrixA, matrixB):
print("Метод простых итераций")
for i in range(n):
coefficient = matrixA[i][i]
matrixA[i] /= coefficient
matrixB[i] /= coefficient
matrixA = np.eye(n) - matrixA
print("Вид с... | 37 | 116 | 0.508347 |
a6d32c5e7524141c21a6c1e6900fd1b48b2c0944 | 294 | py | Python | AUTHENTICATION/User.py | ViRaL95/KKNYWebsite | 39cc9514bb51514044431d6aaeca40f1144b74c4 | [
"MIT"
] | null | null | null | AUTHENTICATION/User.py | ViRaL95/KKNYWebsite | 39cc9514bb51514044431d6aaeca40f1144b74c4 | [
"MIT"
] | null | null | null | AUTHENTICATION/User.py | ViRaL95/KKNYWebsite | 39cc9514bb51514044431d6aaeca40f1144b74c4 | [
"MIT"
] | null | null | null |
class User (UserMixin, db.Model):
id = db.Column(db.Integer, primary_key=True)
email = db.Column(db.String(30), unique=True)
password= db.Column(db.String(35))
first_name = db.Column(db.String(30))
last_name = db.Column(db.String(30))
gender = db.Column(db.String(6))
| 29.4 | 49 | 0.666667 |
0f455ed43b1364cd86a2385e4273f9b402251435 | 488 | py | Python | tests/migration_test_data_persistence/migrations/0001_initial.py | ni-ning/django | 2e7ba6057cfc82a15a22b6021cd60cf307152e2d | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | 61,676 | 2015-01-01T00:05:13.000Z | 2022-03-31T20:37:54.000Z | tests/migration_test_data_persistence/migrations/0001_initial.py | ni-ning/django | 2e7ba6057cfc82a15a22b6021cd60cf307152e2d | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | 8,884 | 2015-01-01T00:12:05.000Z | 2022-03-31T19:53:11.000Z | tests/migration_test_data_persistence/migrations/0001_initial.py | mustafa0x/django | d7394cfa13a4d1a02356e3a83e10ec100fbb9948 | [
"BSD-3-Clause",
"0BSD"
] | 33,143 | 2015-01-01T02:04:52.000Z | 2022-03-31T19:42:46.000Z | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Book',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)... | 23.238095 | 114 | 0.52459 |
e3045a17e6aeec1a7528a814c19ede23de4e3b0c | 1,745 | py | Python | userbot/modules/invite.py | LuqmanReburn/kangbot | 8433029c5895dc8b38fc8359cd89b928caf092b9 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 2 | 2020-06-27T13:04:29.000Z | 2020-10-10T08:02:46.000Z | userbot/modules/invite.py | LuqmanReburn/kangbot | 8433029c5895dc8b38fc8359cd89b928caf092b9 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 2 | 2020-02-03T12:11:06.000Z | 2021-02-08T20:41:06.000Z | userbot/modules/invite.py | lorazalora/lorazaloa | fb2197eefbf09e388ecd25cee298a06f2cb5f64e | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 13 | 2020-05-28T09:26:32.000Z | 2021-03-24T03:22:04.000Z | from asyncio import sleep
from telethon import functions
from userbot import CMD_HELP
from userbot.events import register
@register(outgoing=True, pattern="^.invite(?: |$)(.*)")
async def _(event):
if event.fwd_from:
return
to_add_users = event.pattern_match.group(1)
if event.is_private:
aw... | 37.12766 | 91 | 0.553009 |
eef638407ce69e9da1af612a00edce5834b031f7 | 545 | py | Python | hyper_science/manage.py | postaxmi/hyper-science | 694621a23e97ef27691ef604749cc3050b150bc3 | [
"Apache-2.0"
] | 2 | 2019-02-20T16:32:16.000Z | 2019-02-22T13:22:27.000Z | hyper_science/manage.py | postaxmi/hyper-science | 694621a23e97ef27691ef604749cc3050b150bc3 | [
"Apache-2.0"
] | null | null | null | hyper_science/manage.py | postaxmi/hyper-science | 694621a23e97ef27691ef604749cc3050b150bc3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'hyper_science.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django... | 34.0625 | 77 | 0.689908 |
b0cdaa65f739f7cba1b027b8049a35ad1929bc69 | 6,522 | py | Python | passenger_wsgi.py | hitezh/StackMonthly | 83cce01478eb1bbde2cfaaeed1e946b7a9e3572b | [
"MIT"
] | 1 | 2021-10-09T10:11:01.000Z | 2021-10-09T10:11:01.000Z | passenger_wsgi.py | hitezh/StackMonthly | 83cce01478eb1bbde2cfaaeed1e946b7a9e3572b | [
"MIT"
] | 1 | 2015-01-06T06:44:56.000Z | 2015-01-21T06:20:04.000Z | passenger_wsgi.py | hitezh/StackMonthly | 83cce01478eb1bbde2cfaaeed1e946b7a9e3572b | [
"MIT"
] | null | null | null | #Add current directory to path, if isn't already
import os, sys
cmd_folder = os.path.dirname(os.path.abspath(__file__))
if cmd_folder not in sys.path:
sys.path.insert(0, cmd_folder)
#import needed libraries
import time, datetime, calendar
from utils import *
import bottle
from bottle import route, run, template, ... | 37.918605 | 127 | 0.666973 |
261eea872a23c77f2998c3bfb61ce27abdd206a3 | 11,972 | py | Python | discord/user.py | scotchndev/discord.py | f14e584304d9d6676c90f8aa59d6e4be23d22a10 | [
"MIT"
] | 1 | 2021-09-24T21:18:55.000Z | 2021-09-24T21:18:55.000Z | discord/user.py | pxeger/discord.py | fc51736b34df3c37c06781ae948b18efb71616fa | [
"MIT"
] | null | null | null | discord/user.py | pxeger/discord.py | fc51736b34df3c37c06781ae948b18efb71616fa | [
"MIT"
] | null | null | null | """
The MIT License (MIT)
Copyright (c) 2015-present Rapptz
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, merg... | 30.232323 | 122 | 0.61577 |
eff34cfe62fab590a72081338761a72628afb34c | 41,836 | py | Python | sdk/lusid/models/future.py | rizwansaeed/lusid-sdk-python-preview | 52d092d6d4099b8526f0318f3fe1ddc0b943da6a | [
"MIT"
] | null | null | null | sdk/lusid/models/future.py | rizwansaeed/lusid-sdk-python-preview | 52d092d6d4099b8526f0318f3fe1ddc0b943da6a | [
"MIT"
] | null | null | null | sdk/lusid/models/future.py | rizwansaeed/lusid-sdk-python-preview | 52d092d6d4099b8526f0318f3fe1ddc0b943da6a | [
"MIT"
] | null | null | null | # coding: utf-8
"""
LUSID API
# Introduction This page documents the [LUSID APIs](https://www.lusid.com/api/swagger), which allows authorised clients to query and update their data within the LUSID platform. SDKs to interact with the LUSID APIs are available in the following languages : * [C#](https://gith... | 118.852273 | 28,647 | 0.682976 |
69ef3e4a72bf5e14ec4cc318ec047ef7b71942af | 2,388 | py | Python | tests/keras_tests/feature_networks_tests/feature_networks/remove_upper_bound_test.py | lapid92/model_optimization | 3fc6db67cde912a1e22399bd43bc345ba035b8b6 | [
"Apache-2.0"
] | null | null | null | tests/keras_tests/feature_networks_tests/feature_networks/remove_upper_bound_test.py | lapid92/model_optimization | 3fc6db67cde912a1e22399bd43bc345ba035b8b6 | [
"Apache-2.0"
] | null | null | null | tests/keras_tests/feature_networks_tests/feature_networks/remove_upper_bound_test.py | lapid92/model_optimization | 3fc6db67cde912a1e22399bd43bc345ba035b8b6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Sony Semiconductors Israel, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 42.642857 | 117 | 0.718174 |
e35dcb01f89ad019b82024a4984cd91bd01b8f69 | 634 | py | Python | venv/Lib/site-packages/statsmodels/graphics/plottools.py | EkremBayar/bayar | aad1a32044da671d0b4f11908416044753360b39 | [
"MIT"
] | 76 | 2019-12-28T08:37:10.000Z | 2022-03-29T02:19:41.000Z | venv/Lib/site-packages/statsmodels/graphics/plottools.py | EkremBayar/bayar | aad1a32044da671d0b4f11908416044753360b39 | [
"MIT"
] | 7 | 2020-12-04T04:10:42.000Z | 2021-03-16T00:53:09.000Z | venv/Lib/site-packages/statsmodels/graphics/plottools.py | EkremBayar/bayar | aad1a32044da671d0b4f11908416044753360b39 | [
"MIT"
] | 35 | 2020-02-04T14:46:25.000Z | 2022-03-24T03:56:17.000Z | import numpy as np
def rainbow(n):
"""
Returns a list of colors sampled at equal intervals over the spectrum.
Parameters
----------
n : int
The number of colors to return
Returns
-------
R : (n,3) array
An of rows of RGB color values
Notes
-----
Converts f... | 23.481481 | 74 | 0.59306 |
6fa0f37e14291a30025191efb3632260f7161c1b | 4,726 | py | Python | boilerio/thermostat.py | adpeace/boilerio | 730486b46a5b5a7b62d2a3d932378c3fa7dff2a0 | [
"MIT"
] | 4 | 2017-07-13T04:57:15.000Z | 2021-12-10T01:28:46.000Z | boilerio/thermostat.py | adpeace/boilerio | 730486b46a5b5a7b62d2a3d932378c3fa7dff2a0 | [
"MIT"
] | 14 | 2021-01-17T22:42:27.000Z | 2021-12-10T01:30:37.000Z | boilerio/thermostat.py | adpeace/boilerio | 730486b46a5b5a7b62d2a3d932378c3fa7dff2a0 | [
"MIT"
] | 3 | 2017-04-19T21:34:15.000Z | 2021-11-20T10:45:56.000Z | import datetime
import logging
from .tempsensor import TempReading
from boilerio import pid, pwm
logging.basicConfig()
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
class TemperatureSetting(object):
def __init__(self, target, zone_width=0.6):
self._target = target
self._zone... | 37.212598 | 81 | 0.632882 |
8954f9278b20b779b806a1ab44508be08124bab2 | 85 | py | Python | test/com/facebook/buck/autodeps/testdata/custom_autodeps/main.py | illicitonion/buck | 0336e37a5d9da94b6dcdf6ab78711c1788616ad0 | [
"Apache-2.0"
] | null | null | null | test/com/facebook/buck/autodeps/testdata/custom_autodeps/main.py | illicitonion/buck | 0336e37a5d9da94b6dcdf6ab78711c1788616ad0 | [
"Apache-2.0"
] | null | null | null | test/com/facebook/buck/autodeps/testdata/custom_autodeps/main.py | illicitonion/buck | 0336e37a5d9da94b6dcdf6ab78711c1788616ad0 | [
"Apache-2.0"
] | null | null | null | if __name__ == '__main__':
from lib1 import get_message
print(get_message())
| 21.25 | 32 | 0.694118 |
75e07e08f875187bf0e1ff426642397036a7e7df | 168 | py | Python | python/testData/override/overriddenMethodRaisesNotImplementedError_after.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/override/overriddenMethodRaisesNotImplementedError_after.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/override/overriddenMethodRaisesNotImplementedError_after.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | class A:
def m(self):
"""Abstract method."""
raise NotImplementedError('Should not be called directly')
class B(A):
def m(self):
pass
| 16.8 | 66 | 0.571429 |
8a90fe3c41b2fb51b743fc62e388441a24d7917d | 4,520 | py | Python | aiidalab_optimade/exceptions.py | csadorf/aiidalab-optimade | 5c09750a66109a67edb08771f44960d051b9aead | [
"MIT"
] | null | null | null | aiidalab_optimade/exceptions.py | csadorf/aiidalab-optimade | 5c09750a66109a67edb08771f44960d051b9aead | [
"MIT"
] | null | null | null | aiidalab_optimade/exceptions.py | csadorf/aiidalab-optimade | 5c09750a66109a67edb08771f44960d051b9aead | [
"MIT"
] | null | null | null | from typing import Any, List, Union, Tuple, Sequence
from optimade.models import Resource
from aiidalab_optimade.logger import LOGGER
class OptimadeClientError(Exception):
"""Top-most exception class for OPTIMADE Client"""
def __init__(self, *args: Tuple[Any]):
LOGGER.error(
"%s raised.... | 28.789809 | 96 | 0.613938 |
93cb0149e471501baea0e2f3d612a644221a88fb | 7,034 | py | Python | allennlp_semparse/nltk_languages/type_declarations/quarel_type_declaration.py | pdasigi/allennlp-semparse | 843c9e5a4d15f449c8f11e6c08940d3de3e2a8c7 | [
"Apache-2.0"
] | null | null | null | allennlp_semparse/nltk_languages/type_declarations/quarel_type_declaration.py | pdasigi/allennlp-semparse | 843c9e5a4d15f449c8f11e6c08940d3de3e2a8c7 | [
"Apache-2.0"
] | null | null | null | allennlp_semparse/nltk_languages/type_declarations/quarel_type_declaration.py | pdasigi/allennlp-semparse | 843c9e5a4d15f449c8f11e6c08940d3de3e2a8c7 | [
"Apache-2.0"
] | null | null | null | """
Defines all the types in the QuaRel domain.
"""
from allennlp_semparse.nltk_languages.type_declarations.type_declaration import (ComplexType,
NamedBasicType,
... | 52.103704 | 96 | 0.624538 |
fc4044cdaecc62eee52e3b57012e0565c35a347b | 1,513 | py | Python | SSH_Host_Adder/ssh_adder.py | elishahyousaf/Awesome-Python-Scripts | d516584517de2d94de60852f73d8f1831524fa19 | [
"MIT"
] | 1,026 | 2018-10-02T18:51:12.000Z | 2022-03-31T13:45:14.000Z | SSH_Host_Adder/ssh_adder.py | elishahyousaf/Awesome-Python-Scripts | d516584517de2d94de60852f73d8f1831524fa19 | [
"MIT"
] | 164 | 2018-10-02T18:37:40.000Z | 2021-11-18T13:29:54.000Z | SSH_Host_Adder/ssh_adder.py | elishahyousaf/Awesome-Python-Scripts | d516584517de2d94de60852f73d8f1831524fa19 | [
"MIT"
] | 521 | 2018-10-02T18:15:40.000Z | 2022-03-26T12:10:15.000Z | import argparse, os
ssh_template = """
HOST {name}
HostName {hostname}
User {user}
Port {port}
"""
def args_to_obj(args):
obj = ssh_template.format(**args)
return obj
def add_to_conf(conf, obj):
conf = os.path.expanduser(conf)
with open(conf, 'a') as f:
f.write(obj)
def main():... | 40.891892 | 295 | 0.684071 |
1410cc827f9bf15e0abdd57049667af55515eb71 | 17,781 | py | Python | pyModbusTCP/server.py | zsheep5/pyModbusTCP | 1f12010bffae56e81ae406690008213e34d03768 | [
"MIT"
] | null | null | null | pyModbusTCP/server.py | zsheep5/pyModbusTCP | 1f12010bffae56e81ae406690008213e34d03768 | [
"MIT"
] | null | null | null | pyModbusTCP/server.py | zsheep5/pyModbusTCP | 1f12010bffae56e81ae406690008213e34d03768 | [
"MIT"
] | null | null | null | import constants as const
import utils as mu
import socket
import struct
import settings
from threading import Lock, Thread
# for python2 compatibility
try:
from socketserver import BaseRequestHandler, ThreadingTCPServer
except ImportError:
from SocketServer import BaseRequestHandler, ThreadingTCPServer
clas... | 42.538278 | 115 | 0.5151 |
021abeacf2095f67c9774c4d388f564d23bf1c8e | 1,107 | py | Python | colour/characterisation/datasets/displays/__init__.py | timgates42/colour | cea486394e3925718a0f3dd427edc9dd5b674f0c | [
"BSD-3-Clause"
] | 6 | 2019-06-18T18:53:29.000Z | 2021-09-10T21:02:45.000Z | colour/characterisation/datasets/displays/__init__.py | timgates42/colour | cea486394e3925718a0f3dd427edc9dd5b674f0c | [
"BSD-3-Clause"
] | null | null | null | colour/characterisation/datasets/displays/__init__.py | timgates42/colour | cea486394e3925718a0f3dd427edc9dd5b674f0c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
References
----------
- :cite:`Fairchild1998b` : Fairchild, M., & Wyble, D. (1998). Colorimetric
Characterization of The Apple Studio Display (flat panel LCD) (p. 22).
http://scholarworks.rit.edu/cgi/viewcontent.cgi?article=1922&\
context=article
- :cite:`Machado2010a` : Machado,... | 33.545455 | 76 | 0.757001 |
ea06a0ec0e3b0bd08b5fb15bee9fafec7442f935 | 7,722 | py | Python | env.py | amini2nt/mb_rainbow | b44a88f524042c6a9c4a367a29a1bf21645bf6f3 | [
"MIT"
] | null | null | null | env.py | amini2nt/mb_rainbow | b44a88f524042c6a9c4a367a29a1bf21645bf6f3 | [
"MIT"
] | null | null | null | env.py | amini2nt/mb_rainbow | b44a88f524042c6a9c4a367a29a1bf21645bf6f3 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import torch
GYM_ENVS = ['Pendulum-v0', 'MountainCarContinuous-v0', 'Ant-v2', 'HalfCheetah-v2', 'Hopper-v2', 'Humanoid-v2', 'HumanoidStandup-v2', 'InvertedDoublePendulum-v2', 'InvertedPendulum-v2', 'Reacher-v2', 'Swimmer-v2', 'Walker2d-v2']
CONTROL_SUITE_ENVS = ['cartpole-balance', 'cart... | 41.516129 | 227 | 0.713287 |
496590c30ac52da050fa409b6198233823e186f9 | 9,389 | py | Python | bin/helper/blat.py | cnr-ibba/nf-chip-alignment | ab975ea3e85be007c0f6cae3e8ff86c6120ecb79 | [
"MIT"
] | null | null | null | bin/helper/blat.py | cnr-ibba/nf-chip-alignment | ab975ea3e85be007c0f6cae3e8ff86c6120ecb79 | [
"MIT"
] | 1 | 2022-03-22T14:05:25.000Z | 2022-03-22T14:05:25.000Z | bin/helper/blat.py | cnr-ibba/nf-chip-alignment | ab975ea3e85be007c0f6cae3e8ff86c6120ecb79 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Mar 21 13:59:36 2022
@author: Paolo Cozzi <bunop@libero.it>
"""
import re
import logging
from Bio.SearchIO._model.query import QueryResult
from Bio.SeqRecord import SeqRecord
from .utils import complement
# Get an instance of a logger
logger = loggi... | 32.828671 | 79 | 0.53158 |
9d925c25e2c4b7c3650bee2f104220c4a4861c21 | 986 | py | Python | twitoff/models.py | tesseract314/TwitOff | e2201e8b79a40bc5ea460bbc1a56472ca4a7c80b | [
"MIT"
] | null | null | null | twitoff/models.py | tesseract314/TwitOff | e2201e8b79a40bc5ea460bbc1a56472ca4a7c80b | [
"MIT"
] | 5 | 2021-03-19T00:00:19.000Z | 2022-03-11T23:51:30.000Z | twitoff/models.py | tesseract314/TwitOff | e2201e8b79a40bc5ea460bbc1a56472ca4a7c80b | [
"MIT"
] | null | null | null | """SQLAlchemy models and utility functions for TwitOff."""
from flask_sqlalchemy import SQLAlchemy
DB = SQLAlchemy()
class User(DB.Model):
"""Twitter users corresponding to Tweets in the Tweet table."""
id = DB.Column(DB.BigInteger, primary_key=True)
name = DB.Column(DB.String(15), nullable=False)
# T... | 37.923077 | 80 | 0.692698 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.