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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a330bad99b320ba04765b901bc520c06807b5b9 | 3,040 | py | Python | examples/vrabie2009.py | VNOpenAI/OpenControl | 0087408c57bc77f34f524b28f8c4363b116700bb | [
"MIT"
] | 5 | 2021-07-05T18:03:45.000Z | 2021-07-16T09:31:02.000Z | examples/vrabie2009.py | VNOpenAI/OpenControl | 0087408c57bc77f34f524b28f8c4363b116700bb | [
"MIT"
] | null | null | null | examples/vrabie2009.py | VNOpenAI/OpenControl | 0087408c57bc77f34f524b28f8c4363b116700bb | [
"MIT"
] | null | null | null | ### This examples the simulation examples in the paper of Vrabie and F.Lewis, the very first paper in the ADP control area using neural networks. But in this python implementation, we dont use the algorithm in the paper because the original one requires knowledge the system dynamics. Instead, we simulate with OpenContr... | 27.636364 | 435 | 0.660197 |
7a56072c3ea64ec6cb6501acb57fa2145a472055 | 1,891 | py | Python | doajtest/unit/test_lib_normalise_url.py | glauberm/doaj | dc24dfcbf4a9f02ce5c9b09b611a5766ea5742f7 | [
"Apache-2.0"
] | 47 | 2015-04-24T13:13:39.000Z | 2022-03-06T03:22:42.000Z | doajtest/unit/test_lib_normalise_url.py | glauberm/doaj | dc24dfcbf4a9f02ce5c9b09b611a5766ea5742f7 | [
"Apache-2.0"
] | 1,215 | 2015-01-02T14:29:38.000Z | 2022-03-28T14:19:13.000Z | doajtest/unit/test_lib_normalise_url.py | glauberm/doaj | dc24dfcbf4a9f02ce5c9b09b611a5766ea5742f7 | [
"Apache-2.0"
] | 14 | 2015-11-27T13:01:23.000Z | 2021-05-21T07:57:23.000Z | from parameterized import parameterized
from combinatrix.testintegration import load_parameter_sets
from unittest import TestCase
from portality.lib.paths import rel2abs
from portality.lib.normalise import normalise_url
def load_cases():
return load_parameter_sets(rel2abs(__file__, "..", "matrices", "lib_normalis... | 30.015873 | 116 | 0.556319 |
e6f87f72b60f13ecc5d37e17f7cf24e62a96f39a | 1,228 | py | Python | ott/examples/fairness/config.py | theouscidda6/ott | 53a06973e417f579fc79795403f81ee829dbd575 | [
"Apache-2.0"
] | 110 | 2021-12-28T17:18:08.000Z | 2022-03-31T00:20:57.000Z | ott/examples/fairness/config.py | theouscidda6/ott | 53a06973e417f579fc79795403f81ee829dbd575 | [
"Apache-2.0"
] | 14 | 2022-01-31T14:04:47.000Z | 2022-03-24T17:20:35.000Z | ott/examples/fairness/config.py | theouscidda6/ott | 53a06973e417f579fc79795403f81ee829dbd575 | [
"Apache-2.0"
] | 17 | 2022-01-31T11:59:26.000Z | 2022-03-31T11:28:44.000Z | # coding=utf-8
# Copyright 2022 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 29.238095 | 78 | 0.739414 |
97382167d784a56a343fb759bb77bdd9bd7429a2 | 30,376 | py | Python | door_jam.py | danieljabailey/door_jam | 1848941e96569d9d5e9eaf7ca88b03ebbffe2338 | [
"MIT",
"Unlicense"
] | null | null | null | door_jam.py | danieljabailey/door_jam | 1848941e96569d9d5e9eaf7ca88b03ebbffe2338 | [
"MIT",
"Unlicense"
] | null | null | null | door_jam.py | danieljabailey/door_jam | 1848941e96569d9d5e9eaf7ca88b03ebbffe2338 | [
"MIT",
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
import math
import sys
import pygame
import threading
import time
from enum import Enum
import pytmx
from pytmx.util_pygame import load_pygame as load_tmx
import traceback
import networkx as nx
target_fps = 30
RENDER = pygame.event.custom_type()
def surface_geom(w, h, tw, th):
return (
... | 36.59759 | 128 | 0.505794 |
8100c2285c71e303d814843ad98ed22ea5a53ac3 | 1,762 | py | Python | blog/models.py | Attila-Sasvari/django_blog | 7aea29932b62d0c46ba1963a3685b6320730a73e | [
"MIT",
"Unlicense"
] | null | null | null | blog/models.py | Attila-Sasvari/django_blog | 7aea29932b62d0c46ba1963a3685b6320730a73e | [
"MIT",
"Unlicense"
] | null | null | null | blog/models.py | Attila-Sasvari/django_blog | 7aea29932b62d0c46ba1963a3685b6320730a73e | [
"MIT",
"Unlicense"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.conf import settings
from django.shortcuts import reverse
class Tag(models.Model):
name = models.CharField(max_length=50, unique=True)
def _... | 32.62963 | 85 | 0.713394 |
5c3292281d4cf2312c30c7cd1d35ba38de7e0cf7 | 3,443 | py | Python | cloudfront-traffic-csv/cloudfront-traffic-csv.py | lakil00/aws-cloudfront-samples | 2a08d719d84ed63a1446be22db4c9c30c6a61477 | [
"Apache-2.0"
] | null | null | null | cloudfront-traffic-csv/cloudfront-traffic-csv.py | lakil00/aws-cloudfront-samples | 2a08d719d84ed63a1446be22db4c9c30c6a61477 | [
"Apache-2.0"
] | null | null | null | cloudfront-traffic-csv/cloudfront-traffic-csv.py | lakil00/aws-cloudfront-samples | 2a08d719d84ed63a1446be22db4c9c30c6a61477 | [
"Apache-2.0"
] | null | null | null | import boto3
import argparse
import datetime, dateutil
#GLOBAL_SETTINGS
timezone = datetime.timezone(datetime.timedelta(hours=0)) #UTC +0, this should be set accordingly.
#global resource to connect API
cf_client = boto3.client('cloudfront')
def get_cname(distribution):
'''
returns 1st CNAME alias or '' if n... | 38.685393 | 155 | 0.611385 |
0854a725c0328a590bc1df576c10f16c7615e19b | 1,703 | py | Python | interval_intersection.py | m10singh94/Python-programs | a83083044b4a85afcf70c4b7024287a808b01fee | [
"Apache-2.0"
] | null | null | null | interval_intersection.py | m10singh94/Python-programs | a83083044b4a85afcf70c4b7024287a808b01fee | [
"Apache-2.0"
] | null | null | null | interval_intersection.py | m10singh94/Python-programs | a83083044b4a85afcf70c4b7024287a808b01fee | [
"Apache-2.0"
] | null | null | null |
# Implement the function interval_intersection below.
# You can define other functions if it helps you decompose and solve
# the problem.
# Do not import any module that you do not use!
# Remember that if this were an exam problem, in order to be marked
# this file must meet certain requirements:
# - it must contain ... | 36.234043 | 82 | 0.647093 |
177f285cbbcf4bbac268526b21c11d505366d5cf | 5,174 | py | Python | plugins/modules/panos_commit_firewall.py | bkarypid/pan-os-ansible | d7b376192b24fd7c8f0af6debc099a0aa676b6fd | [
"Apache-2.0"
] | null | null | null | plugins/modules/panos_commit_firewall.py | bkarypid/pan-os-ansible | d7b376192b24fd7c8f0af6debc099a0aa676b6fd | [
"Apache-2.0"
] | 22 | 2020-10-19T06:12:10.000Z | 2022-03-07T10:04:30.000Z | plugins/modules/panos_commit_firewall.py | patrickdaj/pan-os-ansible | 1e3daf5fe0d862516561cc95e420691c03a38403 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2020 Palo Alto Networks, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#... | 29.735632 | 96 | 0.674333 |
a0d3ca90476d77c4a62795d33ae3244ddfe23184 | 1,999 | py | Python | Doc/tools/jinja2/testsuite/debug.py | cocoatomo/Python3.2_C_API_Tutorial | e33d4a285429935aca3178dc2a97aca3ab484232 | [
"PSF-2.0"
] | 2 | 2019-03-03T00:04:36.000Z | 2020-10-06T16:22:38.000Z | Doc/tools/jinja2/testsuite/debug.py | cocoatomo/Python3.2_C_API_Tutorial | e33d4a285429935aca3178dc2a97aca3ab484232 | [
"PSF-2.0"
] | null | null | null | Doc/tools/jinja2/testsuite/debug.py | cocoatomo/Python3.2_C_API_Tutorial | e33d4a285429935aca3178dc2a97aca3ab484232 | [
"PSF-2.0"
] | 1 | 2019-03-03T00:04:38.000Z | 2019-03-03T00:04:38.000Z | # -*- coding: utf-8 -*-
"""
jinja2.testsuite.debug
~~~~~~~~~~~~~~~~~~~~~~
Tests the debug system.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import sys
import unittest
from jinja2.testsuite import JinjaTestCase, filesystem_loader
from jinja2 import E... | 32.770492 | 192 | 0.645823 |
db8d35379e4529229eb7ca7faee49f951d3c2bf8 | 1,284 | py | Python | Examples/expn.py | mystor/garter | be79188d67923ca18c97f4d3cfcfdf89d18b4057 | [
"PSF-2.0"
] | null | null | null | Examples/expn.py | mystor/garter | be79188d67923ca18c97f4d3cfcfdf89d18b4057 | [
"PSF-2.0"
] | null | null | null | Examples/expn.py | mystor/garter | be79188d67923ca18c97f4d3cfcfdf89d18b4057 | [
"PSF-2.0"
] | null | null | null | # Evaluate an input expression e of the form t { + t } where
# t is of form { * p } and p is of form ( e ) or explicit real constant
# For example, the value of 1.5 + 3.0 * ( 0.5 + 1.5 ) "halt" is 7.5
def expn(tokens : [str]) -> float:
v := term(tokens)
while tokens[0] == "+":
tokens.pop(0)
... | 29.181818 | 79 | 0.602025 |
cc1944ef5a8a47c1c22f98e7fdc304dce7cbbfc2 | 11,349 | py | Python | mpf/tests/test_Blinkenlight.py | haggispinball/mpf_fathom_fast | 1035c3fb90bb279de84cc3ed4aa1e1df38d0d563 | [
"MIT"
] | 163 | 2015-01-25T02:19:50.000Z | 2022-03-26T12:00:28.000Z | mpf/tests/test_Blinkenlight.py | haggispinball/mpf_fathom_fast | 1035c3fb90bb279de84cc3ed4aa1e1df38d0d563 | [
"MIT"
] | 1,086 | 2015-03-23T19:53:17.000Z | 2022-03-24T20:46:11.000Z | mpf/tests/test_Blinkenlight.py | haggispinball/mpf_fathom_fast | 1035c3fb90bb279de84cc3ed4aa1e1df38d0d563 | [
"MIT"
] | 148 | 2015-01-28T02:31:39.000Z | 2022-03-22T13:54:01.000Z | from mpf.tests.MpfGameTestCase import MpfGameTestCase
from mpf.core.rgb_color import RGBColor
class TestBlinkenlight(MpfGameTestCase):
def get_config_file(self):
return 'config.yaml'
def get_platform(self):
return 'smart_virtual'
def get_machine_path(self):
return 'tests/machine... | 50.44 | 94 | 0.737686 |
2f0fc428ee557dd390c19b519605376b7ac8c0ed | 1,578 | py | Python | setup.py | ifrn-oficial/suap-duf | 264b4fc0a8d240aea9b4c960d530ce308bdd854d | [
"MIT"
] | null | null | null | setup.py | ifrn-oficial/suap-duf | 264b4fc0a8d240aea9b4c960d530ce308bdd854d | [
"MIT"
] | null | null | null | setup.py | ifrn-oficial/suap-duf | 264b4fc0a8d240aea9b4c960d530ce308bdd854d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import os
from setuptools import find_packages, setup
from url_filter import __author__, __version__
def read(fname):
with open(os.path.join(os.path.dirname(__file__), fname), "rb") as fid:
return fid.read().decode("utf-... | 30.941176 | 96 | 0.665399 |
b25c708bf987b6e987a8f142b6e6d3e6b5fb931a | 4,083 | py | Python | cde-root/local/munk/data/phd/phd/ptgraph/ptgraphviz.py | NirBenTalLab/proorigami-cde-package | 273379075830a9b94d3f2884661a54f853777ff6 | [
"MIT"
] | null | null | null | cde-root/local/munk/data/phd/phd/ptgraph/ptgraphviz.py | NirBenTalLab/proorigami-cde-package | 273379075830a9b94d3f2884661a54f853777ff6 | [
"MIT"
] | null | null | null | cde-root/local/munk/data/phd/phd/ptgraph/ptgraphviz.py | NirBenTalLab/proorigami-cde-package | 273379075830a9b94d3f2884661a54f853777ff6 | [
"MIT"
] | null | null | null | ###############################################################################
#
# ptgraphviz.py - write H-bond or topology graphs with GraphViz
#
# File: ptgraphviz.py
# Author: Alex Stivala
# Created: July 2007
#
# $Id: ptgraphviz.py 1142 2008-02-25 06:21:06Z astivala $
#
# Output H-bond or topology graph using ... | 36.783784 | 79 | 0.512123 |
a0b6da379dfcc3d32a1e150d7b35ebaee7a5d7bc | 976 | py | Python | custom_user/models.py | manoj-makkuboy/feed-ninja | 339bac6f24f9bf968e5cd0d83eb71e36d7c525cd | [
"MIT"
] | null | null | null | custom_user/models.py | manoj-makkuboy/feed-ninja | 339bac6f24f9bf968e5cd0d83eb71e36d7c525cd | [
"MIT"
] | null | null | null | custom_user/models.py | manoj-makkuboy/feed-ninja | 339bac6f24f9bf968e5cd0d83eb71e36d7c525cd | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
import logging
class Category(models.Model):
category_title = models.CharField(max_length=20, blank=False)
category_summary = models.CharField(max_length... | 28.705882 | 71 | 0.701844 |
a10141dc432ceec566a8d56272d1d5ae5b41a623 | 505 | py | Python | basis_func_list.py | jun63x/sparse_coding | 335416cf6522e2436316cf4264f7955e31aa3711 | [
"MIT"
] | null | null | null | basis_func_list.py | jun63x/sparse_coding | 335416cf6522e2436316cf4264f7955e31aa3711 | [
"MIT"
] | null | null | null | basis_func_list.py | jun63x/sparse_coding | 335416cf6522e2436316cf4264f7955e31aa3711 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
from tqdm import tqdm
class BasisFuncList:
def __init__(self, basis_func_list):
self.basis_func_list = basis_func_list
def save(self, img_dir):
for i, func in tqdm(
enumerate(self.basis_func_list),
total=len(self.basis_func_list),
... | 25.25 | 56 | 0.532673 |
c4d324195d1d2c87b73274e1da3dd09d9ab9f0e6 | 2,357 | py | Python | Numpy/code1.py | ALDOR99/Python | a76f37bb3e573cd3fdcfc19f4f73494cafa9140e | [
"MIT"
] | 2 | 2021-05-27T19:13:02.000Z | 2021-06-02T13:26:35.000Z | Numpy/code1.py | ALDOR99/Python | a76f37bb3e573cd3fdcfc19f4f73494cafa9140e | [
"MIT"
] | null | null | null | Numpy/code1.py | ALDOR99/Python | a76f37bb3e573cd3fdcfc19f4f73494cafa9140e | [
"MIT"
] | 1 | 2021-06-07T18:17:35.000Z | 2021-06-07T18:17:35.000Z | # -*- coding: utf-8 -*-
"""
Created on Sat Jun 5 11:02:44 2021
@author: ali_d
"""
import numpy as np
liste = [0,1,2,3,4,5,6,7,8,9]
#numpy array
num_array = np.array([0,1,2,3,4,5,6,7,8,9])
print(num_array)
print(type(num_array))
#%% Dizinin boyutunu bulmak : ndarray.ndim
num_array1 = np.array([0,1,2,3,4,5,6,7,8,... | 12.087179 | 79 | 0.700042 |
120c8da586e55147941ec7fb9ca5e646f672ef52 | 3,782 | py | Python | trueconsensus/fastchain/ecdsa_sig.py | truechain/py-trueconsensus | 6f792fcc4247db492a68b8277dba3c6db7b2490d | [
"Apache-2.0"
] | 53 | 2018-05-25T16:34:04.000Z | 2019-09-02T07:56:00.000Z | trueconsensus/fastchain/ecdsa_sig.py | truechain/py-trueconsensus | 6f792fcc4247db492a68b8277dba3c6db7b2490d | [
"Apache-2.0"
] | null | null | null | trueconsensus/fastchain/ecdsa_sig.py | truechain/py-trueconsensus | 6f792fcc4247db492a68b8277dba3c6db7b2490d | [
"Apache-2.0"
] | 29 | 2018-06-04T02:08:34.000Z | 2022-01-25T08:46:13.000Z | import os
import sys
import hmac
import ecdsa
import hashlib
# import pickle
# import logging
# from trueconsensus.fastchain.config import KD
from fastchain.config import KD, \
_logger
C = ecdsa.NIST256p
SIG_SIZE = 256
HASH_SIZE = 32
# MAC_SIZE = 32
ASYMM_FILE_FORMATS = {
"sign": ".pem",
... | 25.213333 | 71 | 0.582232 |
605be762ee0d2a89875af7ec468ccb0c519fb409 | 1,552 | py | Python | Day3/main.py | d4yvie/advent_of_code_2021 | bb74b9dc7b23c5ba338dcd8d2e698c7ea4e34c59 | [
"Apache-2.0"
] | null | null | null | Day3/main.py | d4yvie/advent_of_code_2021 | bb74b9dc7b23c5ba338dcd8d2e698c7ea4e34c59 | [
"Apache-2.0"
] | null | null | null | Day3/main.py | d4yvie/advent_of_code_2021 | bb74b9dc7b23c5ba338dcd8d2e698c7ea4e34c59 | [
"Apache-2.0"
] | null | null | null | from file_util import read_lines
from print_aoc import finish_task1, finish_task2
from typing import Callable
def count_amount_of_ones(nums: list[str] | set[str], number_len=12) -> list[int]:
return [sum(num[i] == "1" for num in nums) for i in range(number_len)]
def task1(lines: list[str], number_len=12) -> int... | 36.952381 | 111 | 0.690077 |
fcc2474000a70f1195d234a13567f965e1a3c3c8 | 19,412 | py | Python | sdk/python/lib/pulumi/runtime/rpc.py | Charliekenney23/pulumi | 504478c64109864345f6bec4e8e6de5d59eb0d1c | [
"Apache-2.0"
] | null | null | null | sdk/python/lib/pulumi/runtime/rpc.py | Charliekenney23/pulumi | 504478c64109864345f6bec4e8e6de5d59eb0d1c | [
"Apache-2.0"
] | null | null | null | sdk/python/lib/pulumi/runtime/rpc.py | Charliekenney23/pulumi | 504478c64109864345f6bec4e8e6de5d59eb0d1c | [
"Apache-2.0"
] | null | null | null | # Copyright 2016-2018, Pulumi Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 47.002421 | 120 | 0.673913 |
4fe0799f108d9a214677aa3c00d866bae92850a5 | 689 | py | Python | treecorr/_version.py | zchvsre/TreeCorr | 825dc0a9d4754f9d98ebcf9c26dee9597915d650 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | treecorr/_version.py | zchvsre/TreeCorr | 825dc0a9d4754f9d98ebcf9c26dee9597915d650 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | treecorr/_version.py | zchvsre/TreeCorr | 825dc0a9d4754f9d98ebcf9c26dee9597915d650 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2020-12-14T16:23:33.000Z | 2020-12-14T16:23:33.000Z | # Copyright (c) 2003-2019 by Mike Jarvis
#
# TreeCorr is free software: redistribution and use in source and binary forms,
# with or without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of condi... | 43.0625 | 80 | 0.766328 |
077912bddf7ed90e426df99852acb1c2d75b5f80 | 15,798 | py | Python | oss_server/explorer/update_db.py | pallet-io/Pallet-API | fd3b8ed4c8063d9010ed53ace6ec068c983ae22e | [
"BSD-3-Clause"
] | 10 | 2018-01-30T06:21:43.000Z | 2022-01-03T12:18:07.000Z | oss_server/explorer/update_db.py | pallet-io/Pallet-API | fd3b8ed4c8063d9010ed53ace6ec068c983ae22e | [
"BSD-3-Clause"
] | 4 | 2018-02-21T02:30:37.000Z | 2018-03-04T05:20:30.000Z | oss_server/explorer/update_db.py | pallet-io/Pallet-API | fd3b8ed4c8063d9010ed53ace6ec068c983ae22e | [
"BSD-3-Clause"
] | 2 | 2018-01-31T04:22:52.000Z | 2018-03-10T14:04:35.000Z | import logging
import os
from time import sleep
from django.conf import settings
from django.core.exceptions import MultipleObjectsReturned
from django.db import transaction
from django.db import connections
from blocktools.block import Block
from blocktools.blocktools import *
from .models import Address, Datadir, ... | 40.611825 | 113 | 0.587923 |
aa8d99fd0f8d64fbd9853e64fbbf79dfb90fbc75 | 3,709 | py | Python | user_interface.py | cashmy/SweepstakesProject | a4fb2582e7e3beaf9b0f69746b6784ab1d10b0b6 | [
"MIT"
] | null | null | null | user_interface.py | cashmy/SweepstakesProject | a4fb2582e7e3beaf9b0f69746b6784ab1d10b0b6 | [
"MIT"
] | null | null | null | user_interface.py | cashmy/SweepstakesProject | a4fb2582e7e3beaf9b0f69746b6784ab1d10b0b6 | [
"MIT"
] | null | null | null | import os
def simulation_main_menu():
"""Main menu prompting user to choose an option"""
validate_user_selection = (False, None)
while validate_user_selection[0] is False:
print("\n\t\t-Sweepstake Processing-")
print("\tPress -1- to create a sweepstakes")
print("\tPress -2- to crea... | 30.401639 | 95 | 0.648423 |
aea6a4cf5bd0af23771a7ee6253fc232dfa586be | 9,869 | py | Python | arepytools/_utils.py | rpitonak/BioPAL | 08c57b3ba2d8e5a06105f930b1067c2541636bb6 | [
"MIT"
] | 35 | 2021-04-26T13:11:34.000Z | 2022-03-13T02:27:53.000Z | arepytools/_utils.py | rpitonak/BioPAL | 08c57b3ba2d8e5a06105f930b1067c2541636bb6 | [
"MIT"
] | 13 | 2021-04-28T20:56:53.000Z | 2022-03-25T09:15:26.000Z | arepytools/_utils.py | rpitonak/BioPAL | 08c57b3ba2d8e5a06105f930b1067c2541636bb6 | [
"MIT"
] | 12 | 2021-04-26T13:11:43.000Z | 2022-03-28T06:19:19.000Z | # SPDX-FileCopyrightText: Aresys S.r.l. <info@aresys.it>
# SPDX-License-Identifier: MIT
"""
Utilities
---------
"""
import os
from functools import wraps
import numpy as np
_ERROR_CHECK_TYPE = "Wrong {} type: {} != {}"
_ERROR_CHECK_SIZE_OF_NUMPY_ARRAY = "Vector {} has wrong size: {} != {}"
_ERROR_CHECK_DTYPE_OF_NUM... | 37.957692 | 119 | 0.67788 |
b83d75b106fbab1689aa91df34530d5455cd6c7c | 3,103 | py | Python | polynomial_regression.py | abrumador/Polynomial-regression | d3b8d8acaf436223505b934103a4306efc5c90e6 | [
"MIT"
] | null | null | null | polynomial_regression.py | abrumador/Polynomial-regression | d3b8d8acaf436223505b934103a4306efc5c90e6 | [
"MIT"
] | null | null | null | polynomial_regression.py | abrumador/Polynomial-regression | d3b8d8acaf436223505b934103a4306efc5c90e6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Aug 18 17:20:20 2019
@author: ahmetkaanipekoren
"""
def main():
df = pd.read_csv("kc_house_data.csv")
data_x = df["sqft_living"]
data_y = df["price"]
train_x, test_x, train_y , test_y = train_test_split(data_x,data_y,test_size... | 21.108844 | 106 | 0.601998 |
aadeb28be276fe49bab36868f86acefc990cc991 | 202 | py | Python | examples/autopipegen/testp/touch1.py | microns-ariadne/ariadne-pipeline-test-harness | 73e749c48d1ff103fee2044833778e33c70be73b | [
"MIT"
] | 2 | 2016-03-15T15:07:06.000Z | 2016-05-10T23:01:05.000Z | examples/autopipegen/testp/touch1.py | microns-ariadne/ariadne-pipeline-test-harness | 73e749c48d1ff103fee2044833778e33c70be73b | [
"MIT"
] | null | null | null | examples/autopipegen/testp/touch1.py | microns-ariadne/ariadne-pipeline-test-harness | 73e749c48d1ff103fee2044833778e33c70be73b | [
"MIT"
] | null | null | null | # generated by shell2pipe on 2016-03-15
import os
import plugin
plugin_class='touch1'
class touch1(plugin.AriadneOp):
name='touch1'
def run(self, args):
os.system('touch tmp/yarr')
| 14.428571 | 39 | 0.688119 |
eddd8d8944b9738dea8f6befdd9c11cd2eceba09 | 1,309 | py | Python | tools/gn-utils/__copy.py | omega-graphics/autom | 1434152fe1fea89c3d77a347bbab28c301436183 | [
"BSD-3-Clause"
] | null | null | null | tools/gn-utils/__copy.py | omega-graphics/autom | 1434152fe1fea89c3d77a347bbab28c301436183 | [
"BSD-3-Clause"
] | null | null | null | tools/gn-utils/__copy.py | omega-graphics/autom | 1434152fe1fea89c3d77a347bbab28c301436183 | [
"BSD-3-Clause"
] | null | null | null | import sys
import os,glob,argparse,json
import shutil
parser = argparse.ArgumentParser()
parser.add_argument("--src",type=str)
parser.add_argument("--dest",type=str)
parser.add_argument("--calc-glob-outputs",action="store_const",const=True,default=False)
parser.add_argument("--glob",dest="glob",action="store_cons... | 25.666667 | 88 | 0.655462 |
4ca4f06b5219de2ab9ca51bc08222031fc8f0e0a | 5,301 | py | Python | rlkit/samplers/data_collector/path_collector.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | rlkit/samplers/data_collector/path_collector.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | rlkit/samplers/data_collector/path_collector.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | from collections import deque, OrderedDict
from functools import partial
import numpy as np
from rlkit.envs.vae_wrappers import VAEWrappedEnv
from rlkit.misc.eval_util import create_stats_ordered_dict
from rlkit.samplers.data_collector.base import PathCollector
from rlkit.samplers.rollout_functions import rollout
c... | 30.641618 | 73 | 0.606867 |
42c1c46ce15aa519befa0cc28b3dad68bf8d8f8b | 3,729 | py | Python | tensorflow_v2/dragen1860/Tutorials/10-ColorBot/model.py | gottaegbert/penter | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | [
"MIT"
] | 13 | 2020-01-04T07:37:38.000Z | 2021-08-31T05:19:58.000Z | tensorflow_v2/dragen1860/Tutorials/10-ColorBot/model.py | gottaegbert/penter | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | [
"MIT"
] | 3 | 2020-06-05T22:42:53.000Z | 2020-08-24T07:18:54.000Z | tensorflow_v2/dragen1860/Tutorials/10-ColorBot/model.py | gottaegbert/penter | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | [
"MIT"
] | 9 | 2020-10-19T04:53:06.000Z | 2021-08-31T05:20:01.000Z | import tensorflow as tf
from tensorflow import keras
class RNNColorbot(keras.Model):
"""
Multi-layer (LSTM) RNN that regresses on real-valued vector labels.
"""
def __init__(self, rnn_cell_sizes, label_dimension, keep_prob):
"""Constructs an RNNColorbot.
Args:
rnn_cell_... | 46.6125 | 85 | 0.628587 |
e456686b2ae00f96dc8327beba644ee613881e7d | 497 | py | Python | setup.py | csomaati/clockify-cli | 92f7b260679cfd2fa4b00b4894c28e808d77c201 | [
"MIT"
] | null | null | null | setup.py | csomaati/clockify-cli | 92f7b260679cfd2fa4b00b4894c28e808d77c201 | [
"MIT"
] | null | null | null | setup.py | csomaati/clockify-cli | 92f7b260679cfd2fa4b00b4894c28e808d77c201 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='clockify_cli',
version='0.10',
py_modules=['clockify_cli'],
author='Theodore Hu',
url='https://github.com/t5/clockify-cli',
install_requires=[
'click>=7.0',
'certifi==2018.8.13',
'chardet==3.0.4',
'click==6.7',
'i... | 21.608696 | 47 | 0.541247 |
918d81a5a848a1779898a75a82fbac6371b002eb | 1,270 | py | Python | layout/review.py | gbkim000/wxPython | b1604d71cf04801f9efa8b26b935561a88ef1daa | [
"BSD-2-Clause"
] | 80 | 2018-05-25T00:37:25.000Z | 2022-03-13T12:31:02.000Z | layout/review.py | gbkim000/wxPython | b1604d71cf04801f9efa8b26b935561a88ef1daa | [
"BSD-2-Clause"
] | 1 | 2021-01-08T20:22:52.000Z | 2021-01-08T20:22:52.000Z | layout/review.py | gbkim000/wxPython | b1604d71cf04801f9efa8b26b935561a88ef1daa | [
"BSD-2-Clause"
] | 32 | 2018-05-24T05:40:55.000Z | 2022-03-24T00:32:11.000Z | #!/usr/bin/python
"""
ZetCode wxPython tutorial
In this example we create review
layout with wx.FlexGridSizer.
author: Jan Bodnar
website: www.zetcode.com
last modified: April 2018
"""
import wx
class Example(wx.Frame):
def __init__(self, parent, title):
super(Example, self).__init__(parent, title=tit... | 20.819672 | 78 | 0.60315 |
df883b2d7ecc94a0676b79f0dc1bf9f224c207ae | 1,042 | py | Python | python_program/cball2.py | LiuKaiqiang94/PyStudyExample | b30212718b218c71e06b68677f55c33e3a1dbf46 | [
"MIT"
] | 5 | 2018-09-10T02:52:35.000Z | 2018-09-20T07:50:42.000Z | python_program/cball2.py | LiuKaiqiang94/PyStudyExample | b30212718b218c71e06b68677f55c33e3a1dbf46 | [
"MIT"
] | null | null | null | python_program/cball2.py | LiuKaiqiang94/PyStudyExample | b30212718b218c71e06b68677f55c33e3a1dbf46 | [
"MIT"
] | null | null | null | #炮弹问题,面向对象方案
from math import sin,cos,radians
class Projectile:
def __init__(self,angle,velocity,height):
self.xpos=0.0
self.ypos=height
theta=radians(angle)
self.xvel=velocity * cos(theta)
self.yvel=velocity * sin(theta)
def update(self,time):
self.xpos=self.x... | 26.717949 | 72 | 0.634357 |
2a3b4d920c1db65e3f6ecffe3a7f2284610a1947 | 4,991 | py | Python | mce/spec.py | mvcisback/mce-spec-inference | 58432b35e35b75cab1c77cbbe2057aff94794597 | [
"MIT"
] | null | null | null | mce/spec.py | mvcisback/mce-spec-inference | 58432b35e35b75cab1c77cbbe2057aff94794597 | [
"MIT"
] | null | null | null | mce/spec.py | mvcisback/mce-spec-inference | 58432b35e35b75cab1c77cbbe2057aff94794597 | [
"MIT"
] | null | null | null | __all__ = ["ConcreteSpec", "concretize"]
from functools import lru_cache
from typing import FrozenSet, Sequence, Mapping
import attr
import aiger_bdd
import aiger_bv as BV
import aiger_coins as C
import funcy as fn
from aiger_bv.bundle import BundleMap
from bdd2dfa.b2d import to_dfa, BNode
from bidict import bidict
f... | 31.789809 | 77 | 0.633741 |
c460c05b8a1a5cbd5eb6e559ea30e2c7b9fa5a66 | 368 | py | Python | idb/common/video.py | amonshiz/idb | 3a5ef5c76966657c617133dd1f5d58db99d15d89 | [
"MIT"
] | 1 | 2021-03-09T07:29:18.000Z | 2021-03-09T07:29:18.000Z | idb/common/video.py | amonshiz/idb | 3a5ef5c76966657c617133dd1f5d58db99d15d89 | [
"MIT"
] | 6 | 2021-05-10T08:32:56.000Z | 2022-02-26T01:41:09.000Z | idb/common/video.py | fakeNetflix/facebook-repo-idb | eb4ed5a7dc4a14b224a22e833294d7366fe4725e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
from typing import AsyncIterator
from idb.grpc.idb_pb2 import RecordResponse
async def generate_video_bytes(
stream: AsyncIterator[RecordResponse],
) -> AsyncIterator[bytes]:
async for response in stream:
... | 24.533333 | 71 | 0.73913 |
fb454bde1ed50353b461c53016515cc29fbdfe02 | 1,309 | py | Python | _app/text_file.py | Wilfongjt/lb-data | eca16bcec6cae5822146dfce8ea56e5f533c7f87 | [
"MIT"
] | null | null | null | _app/text_file.py | Wilfongjt/lb-data | eca16bcec6cae5822146dfce8ea56e5f533c7f87 | [
"MIT"
] | 6 | 2020-04-15T10:15:30.000Z | 2020-07-10T16:12:42.000Z | _app/text_file.py | Wilfongjt/lb-data | eca16bcec6cae5822146dfce8ea56e5f533c7f87 | [
"MIT"
] | null | null | null | from file import ListFile
class TextFile(ListFile):
def __init__(self, folder, filename):
super().__init__(folder, filename)
def main():
from pathlib import Path
from util import Util
import os
from app_settings import AppSettings, AppSettingsTest
os.environ['LB-TESTING'] = '1'
... | 28.456522 | 73 | 0.59893 |
24f798fa0b34bd8ceb380a9d2c30a42982d1e811 | 1,420 | py | Python | qa/rpc-tests/reindex.py | sibbstar/Money | f471093d48fb938787fc9aa1a4a744881b9e5ea8 | [
"MIT"
] | null | null | null | qa/rpc-tests/reindex.py | sibbstar/Money | f471093d48fb938787fc9aa1a4a744881b9e5ea8 | [
"MIT"
] | null | null | null | qa/rpc-tests/reindex.py | sibbstar/Money | f471093d48fb938787fc9aa1a4a744881b9e5ea8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test -reindex and -reindex-chainstate with CheckBlockIndex
#
from test_framework.test_framework impor... | 31.555556 | 147 | 0.678169 |
82242517f2120d205b3fb5939942035ec8f92ee4 | 6,296 | py | Python | mogptk/models/sm_lmc.py | vishalbelsare/mogptk | 4f7001fbfacea778bd62a1e4e6c5b404c473e313 | [
"MIT"
] | null | null | null | mogptk/models/sm_lmc.py | vishalbelsare/mogptk | 4f7001fbfacea778bd62a1e4e6c5b404c473e313 | [
"MIT"
] | null | null | null | mogptk/models/sm_lmc.py | vishalbelsare/mogptk | 4f7001fbfacea778bd62a1e4e6c5b404c473e313 | [
"MIT"
] | null | null | null | import numpy as np
from ..dataset import DataSet
from ..model import Model, Exact, logger
from ..gpr import LinearModelOfCoregionalizationKernel, SpectralKernel
class SM_LMC(Model):
"""
Spectral Mixture Linear Model of Coregionalization kernel with `Q` components and `Rq` latent functions. The SM kernel as pr... | 49.968254 | 339 | 0.647078 |
547b9cffa039dbfb9483af5aba073c580085f598 | 2,466 | py | Python | MyGPyOpt/testing/functional_tests/test_duplicate_manager.py | Paul1298/GPyOpt | d26bd4fb57a0b83a5cdaa0e7e97aa3692eb31187 | [
"BSD-3-Clause"
] | null | null | null | MyGPyOpt/testing/functional_tests/test_duplicate_manager.py | Paul1298/GPyOpt | d26bd4fb57a0b83a5cdaa0e7e97aa3692eb31187 | [
"BSD-3-Clause"
] | null | null | null | MyGPyOpt/testing/functional_tests/test_duplicate_manager.py | Paul1298/GPyOpt | d26bd4fb57a0b83a5cdaa0e7e97aa3692eb31187 | [
"BSD-3-Clause"
] | 1 | 2021-03-22T17:21:15.000Z | 2021-03-22T17:21:15.000Z | import unittest
import numpy as np
from MyGPyOpt.core.task.space import Design_space
from MyGPyOpt.experiment_design import initial_design
from MyGPyOpt.util.duplicate_manager import DuplicateManager
class TestDuplicateManager(unittest.TestCase):
def test_duplicate(self):
space = [
{'name': 'v... | 35.228571 | 95 | 0.673966 |
8bafecc928b7d33f3fb71a8774d8d7c73e417453 | 739 | py | Python | SnakeBot/basic/code.py | gamblor21/Adafruit_Learning_System_Guides | f5dab4a758bc82d0bfc3c299683fe89dc093912a | [
"MIT"
] | 665 | 2017-09-27T21:20:14.000Z | 2022-03-31T09:09:25.000Z | SnakeBot/basic/code.py | gamblor21/Adafruit_Learning_System_Guides | f5dab4a758bc82d0bfc3c299683fe89dc093912a | [
"MIT"
] | 641 | 2017-10-03T19:46:37.000Z | 2022-03-30T18:28:46.000Z | SnakeBot/basic/code.py | gamblor21/Adafruit_Learning_System_Guides | f5dab4a758bc82d0bfc3c299683fe89dc093912a | [
"MIT"
] | 734 | 2017-10-02T22:47:38.000Z | 2022-03-30T14:03:51.000Z | import time
from adafruit_crickit import crickit
ss = crickit.seesaw
left_wheel = crickit.dc_motor_1
right_wheel = crickit.dc_motor_2
# These allow easy correction for motor speed variation.
# Factors are determined by observation and fiddling.
# Start with both having a factor of 1.0 (i.e. none) and
# adjust until... | 19.972973 | 56 | 0.710419 |
941779ad9a9f38fe024c2598994b1b324e89a61c | 1,857 | py | Python | lib/lambdascrapers/modules/js2py/pyjs.py | proxium/script.module.lambdascrapers | f96ad4c7c44c011c9d0007a83edde8c4797e0e2f | [
"Beerware"
] | 11 | 2018-12-21T22:52:37.000Z | 2021-09-02T02:13:50.000Z | lib/lambdascrapers/modules/js2py/pyjs.py | proxium/script.module.lambdascrapers | f96ad4c7c44c011c9d0007a83edde8c4797e0e2f | [
"Beerware"
] | null | null | null | lib/lambdascrapers/modules/js2py/pyjs.py | proxium/script.module.lambdascrapers | f96ad4c7c44c011c9d0007a83edde8c4797e0e2f | [
"Beerware"
] | 2 | 2020-04-01T22:11:12.000Z | 2020-05-07T23:54:52.000Z | from .base import *
from .constructors.jsmath import Math
from .constructors.jsdate import Date
from .constructors.jsobject import Object
from .constructors.jsfunction import Function
from .constructors.jsstring import String
from .constructors.jsnumber import Number
from .constructors.jsboolean import Boolean
from .co... | 34.388889 | 100 | 0.695207 |
f5e95bd7706f36d0e04f9f5e3c3f3254d5e28b53 | 1,080 | py | Python | prepare/yt.py | osfans/MCPDict | 89b9dfdb4964ae9979b4a8d26f1494c0f25b3534 | [
"MIT"
] | 40 | 2020-10-16T05:32:58.000Z | 2022-03-07T16:06:46.000Z | prepare/yt.py | osfans/MCPDict | 89b9dfdb4964ae9979b4a8d26f1494c0f25b3534 | [
"MIT"
] | 5 | 2021-10-03T22:35:01.000Z | 2022-03-07T05:47:59.000Z | prepare/yt.py | osfans/MCPDict | 89b9dfdb4964ae9979b4a8d26f1494c0f25b3534 | [
"MIT"
] | 7 | 2020-09-28T14:46:48.000Z | 2022-03-20T09:27:22.000Z | #!/usr/bin/env python3
from openpyxl import load_workbook
from collections import defaultdict
import os.path
def get_dict():
yt = dict()
if os.path.exists("yt.tsv"):
f = open("yt.tsv")
for line in f:
fs = line.strip().split("\t")
yt[int(fs[0])] = fs[1]
f.close()
else:
for sheet in load_workbook("韵图音系... | 22.040816 | 46 | 0.557407 |
ee49edff1ed84638c98a19f61619a5cef872d1e1 | 1,091 | py | Python | tests/unit/h_api/bulk_api/executor_test.py | hypothesis/h-api | 9e8b6a46abdae796241c61e41ad02b695446dc00 | [
"BSD-2-Clause"
] | null | null | null | tests/unit/h_api/bulk_api/executor_test.py | hypothesis/h-api | 9e8b6a46abdae796241c61e41ad02b695446dc00 | [
"BSD-2-Clause"
] | 7 | 2020-04-16T12:58:42.000Z | 2021-05-11T08:13:30.000Z | tests/unit/h_api/bulk_api/executor_test.py | hypothesis/h-api | 9e8b6a46abdae796241c61e41ad02b695446dc00 | [
"BSD-2-Clause"
] | 1 | 2020-05-28T16:31:09.000Z | 2020-05-28T16:31:09.000Z | from unittest.mock import sentinel
import pytest
from h_matchers import Any
from h_api.bulk_api.executor import AutomaticReportExecutor
from h_api.bulk_api.model.report import Report
from h_api.enums import CommandType
class TestAutomaticReportExecutor:
@pytest.mark.parametrize(
"command_type",
... | 33.060606 | 87 | 0.712191 |
e575ca0a2b93c20ff9c039826bdc2f3ddeba4091 | 10,314 | py | Python | lib/filetype_unittest.py | khromiumos/chromiumos-chromite | a42a85481cdd9d635dc40a04585e427f89f3bb3f | [
"BSD-3-Clause"
] | null | null | null | lib/filetype_unittest.py | khromiumos/chromiumos-chromite | a42a85481cdd9d635dc40a04585e427f89f3bb3f | [
"BSD-3-Clause"
] | 2 | 2021-03-26T00:29:32.000Z | 2021-04-30T21:29:33.000Z | lib/filetype_unittest.py | khromiumos/chromiumos-chromite | a42a85481cdd9d635dc40a04585e427f89f3bb3f | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2014 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Unittests for the filetype.py module."""
from __future__ import print_function
import os
import stat
import sys
from chromit... | 43.154812 | 80 | 0.702055 |
c050eb32a8ccd103a253d96b636c3daf5ab377f8 | 15,450 | py | Python | jgem/specific.py | kensugino/JUGEMu | 3ebf19c96e41f1c90d63d772fd4c9c5cc3d6886f | [
"MIT"
] | null | null | null | jgem/specific.py | kensugino/JUGEMu | 3ebf19c96e41f1c90d63d772fd4c9c5cc3d6886f | [
"MIT"
] | null | null | null | jgem/specific.py | kensugino/JUGEMu | 3ebf19c96e41f1c90d63d772fd4c9c5cc3d6886f | [
"MIT"
] | null | null | null | """
.. module:: assembler
:synopsis: assemble genes from RNASeq data (normalized genome coverage (bigwig) and junctions)
.. moduleauthor:: Ken Sugino <ken.sugino@gmail.com>
"""
# system imports
import gzip
import os
from functools import reduce
from operator import iadd, iand
from collections import Counter
fro... | 39.514066 | 102 | 0.543819 |
8a562dc169d196dd76d30b9b0de9ce4aedecef0d | 761 | py | Python | hubblestack/matchers/grain_match.py | buddwm/hubble | b384ee48556ca144ae6f09dd0b45db29288e5293 | [
"Apache-2.0"
] | 363 | 2017-01-10T22:02:47.000Z | 2022-03-21T10:44:40.000Z | hubblestack/matchers/grain_match.py | buddwm/hubble | b384ee48556ca144ae6f09dd0b45db29288e5293 | [
"Apache-2.0"
] | 439 | 2017-01-12T22:39:42.000Z | 2021-10-11T18:43:28.000Z | hubblestack/matchers/grain_match.py | buddwm/hubble | b384ee48556ca144ae6f09dd0b45db29288e5293 | [
"Apache-2.0"
] | 138 | 2017-01-05T22:10:59.000Z | 2021-09-01T14:35:00.000Z | # -*- coding: utf-8 -*-
"""
This is the default grains matcher function.
"""
import logging
import hubblestack.utils.data # pylint: disable=3rd-party-module-not-gated
from hubblestack.defaults import ( # pylint: disable=3rd-party-module-not-gated
DEFAULT_TARGET_DELIM,
)
log = logging.getLogger(__name__)
def ... | 24.548387 | 89 | 0.676741 |
c17dc1a93121d6f79d45417c38785923b43619a8 | 35,735 | py | Python | skimage/filters/thresholding.py | smheidrich/scikit-image | e9cf8b850c4c2800cc221be6f1dfff6a2a32a4eb | [
"BSD-3-Clause"
] | 1 | 2019-02-17T23:16:44.000Z | 2019-02-17T23:16:44.000Z | skimage/filters/thresholding.py | smheidrich/scikit-image | e9cf8b850c4c2800cc221be6f1dfff6a2a32a4eb | [
"BSD-3-Clause"
] | null | null | null | skimage/filters/thresholding.py | smheidrich/scikit-image | e9cf8b850c4c2800cc221be6f1dfff6a2a32a4eb | [
"BSD-3-Clause"
] | 1 | 2022-02-05T07:52:54.000Z | 2022-02-05T07:52:54.000Z | import itertools
import math
import numpy as np
from scipy import ndimage as ndi
from collections import OrderedDict
from collections.abc import Iterable
from ..exposure import histogram
from .._shared.utils import assert_nD, warn, deprecated
from ..transform import integral_image
from ..util import crop, dtype_limits
... | 34.829435 | 127 | 0.623143 |
dd304376a04005ab5005d7fd322aa5f83eafba4e | 1,937 | py | Python | tests/functional/test_linux_appimage.py | Starbuck5/pyinstaller | 2672294982159e90ddbb6ccff135f8c42dff56bc | [
"Apache-2.0"
] | null | null | null | tests/functional/test_linux_appimage.py | Starbuck5/pyinstaller | 2672294982159e90ddbb6ccff135f8c42dff56bc | [
"Apache-2.0"
] | null | null | null | tests/functional/test_linux_appimage.py | Starbuck5/pyinstaller | 2672294982159e90ddbb6ccff135f8c42dff56bc | [
"Apache-2.0"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2005-2022, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is in the file COPYING.txt... | 35.218182 | 89 | 0.653588 |
0158468b25aafe936ad636efcadd13e407fbb3db | 707 | py | Python | 07_Testbed_Programming/Code/Off.py | jetbotml/2021SummerLibrary | 71a5bdd39cde128678fd9f14348dd3ba3853ed16 | [
"MIT"
] | null | null | null | 07_Testbed_Programming/Code/Off.py | jetbotml/2021SummerLibrary | 71a5bdd39cde128678fd9f14348dd3ba3853ed16 | [
"MIT"
] | null | null | null | 07_Testbed_Programming/Code/Off.py | jetbotml/2021SummerLibrary | 71a5bdd39cde128678fd9f14348dd3ba3853ed16 | [
"MIT"
] | null | null | null | from __future__ import division
from gpiozero import Button
from gpiozero import Motor
from gpiozero import DistanceSensor
from gpiozero import LED
from gpiozero import Buzzer
from gpiozero import RGBLED
from gpiozero import LightSensor
from gpiozero import LEDBoard
from time import sleep
SleepTime = 1
leds = LEDBoar... | 26.185185 | 54 | 0.772277 |
6b9b7832d8c1472eddfb4c0ce6f8f5181dacd227 | 2,968 | py | Python | base/tests/utils/security/test_caesar_cypher.py | PeterStuck/teacher-app | e71c5b69019450a9ac8694fb461d343ce33e1b35 | [
"CC0-1.0"
] | null | null | null | base/tests/utils/security/test_caesar_cypher.py | PeterStuck/teacher-app | e71c5b69019450a9ac8694fb461d343ce33e1b35 | [
"CC0-1.0"
] | null | null | null | base/tests/utils/security/test_caesar_cypher.py | PeterStuck/teacher-app | e71c5b69019450a9ac8694fb461d343ce33e1b35 | [
"CC0-1.0"
] | null | null | null | from django.test import TestCase
from base.utils.security.caesar_cypher import CaesarCypher, ALL_UPPERCASE_LETTERS
from filler.utils.errors.argument_error import InvalidArgumentError
class TestCaesarCypher(TestCase):
def setUp(self) -> None:
self.cypher = CaesarCypher()
self.cypher.shift = 5
... | 43.647059 | 114 | 0.693396 |
03fc6d038b941b72a65c7d99fe57377402013b54 | 215 | py | Python | swine/component/physics/collider/__init__.py | DeflatedPickle/swine | 28b40fff605f7ed9c006e032c11a5ff9c552ebac | [
"MIT"
] | 4 | 2019-07-14T13:39:43.000Z | 2021-11-08T15:57:17.000Z | swine/component/physics/collider/__init__.py | SwineEngine/swine | 28b40fff605f7ed9c006e032c11a5ff9c552ebac | [
"MIT"
] | 1 | 2018-01-09T14:33:54.000Z | 2018-01-09T14:34:34.000Z | swine/component/physics/collider/__init__.py | SwineProject/swine | 28b40fff605f7ed9c006e032c11a5ff9c552ebac | [
"MIT"
] | 1 | 2018-07-22T20:53:10.000Z | 2018-07-22T20:53:10.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .base_collider import BaseCollider
from .polygon_collider import PolygonCollider
from .box_collider import BoxCollider
from .circle_collider import CircleCollider
| 26.875 | 45 | 0.804651 |
016bb6eb84add6173b5a99dbc3ee34664b65b2d4 | 1,724 | py | Python | utils/embeddedBot.py | Fantailed/fallback-chatbot | 596ed6566f61ee3491b7964df74efae05b64721f | [
"Apache-2.0"
] | 1 | 2018-11-29T15:35:16.000Z | 2018-11-29T15:35:16.000Z | utils/embeddedBot.py | Fantailed/fallback-chatbot | 596ed6566f61ee3491b7964df74efae05b64721f | [
"Apache-2.0"
] | null | null | null | utils/embeddedBot.py | Fantailed/fallback-chatbot | 596ed6566f61ee3491b7964df74efae05b64721f | [
"Apache-2.0"
] | null | null | null | import sys
from globals import *
from programy.clients.events.console.client import ConsoleBotClient
from programy.config.file.yaml_file import YamlConfigurationFile
from programy.config.programy import ProgramyConfiguration
from programy.clients.args import CommandLineClientArguments
sys.path.append('venv/Lib/site-p... | 31.925926 | 75 | 0.691415 |
2b27fab7731739d30a92569b18ade0377eb13870 | 1,734 | py | Python | pycs/info.py | sfarrens/cosmostat | a475315cda06dca346095a1e83cb6ad23979acae | [
"MIT"
] | null | null | null | pycs/info.py | sfarrens/cosmostat | a475315cda06dca346095a1e83cb6ad23979acae | [
"MIT"
] | null | null | null | pycs/info.py | sfarrens/cosmostat | a475315cda06dca346095a1e83cb6ad23979acae | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Module current version
version_major = 0
version_minor = 0
version_micro = 1
# Expected by setup.py: string of form "X.Y.Z"
__version__ = "{0}.{0}.{1}".format(version_major, version_minor, version_micro)
# Expected by setup.py: the status of the project
CLASSIFIERS = ["Development Status ::... | 24.422535 | 79 | 0.668397 |
f8ef724448d15d0bca38c372abb6aef58a77925c | 9,655 | py | Python | demo/output_multi_image_result copy.py | ArthurWish/mmdetection | bd4c5b04e9d880f7a38131f17d3b43e4a3630c4f | [
"Apache-2.0"
] | null | null | null | demo/output_multi_image_result copy.py | ArthurWish/mmdetection | bd4c5b04e9d880f7a38131f17d3b43e4a3630c4f | [
"Apache-2.0"
] | null | null | null | demo/output_multi_image_result copy.py | ArthurWish/mmdetection | bd4c5b04e9d880f7a38131f17d3b43e4a3630c4f | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
import copy
import warnings
from PIL import Image
from matplotlib import patches
from mmcv.ops.nms import nms
from mmcv.ops import RoIPool
from mmcv.parallel import collate, scatter
import torch
from tqdm import tqdm
import matplotlib.pyplot as plt
import cv2
from mmdet.a... | 38.162055 | 101 | 0.64029 |
2ef32b9ce3273f0babb8b7875cd83e41aff84dc0 | 63,931 | py | Python | venv/lib/python3.6/site-packages/cffi/recompiler.py | aitoehigie/britecore_flask | eef1873dbe6b2cc21f770bc6dec783007ae4493b | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/cffi/recompiler.py | aitoehigie/britecore_flask | eef1873dbe6b2cc21f770bc6dec783007ae4493b | [
"MIT"
] | 1 | 2021-06-01T23:32:38.000Z | 2021-06-01T23:32:38.000Z | venv/lib/python3.6/site-packages/cffi/recompiler.py | aitoehigie/britecore_flask | eef1873dbe6b2cc21f770bc6dec783007ae4493b | [
"MIT"
] | null | null | null | import os, sys, io
from . import ffiplatform, model
from .error import VerificationError
from .cffi_opcode import *
VERSION_BASE = 0x2601
VERSION_EMBEDDED = 0x2701
VERSION_CHAR16CHAR32 = 0x2801
class GlobalExpr:
def __init__(self, name, address, type_op, size=0, check_value=0):
self.name = name
s... | 37.408426 | 92 | 0.537877 |
84ebc98ba4b40d2e179aa1d69eba9bb0f3f06e67 | 2,462 | py | Python | var/spack/repos/builtin/packages/r-phyloseq/package.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 9 | 2018-04-18T07:51:40.000Z | 2021-09-10T03:56:57.000Z | var/spack/repos/builtin/packages/r-phyloseq/package.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 907 | 2018-04-18T11:17:57.000Z | 2022-03-31T13:20:25.000Z | var/spack/repos/builtin/packages/r-phyloseq/package.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 29 | 2018-11-05T16:14:23.000Z | 2022-02-03T16:07:09.000Z | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RPhyloseq(RPackage):
"""Handling and analysis of high-throughput microbiome census data.
... | 49.24 | 80 | 0.636474 |
2316de5fe3f67c16d0c74faeca2e76e7be8c4df2 | 683 | py | Python | lang-support/python3/mapper-suffix.py | benguillet/wmr-backend | bc8c1998d58877416358adbfdcd0d7da4e8c369e | [
"Apache-2.0"
] | 1 | 2017-06-02T19:31:08.000Z | 2017-06-02T19:31:08.000Z | lang-support/python3/mapper-suffix.py | benguillet/wmr-backend | bc8c1998d58877416358adbfdcd0d7da4e8c369e | [
"Apache-2.0"
] | null | null | null | lang-support/python3/mapper-suffix.py | benguillet/wmr-backend | bc8c1998d58877416358adbfdcd0d7da4e8c369e | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 WebMapReduce 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 agreed to in wri... | 35.947368 | 74 | 0.770132 |
6715d4b8adc20b9a8b7ff430677cf33c710ae6c0 | 6,108 | py | Python | lib/btstack/3rd-party/micro-ecc/scripts/mult_arm.py | thiamchi/micropython_custom | b2d3ac286268502029a2215adb710c15f21ccae0 | [
"MIT"
] | 7 | 2020-10-02T13:42:54.000Z | 2021-04-01T01:33:42.000Z | lib/btstack/3rd-party/micro-ecc/scripts/mult_arm.py | thiamchi/micropython_custom | b2d3ac286268502029a2215adb710c15f21ccae0 | [
"MIT"
] | 1 | 2021-06-19T19:03:10.000Z | 2021-06-19T19:29:10.000Z | lib/btstack/3rd-party/micro-ecc/scripts/mult_arm.py | thiamchi/micropython_custom | b2d3ac286268502029a2215adb710c15f21ccae0 | [
"MIT"
] | 7 | 2021-01-17T03:35:04.000Z | 2022-03-20T06:02:33.000Z | #!/usr/bin/env python
import sys
if len(sys.argv) < 2:
print "Provide the integer size in 32-bit words"
sys.exit(1)
size = int(sys.argv[1])
full_rows = size // 3
init_size = size % 3
if init_size == 0:
full_rows = full_rows - 1
init_size = 3
def emit(line, *args):
s = '"' + line + r' \n\t"'
... | 32.31746 | 100 | 0.48019 |
562ac53f6b9907c6e990785ceaf75d3904bf5d95 | 369 | py | Python | Python3/src/monitorExample.py | emanuelen5/XPlaneConnect | 0d462ac306bc802a3b269227d3b98d2507abcd40 | [
"Unlicense"
] | 457 | 2015-01-02T14:21:11.000Z | 2022-03-27T02:56:47.000Z | Python3/src/monitorExample.py | fseconomy/XPlaneConnect | 11a5f350bd6888873d293bf3c9f59b0fba1331c1 | [
"Unlicense"
] | 211 | 2015-03-24T16:41:33.000Z | 2022-03-27T18:36:11.000Z | Python3/src/monitorExample.py | fseconomy/XPlaneConnect | 11a5f350bd6888873d293bf3c9f59b0fba1331c1 | [
"Unlicense"
] | 258 | 2015-01-01T17:02:27.000Z | 2022-03-31T19:36:03.000Z | import sys
import xpc
def monitor():
with xpc.XPlaneConnect() as client:
while True:
posi = client.getPOSI();
ctrl = client.getCTRL();
print("Loc: (%4f, %4f, %4f) Aileron:%2f Elevator:%2f Rudder:%2f\n"\
% (posi[0], posi[1], posi[2], ctrl[1], ctrl[0], ctr... | 23.0625 | 79 | 0.531165 |
7a8f638690c37b622e3e0b042dcaf00145eb5196 | 9,003 | py | Python | scripts/package_build.py | rsund/duckdb | e4ba94a4f4540fe6d34fb2f6b7abf18e00ad3ca9 | [
"MIT"
] | null | null | null | scripts/package_build.py | rsund/duckdb | e4ba94a4f4540fe6d34fb2f6b7abf18e00ad3ca9 | [
"MIT"
] | null | null | null | scripts/package_build.py | rsund/duckdb | e4ba94a4f4540fe6d34fb2f6b7abf18e00ad3ca9 | [
"MIT"
] | null | null | null | import os
import sys
import shutil
import subprocess
from python_helpers import open_utf8
excluded_objects = ['utf8proc_data.cpp']
def get_libraries(binary_dir, libraries, extensions):
result_libs = []
def find_library_recursive(search_dir, potential_libnames):
flist = os.listdir(search_dir)
f... | 37.987342 | 111 | 0.641786 |
4e74731bf709711886846c15de21529d656ded35 | 18,254 | py | Python | src/compiler.py | lkpdn/t4p4s | 9df8eefd891e44b8a59b4b8edfb90150b7e484e8 | [
"Apache-2.0"
] | null | null | null | src/compiler.py | lkpdn/t4p4s | 9df8eefd891e44b8a59b4b8edfb90150b7e484e8 | [
"Apache-2.0"
] | null | null | null | src/compiler.py | lkpdn/t4p4s | 9df8eefd891e44b8a59b4b8edfb90150b7e484e8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Eotvos Lorand University, Budapest, Hungary
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 32.250883 | 160 | 0.626876 |
6e79d5edeee77f39fa5a5db61c63437dcc74162f | 668 | py | Python | full/django-get-started/solution/manage.py | GeekTrainer/workshop-library | 73aa44b7f89c03f2851e63a0944c539198efecb5 | [
"MIT"
] | 106 | 2021-11-18T01:29:46.000Z | 2022-03-31T03:21:08.000Z | full/django-get-started/solution/manage.py | GeekTrainer/workshop-library | 73aa44b7f89c03f2851e63a0944c539198efecb5 | [
"MIT"
] | 39 | 2021-12-17T01:28:54.000Z | 2022-03-31T19:45:40.000Z | full/django-get-started/solution/manage.py | GeekTrainer/workshop-library | 73aa44b7f89c03f2851e63a0944c539198efecb5 | [
"MIT"
] | 70 | 2021-11-12T16:25:09.000Z | 2022-03-31T01:29:04.000Z | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'helloproject.settings')
try:
from django.core.management import execute_from_command_line
except... | 29.043478 | 76 | 0.681138 |
2081bee8132f621073428902782033e2581c8188 | 196,047 | py | Python | kubernetes/client/apis/rbac_authorization_v1beta1_api.py | jraby/kubernetes-client-python | e6e7b710d0b15fbde686bc9dccf00da5951bef84 | [
"Apache-2.0"
] | null | null | null | kubernetes/client/apis/rbac_authorization_v1beta1_api.py | jraby/kubernetes-client-python | e6e7b710d0b15fbde686bc9dccf00da5951bef84 | [
"Apache-2.0"
] | null | null | null | kubernetes/client/apis/rbac_authorization_v1beta1_api.py | jraby/kubernetes-client-python | e6e7b710d0b15fbde686bc9dccf00da5951bef84 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.7.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import sys
import os
im... | 51.469415 | 457 | 0.612572 |
721a38af4f9d1dbd2117b957553385e36931c997 | 19,837 | py | Python | third_party/WebKit/Source/devtools/scripts/compile_frontend.py | wenfeifei/miniblink49 | 2ed562ff70130485148d94b0e5f4c343da0c2ba4 | [
"Apache-2.0"
] | 5,964 | 2016-09-27T03:46:29.000Z | 2022-03-31T16:25:27.000Z | third_party/WebKit/Source/devtools/scripts/compile_frontend.py | w4454962/miniblink49 | b294b6eacb3333659bf7b94d670d96edeeba14c0 | [
"Apache-2.0"
] | 459 | 2016-09-29T00:51:38.000Z | 2022-03-07T14:37:46.000Z | third_party/WebKit/Source/devtools/scripts/compile_frontend.py | w4454962/miniblink49 | b294b6eacb3333659bf7b94d670d96edeeba14c0 | [
"Apache-2.0"
] | 1,006 | 2016-09-27T05:17:27.000Z | 2022-03-30T02:46:51.000Z | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list ... | 38.668616 | 159 | 0.702475 |
334a5c13275a6676b290f2fe215acc3e07db5278 | 4,043 | py | Python | setup.py | ayushev/python-optiga-trust | 51ca647fde05cf6dce325baa6a9dd72bce3efa07 | [
"MIT"
] | null | null | null | setup.py | ayushev/python-optiga-trust | 51ca647fde05cf6dce325baa6a9dd72bce3efa07 | [
"MIT"
] | null | null | null | setup.py | ayushev/python-optiga-trust | 51ca647fde05cf6dce325baa6a9dd72bce3efa07 | [
"MIT"
] | 1 | 2020-08-24T12:19:48.000Z | 2020-08-24T12:19:48.000Z | from setuptools import setup, find_packages
from setuptools.command.install import install
import platform
import sys
import os
import shutil
def __get_arch_os():
platforms = {
'linux': 'Linux',
'linux1': 'Linux',
'linux2': 'Linux',
'darwin': 'OSX',
'cygwin'... | 27.882759 | 100 | 0.604502 |
17075df6e17f147ba0c3d78bba28717deda4ed67 | 620 | py | Python | utils/migrations/0003_newsletter.py | manishwins/Greenline | 28085358eb6d8e500075067747f242e457117c44 | [
"Apache-2.0"
] | null | null | null | utils/migrations/0003_newsletter.py | manishwins/Greenline | 28085358eb6d8e500075067747f242e457117c44 | [
"Apache-2.0"
] | null | null | null | utils/migrations/0003_newsletter.py | manishwins/Greenline | 28085358eb6d8e500075067747f242e457117c44 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.1.7 on 2021-04-28 05:12
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('utils', '0002_city_country_state'),
]
operations = [
migrations.CreateModel(
name='NewsLetter',
fields=[
... | 25.833333 | 114 | 0.554839 |
8d142c143f00c1e12fe8cfa96e14352cfad86826 | 649 | py | Python | lib/SceneGraphParser/test1.py | xzhEmma/Text2Scene | 0e67877543d69ccac0db08204815cf0091b96778 | [
"MIT",
"Unlicense"
] | null | null | null | lib/SceneGraphParser/test1.py | xzhEmma/Text2Scene | 0e67877543d69ccac0db08204815cf0091b96778 | [
"MIT",
"Unlicense"
] | null | null | null | lib/SceneGraphParser/test1.py | xzhEmma/Text2Scene | 0e67877543d69ccac0db08204815cf0091b96778 | [
"MIT",
"Unlicense"
] | null | null | null | import sng_parser
import urllib.request
import urllib.parse
import json
def translation(content):
url = 'http://fanyi.youdao.com/translate?smartresult=dict&smartresult=rule'
data = {'i': content, 'doctype': 'json'} # 定义一个字典,将data数据存入
data = urllib.parse.urlencode(data).encode('utf-8')
res... | 30.904762 | 80 | 0.684129 |
e4c6dea2da56a1651f9de450002cad01220ae8b7 | 5,582 | py | Python | configs/RS-data/Faster-RCNN/SENet/se-resnet101-backbone-R32.py | SuzaKrish/mmdetection | 31c16891d7493252262e738bcbf05326dba866b2 | [
"Apache-2.0"
] | null | null | null | configs/RS-data/Faster-RCNN/SENet/se-resnet101-backbone-R32.py | SuzaKrish/mmdetection | 31c16891d7493252262e738bcbf05326dba866b2 | [
"Apache-2.0"
] | null | null | null | configs/RS-data/Faster-RCNN/SENet/se-resnet101-backbone-R32.py | SuzaKrish/mmdetection | 31c16891d7493252262e738bcbf05326dba866b2 | [
"Apache-2.0"
] | null | null | null | # model settings
model = dict(
type='FasterRCNN',
pretrained='torchvision://resnet101',
backbone=dict(
type='ResNet',
depth=101,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=True),
style='pytorch',
... | 30.336957 | 78 | 0.587603 |
cc17ac03cdd682bb817b1ab899e83c1fe075507d | 845 | py | Python | repo/script.module.liveresolver/lib/liveresolver/resolvers/streamup.py | Hades01/Addons | 710da97ac850197498a3cd64be1811c593610add | [
"Apache-2.0"
] | 3 | 2020-03-03T13:21:44.000Z | 2021-07-21T09:53:31.000Z | repo/script.module.liveresolver/lib/liveresolver/resolvers/streamup.py | Hades01/Addons | 710da97ac850197498a3cd64be1811c593610add | [
"Apache-2.0"
] | null | null | null | repo/script.module.liveresolver/lib/liveresolver/resolvers/streamup.py | Hades01/Addons | 710da97ac850197498a3cd64be1811c593610add | [
"Apache-2.0"
] | 2 | 2020-04-01T22:11:12.000Z | 2020-05-07T23:54:52.000Z | # -*- coding: utf-8 -*-
import re,urlparse,urllib
from liveresolver.modules import client
from liveresolver.modules.log_utils import log
def resolve(url):
#try:
id = re.findall('streamup.com/([^$/]+)',url)[0]
playUrl = 'https://streamup.com/%s/embeds/video?startMuted=true'%id
url = 'htt... | 29.137931 | 85 | 0.575148 |
f1ce2f4e8cf9da450cf2a67fc53c6997e31ba75c | 14,525 | py | Python | tools/perf/page_sets/webrtc_cases.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 14,668 | 2015-01-01T01:57:10.000Z | 2022-03-31T23:33:32.000Z | tools/perf/page_sets/webrtc_cases.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 113 | 2015-05-04T09:58:14.000Z | 2022-01-31T19:35:03.000Z | tools/perf/page_sets/webrtc_cases.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 5,941 | 2015-01-02T11:32:21.000Z | 2022-03-31T16:35:46.000Z | # Copyright 2014 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.
from page_sets import press_story
from telemetry import story
class WebrtcPage(press_story.PressStory):
def __init__(self, url, page_set, name, tags, ex... | 41.979769 | 83 | 0.637522 |
76524b0aca9bf97c7490dfe5890b0259037fe95a | 4,698 | py | Python | lib/python3.8/site-packages/ansible_collections/arista/eos/plugins/module_utils/network/eos/providers/cli/config/bgp/address_family.py | cjsteel/python3-venv-ansible-2.10.5 | c95395c4cae844dc66fddde9b4343966f4b2ecd5 | [
"Apache-1.1"
] | null | null | null | lib/python3.8/site-packages/ansible_collections/arista/eos/plugins/module_utils/network/eos/providers/cli/config/bgp/address_family.py | cjsteel/python3-venv-ansible-2.10.5 | c95395c4cae844dc66fddde9b4343966f4b2ecd5 | [
"Apache-1.1"
] | null | null | null | lib/python3.8/site-packages/ansible_collections/arista/eos/plugins/module_utils/network/eos/providers/cli/config/bgp/address_family.py | cjsteel/python3-venv-ansible-2.10.5 | c95395c4cae844dc66fddde9b4343966f4b2ecd5 | [
"Apache-1.1"
] | null | null | null | #
# (c) 2019, Ansible by Red Hat, inc
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import re
from ansible.module_utils.six import iteritems
from ansible_collections.ansible.netcommon... | 32.625 | 112 | 0.560877 |
a821a048d7270959660b47f1a39bfdee9a00d50e | 4,382 | py | Python | src/arch/arm/ArmTLB.py | He-Liu-ooo/Computer-Architecture-THUEE-2022-spring- | 9d36aaacbc7eea357608524113bec97bae2ea229 | [
"BSD-3-Clause"
] | 4 | 2020-12-25T03:12:00.000Z | 2022-01-07T03:35:35.000Z | src/arch/arm/ArmTLB.py | He-Liu-ooo/Computer-Architecture-THUEE-2022-spring- | 9d36aaacbc7eea357608524113bec97bae2ea229 | [
"BSD-3-Clause"
] | 3 | 2021-03-26T20:33:59.000Z | 2022-01-24T22:54:03.000Z | src/arch/arm/ArmTLB.py | He-Liu-ooo/Computer-Architecture-THUEE-2022-spring- | 9d36aaacbc7eea357608524113bec97bae2ea229 | [
"BSD-3-Clause"
] | 3 | 2021-03-27T16:36:19.000Z | 2022-03-28T18:32:57.000Z | # -*- mode:python -*-
# Copyright (c) 2009, 2013, 2015 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware i... | 41.733333 | 77 | 0.75194 |
fae60d1e2c493919852844c43eb132afcf8fb599 | 2,778 | py | Python | mergeMetadata/modules/utils/utilities.py | isabella232/ALM-SF-DX-Python-Tools | 8a29c1d056653999542e9d7048641d5fb5c36bed | [
"Apache-2.0"
] | null | null | null | mergeMetadata/modules/utils/utilities.py | isabella232/ALM-SF-DX-Python-Tools | 8a29c1d056653999542e9d7048641d5fb5c36bed | [
"Apache-2.0"
] | 1 | 2021-02-23T18:15:06.000Z | 2021-02-23T18:15:06.000Z | mergeMetadata/modules/utils/utilities.py | isabella232/ALM-SF-DX-Python-Tools | 8a29c1d056653999542e9d7048641d5fb5c36bed | [
"Apache-2.0"
] | null | null | null | import os
from modules.utils import XMLNS
from modules.utils.exceptions import NoFullNameError
MAP_COMPOSED_FULLNAME = {
'actionOverrides' : { 'main' : 'actionName', 'secondary' : 'formFactor' },
'layoutAssignments' : { 'main' : 'layout', 'secondary' : 'recordType' }
}
MAP_FULLNAME = {
'applicationVisibil... | 34.725 | 78 | 0.656947 |
0130af1a2ad5ebce044e8298c3db2e6a0fbf34a6 | 2,871 | py | Python | embedding-calculator/src/services/facescan/plugins/agegender/agegender.py | em3ndez/CompreFace | 503153ebbe158d091155d924576610d7d7a88e4d | [
"Apache-2.0"
] | 1 | 2021-09-06T12:40:42.000Z | 2021-09-06T12:40:42.000Z | embedding-calculator/src/services/facescan/plugins/agegender/agegender.py | em3ndez/CompreFace | 503153ebbe158d091155d924576610d7d7a88e4d | [
"Apache-2.0"
] | null | null | null | embedding-calculator/src/services/facescan/plugins/agegender/agegender.py | em3ndez/CompreFace | 503153ebbe158d091155d924576610d7d7a88e4d | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 the original author or 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | 36.341772 | 89 | 0.678858 |
8e9f56d9b92233327c33f6a2ecbea3ca6a4e0652 | 1,102 | py | Python | tests/core/tests/fields_tests.py | PlantandFoodResearch/django-import-export | b4a1bd44a04df53d5fb40ba349749c759a72f18f | [
"BSD-2-Clause"
] | null | null | null | tests/core/tests/fields_tests.py | PlantandFoodResearch/django-import-export | b4a1bd44a04df53d5fb40ba349749c759a72f18f | [
"BSD-2-Clause"
] | 1 | 2020-04-09T04:45:36.000Z | 2020-04-09T04:45:36.000Z | tests/core/tests/fields_tests.py | PlantandFoodResearch/django-import-export | b4a1bd44a04df53d5fb40ba349749c759a72f18f | [
"BSD-2-Clause"
] | null | null | null | from __future__ import unicode_literals
from datetime import date
from django.test import TestCase
from import_export import fields
class Obj:
def __init__(self, name, date=None):
self.name = name
self.date = date
class FieldTest(TestCase):
def setUp(self):
self.field = fields.F... | 25.045455 | 71 | 0.604356 |
d6bd86eb1ec397b3e91d44cd97cc4cf30a113764 | 1,224 | py | Python | load_balancer.py | dgomes/load-balancer | fca48a8bf5e035d5a493b2febaece8eaad0ef453 | [
"MIT"
] | null | null | null | load_balancer.py | dgomes/load-balancer | fca48a8bf5e035d5a493b2febaece8eaad0ef453 | [
"MIT"
] | null | null | null | load_balancer.py | dgomes/load-balancer | fca48a8bf5e035d5a493b2febaece8eaad0ef453 | [
"MIT"
] | null | null | null | # coding: utf-8
import socket
import logging
# configure logger output format
logging.basicConfig(level=logging.DEBUG,format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s',datefmt='%m-%d %H:%M:%S')
def main(addr, servers):
# create a logger
logger = logging.getLogger('Load Balancer')
# connect t... | 29.853659 | 126 | 0.638889 |
a65c326385777a1cb463be0caa8c5db71401bbe8 | 6,641 | py | Python | BasicImageManipulation/code/Task4and5.py | coderkhaleesi/Computer-Vision-Traditional-Techniques | ac24334e2f1762ad8ae450b6a01c9086474c132c | [
"MIT"
] | null | null | null | BasicImageManipulation/code/Task4and5.py | coderkhaleesi/Computer-Vision-Traditional-Techniques | ac24334e2f1762ad8ae450b6a01c9086474c132c | [
"MIT"
] | null | null | null | BasicImageManipulation/code/Task4and5.py | coderkhaleesi/Computer-Vision-Traditional-Techniques | ac24334e2f1762ad8ae450b6a01c9086474c132c | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import cv2
#please make sure to keep the face images in the same folder as code
#before running this
#Task 4
#Part 1
I = cv2.imread('face 02 7043565.jpg', 1);
I = cv2.cvtColor(I, cv2.COLOR_BGR2RGB)
I = np.clip(I, 0, 255)
J = I[50:600, 200:800]
#cropped... | 29.914414 | 197 | 0.70652 |
15ade09ea9986ac1337436691bde0d628f9b6cda | 585 | py | Python | arelle/examples/plugin/packagedImportTest/importTestImported11.py | DataFinnovation/Arelle | d4bf45f56fc9249f75ab22e6217dbe55f0510841 | [
"Apache-2.0"
] | 292 | 2015-01-27T03:31:51.000Z | 2022-03-26T07:00:05.000Z | arelle/examples/plugin/packagedImportTest/importTestImported11.py | DataFinnovation/Arelle | d4bf45f56fc9249f75ab22e6217dbe55f0510841 | [
"Apache-2.0"
] | 94 | 2015-04-18T23:03:00.000Z | 2022-03-28T17:24:55.000Z | arelle/examples/plugin/packagedImportTest/importTestImported11.py | DataFinnovation/Arelle | d4bf45f56fc9249f75ab22e6217dbe55f0510841 | [
"Apache-2.0"
] | 200 | 2015-01-13T03:55:47.000Z | 2022-03-29T12:38:56.000Z | '''
pluginPackages test case
(c) Copyright 2012 Mark V Systems Limited, All rights reserved.
'''
def foo():
print ("imported packaged plug-in relative imported 1.1")
__pluginInfo__ = {
'name': 'Package Relative Import 1.1',
'version': '0.9',
'description': "This is a packaged relative import... | 27.857143 | 84 | 0.646154 |
ddeea2756d4c5d64b46cda43cec9f8cfa106bbba | 81 | py | Python | tests/periodicities/Hour/Cycle_Hour_400_H_5.py | shaido987/pyaf | b9afd089557bed6b90b246d3712c481ae26a1957 | [
"BSD-3-Clause"
] | 377 | 2016-10-13T20:52:44.000Z | 2022-03-29T18:04:14.000Z | tests/periodicities/Hour/Cycle_Hour_400_H_5.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 160 | 2016-10-13T16:11:53.000Z | 2022-03-28T04:21:34.000Z | tests/periodicities/Hour/Cycle_Hour_400_H_5.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 63 | 2017-03-09T14:51:18.000Z | 2022-03-27T20:52:57.000Z | import tests.periodicities.period_test as per
per.buildModel((5 , 'H' , 400));
| 16.2 | 45 | 0.716049 |
e1aff8fc1e669176b13827b97cf124612e50e361 | 66 | py | Python | 13/00/0.py | pylangstudy/201710 | 139cad34d40f23beac85800633ec2ed63d530bfd | [
"CC0-1.0"
] | null | null | null | 13/00/0.py | pylangstudy/201710 | 139cad34d40f23beac85800633ec2ed63d530bfd | [
"CC0-1.0"
] | 25 | 2017-10-03T00:12:53.000Z | 2017-10-29T23:58:17.000Z | 13/00/0.py | pylangstudy/201710 | 139cad34d40f23beac85800633ec2ed63d530bfd | [
"CC0-1.0"
] | null | null | null | import fileinput
for line in fileinput.input():
print(line)
| 11 | 30 | 0.712121 |
94e8ba0b2d8559da06bd9ceccf30e82fdb4ab099 | 180,821 | py | Python | psx/_dump_/51/_dump_ida_/make_psx.py | maoa3/scalpel | 2e7381b516cded28996d290438acc618d00b2aa7 | [
"Unlicense"
] | 15 | 2018-06-28T01:11:25.000Z | 2021-09-27T15:57:18.000Z | psx/_dump_/51/_dump_ida_/make_psx.py | maoa3/scalpel | 2e7381b516cded28996d290438acc618d00b2aa7 | [
"Unlicense"
] | 7 | 2018-06-29T04:08:23.000Z | 2019-10-17T13:57:22.000Z | psx/_dump_/51/_dump_ida_/make_psx.py | maoa3/scalpel | 2e7381b516cded28996d290438acc618d00b2aa7 | [
"Unlicense"
] | 7 | 2018-06-28T01:11:34.000Z | 2020-05-23T09:21:48.000Z | set_name(0x8007DBFC, "GetTpY__FUs", SN_NOWARN)
set_name(0x8007DC18, "GetTpX__FUs", SN_NOWARN)
set_name(0x8007DC24, "Remove96__Fv", SN_NOWARN)
set_name(0x8007DC5C, "AppMain", SN_NOWARN)
set_name(0x8007DD04, "MAIN_RestartGameTask__Fv", SN_NOWARN)
set_name(0x8007DD30, "GameTask__FP4TASK", SN_NOWARN)
set_name(0x8007DE24, "... | 53.355267 | 94 | 0.831369 |
7a50ba5f2cb887022932cc033126ca44666734ea | 426 | py | Python | mundos/mundo-1/exercicio-014.py | pedrosantanaabreu/curso-em-video-python | fd68f9753a1c71ca94dfa40f23eb8c398cea6086 | [
"MIT"
] | 1 | 2022-03-23T22:48:23.000Z | 2022-03-23T22:48:23.000Z | mundos/mundo-1/exercicio-014.py | pedrosantanaabreu/curso-em-video-python | fd68f9753a1c71ca94dfa40f23eb8c398cea6086 | [
"MIT"
] | null | null | null | mundos/mundo-1/exercicio-014.py | pedrosantanaabreu/curso-em-video-python | fd68f9753a1c71ca94dfa40f23eb8c398cea6086 | [
"MIT"
] | null | null | null | """
@Pedro Santana Abreu (https://linktr.ee/pedrosantanaabreu)
@Curso em Vídeo (https://cursoemvideo.com)
PT-BR:
Escreva um programa que converta uma temperatura digitada em C para F.
"""
# Recebendo valores
celsius = float(input('Digite a temperatura em celsius: '))
# Convertendo
fahrenheit = (celsius * 9/5) + 32
... | 25.058824 | 93 | 0.730047 |
c2ace02c1896059a4f3b02fa12b604e39eedb84f | 5,107 | py | Python | tests/contrib/flask/test_static.py | ocelotl/opentelemetry-auto-instr-python-1 | f5c47bd1ee492ffde298794f283031c22891f60b | [
"BSD-3-Clause"
] | 2 | 2020-03-04T17:33:22.000Z | 2021-01-20T14:20:10.000Z | tests/contrib/flask/test_static.py | ocelotl/opentelemetry-auto-instr-python-1 | f5c47bd1ee492ffde298794f283031c22891f60b | [
"BSD-3-Clause"
] | 4 | 2019-11-25T00:11:16.000Z | 2021-05-13T20:43:50.000Z | tests/contrib/flask/test_static.py | ocelotl/opentelemetry-auto-instr-python-1 | f5c47bd1ee492ffde298794f283031c22891f60b | [
"BSD-3-Clause"
] | 3 | 2020-02-05T14:54:25.000Z | 2020-03-23T02:51:27.000Z | # Copyright 2019, OpenTelemetry 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 i... | 47.287037 | 94 | 0.692187 |
b4fe2971f14c9e4b5cb0f8134907818b9100d7a1 | 749 | py | Python | setup.py | dwkim78/UPSILoN-T | 839ebb31360195f4cd668e255ede4ed14a46ba61 | [
"MIT"
] | 3 | 2021-09-09T06:16:15.000Z | 2021-12-17T04:40:57.000Z | setup.py | dwkim78/UPSILoN-T | 839ebb31360195f4cd668e255ede4ed14a46ba61 | [
"MIT"
] | null | null | null | setup.py | dwkim78/UPSILoN-T | 839ebb31360195f4cd668e255ede4ed14a46ba61 | [
"MIT"
] | null | null | null | from setuptools import find_packages, setup
setup(
name='upsilont',
version='0.1.0',
description='UPSILoN-T',
long_description='',
platforms=['any'],
packages=find_packages(),
include_package_data=True,
url='https://github.com/dwkim78/UPSILoN-T',
license='Apache v2.0',
author='... | 29.96 | 76 | 0.620828 |
7817379573a385d3433d0e1a63d2429621cf3e4b | 675 | py | Python | build/__main__.py | dantegates/dantegates.github.io | ef81968a060cdd6c107c1ce865866a87947ad547 | [
"MIT"
] | null | null | null | build/__main__.py | dantegates/dantegates.github.io | ef81968a060cdd6c107c1ce865866a87947ad547 | [
"MIT"
] | null | null | null | build/__main__.py | dantegates/dantegates.github.io | ef81968a060cdd6c107c1ce865866a87947ad547 | [
"MIT"
] | 1 | 2018-07-25T20:16:56.000Z | 2018-07-25T20:16:56.000Z | import os
from .config import POSTS
def build(posts=POSTS):
for post in posts:
if os.path.exists(post.target) and not post.rebuild:
continue
print(f'building: {post.title}')
# must remap static files first before writing content
for static_filename, data in post.static... | 27 | 63 | 0.582222 |
a8c54b3e813d4060d38bd915b7f02a164e6cc94a | 25,800 | py | Python | allennlp/models/reading_comprehension/docqa++BERT.py | alontalmor/allennlp | 3beb3ffff3ef45311c148301e91562b2000dff3b | [
"Apache-2.0"
] | null | null | null | allennlp/models/reading_comprehension/docqa++BERT.py | alontalmor/allennlp | 3beb3ffff3ef45311c148301e91562b2000dff3b | [
"Apache-2.0"
] | null | null | null | allennlp/models/reading_comprehension/docqa++BERT.py | alontalmor/allennlp | 3beb3ffff3ef45311c148301e91562b2000dff3b | [
"Apache-2.0"
] | null | null | null | import logging
from allennlp.common.elastic_logger import ElasticLogger
from typing import Any, Dict, List
import numpy as np
from overrides import overrides
import torch
import torch.nn.functional as F
from torch.nn.functional import nll_loss
import os
import random
import traceback
import json
from allennlp.common.c... | 55.603448 | 143 | 0.61655 |
cf78d1e4e162b0eba2c68cdacfd3c0943b1855dd | 520 | py | Python | leet/strings/reverseVowels.py | monishshah18/python-cp-cheatsheet | a5514b08816959de1198156f7764c54a7a585f20 | [
"Apache-2.0"
] | 140 | 2020-10-21T13:23:52.000Z | 2022-03-31T15:09:45.000Z | leet/strings/reverseVowels.py | stacykutyepov/python-cp-cheatsheet | a00a57e1b36433648d1cace331e15ff276cef189 | [
"Apache-2.0"
] | 1 | 2021-07-22T14:01:25.000Z | 2021-07-22T14:01:25.000Z | leet/strings/reverseVowels.py | stacykutyepov/python-cp-cheatsheet | a00a57e1b36433648d1cace331e15ff276cef189 | [
"Apache-2.0"
] | 33 | 2020-10-21T14:17:02.000Z | 2022-03-25T11:25:03.000Z | class Solution:
def reverseVowels(self, s: str) -> str:
l, r = 0, len(s) - 1
vowels = set('aeiouAEIOU')
ans = list(s)
while l<r:
if s[l] not in vowels:
l += 1
if s[r] not in vowels:
r -= 1
... | 26 | 62 | 0.334615 |
e3226a7925ab92fa294cf625aad28992b0b51330 | 7,535 | py | Python | fairseq/data/style_transfer_dataset.py | jwcmu/bgt | 39a9ce72df3d89e410ed3791f9f856b05b37ed94 | [
"MIT"
] | 9 | 2020-11-23T23:17:45.000Z | 2022-03-09T07:14:27.000Z | fairseq/data/style_transfer_dataset.py | jwcmu/bgt | 39a9ce72df3d89e410ed3791f9f856b05b37ed94 | [
"MIT"
] | 2 | 2020-12-03T10:41:12.000Z | 2021-04-14T05:35:24.000Z | fairseq/data/style_transfer_dataset.py | jwcmu/bgt | 39a9ce72df3d89e410ed3791f9f856b05b37ed94 | [
"MIT"
] | 1 | 2021-09-10T13:46:51.000Z | 2021-09-10T13:46:51.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import numpy as np
import torch
from . import data_utils, FairseqDataset
def collate(
samples, pad_idx, eos_idx, left_pad_source=True,
... | 39.867725 | 101 | 0.61858 |
686966fd386320d47bd1d4502191b10a68a6c121 | 88,995 | py | Python | Lib/test/test_posix.py | rng-dynamics/RustPython | 6165aadcc4e80e0f48f3e784e17b3c7f80d21a8a | [
"CC-BY-4.0",
"MIT"
] | null | null | null | Lib/test/test_posix.py | rng-dynamics/RustPython | 6165aadcc4e80e0f48f3e784e17b3c7f80d21a8a | [
"CC-BY-4.0",
"MIT"
] | null | null | null | Lib/test/test_posix.py | rng-dynamics/RustPython | 6165aadcc4e80e0f48f3e784e17b3c7f80d21a8a | [
"CC-BY-4.0",
"MIT"
] | null | null | null | "Test posix functions"
from test import support
from test.support import os_helper, import_helper, warnings_helper
from test.support.script_helper import assert_python_ok
# Skip these tests if there is no posix module.
posix = import_helper.import_module('posix')
import errno
import sys
import signal
import time
imp... | 40.898438 | 122 | 0.595011 |
3870e1a84ea0cc341ab60c99ee208341ed524d4a | 4,508 | py | Python | my_env/bin/gdal_auth.py | wilsonfilhodev/gis | 65926fd36460a7a3590ef7511ccae1d64e3d9988 | [
"MIT"
] | null | null | null | my_env/bin/gdal_auth.py | wilsonfilhodev/gis | 65926fd36460a7a3590ef7511ccae1d64e3d9988 | [
"MIT"
] | null | null | null | my_env/bin/gdal_auth.py | wilsonfilhodev/gis | 65926fd36460a7a3590ef7511ccae1d64e3d9988 | [
"MIT"
] | null | null | null | #!/home/wilsonsf/environments/my_env/bin/python3
# -*- coding: utf-8 -*-
# ******************************************************************************
# $Id$
#
# Project: GDAL
# Purpose: Application for Google web service authentication.
# Author: Frank Warmerdam, warmerdam@pobox.com
#
# ********************... | 31.524476 | 80 | 0.584516 |
451fd258bd9cb27c3bbc0374153cccc023066b80 | 2,464 | py | Python | year_3/databases_sem1/lab1/maxdb/utils.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | null | null | null | year_3/databases_sem1/lab1/maxdb/utils.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | 21 | 2020-03-24T16:26:04.000Z | 2022-02-18T15:56:16.000Z | year_3/databases_sem1/lab1/maxdb/utils.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | null | null | null | """
Utilities for maxdb classes.
"""
import os
class LRUCache(dict):
"""
LRU: least recently used cache - default storage for queries.
Available functionality:
get item: .get or __getitem__
put item: __setitem__
del item: .clear or __delitem__
"""
def __init__(self, *ar... | 24.39604 | 65 | 0.599432 |
f75f9ff65e5153de2e0101361f4fb59830bab0ee | 3,235 | py | Python | src/newsfeed/handlers/subscriptions.py | ets-labs/newsfeed | 9f59f94e1cd5f24d4b4121929050fc8b304173af | [
"BSD-3-Clause"
] | 10 | 2019-11-07T15:04:02.000Z | 2022-02-19T11:47:40.000Z | src/newsfeed/handlers/subscriptions.py | ets-labs/newsfeed | 9f59f94e1cd5f24d4b4121929050fc8b304173af | [
"BSD-3-Clause"
] | 27 | 2019-10-31T16:31:27.000Z | 2020-01-14T15:21:29.000Z | src/newsfeed/handlers/subscriptions.py | ets-labs/newsfeed | 9f59f94e1cd5f24d4b4121929050fc8b304173af | [
"BSD-3-Clause"
] | 10 | 2019-11-07T15:08:43.000Z | 2021-12-03T22:31:49.000Z | """Subscription API handlers."""
from typing import Dict, Union
from aiohttp import web
from dependency_injector.wiring import Provide
from newsfeed.domain.subscription import (
Subscription,
SubscriptionService,
)
from newsfeed.domain.error import DomainError
from newsfeed.containers import Container
Seri... | 28.377193 | 85 | 0.657496 |
4bfb88255066dbb178763ef4681430c240af8a8b | 627 | py | Python | BackEnd/backEnd/manage.py | hosseindehghanipour1998/onlineClass-Backend | f7e8c410ffe6ece5d010886dea54c85dd3ec99b7 | [
"MIT"
] | 3 | 2020-03-06T09:53:39.000Z | 2020-03-31T22:43:09.000Z | BackEnd/backEnd/manage.py | hosseindehghanipour1998/onlineClass-Backend | f7e8c410ffe6ece5d010886dea54c85dd3ec99b7 | [
"MIT"
] | 10 | 2020-03-01T08:58:36.000Z | 2022-02-10T08:18:50.000Z | manage.py | BeOrNot2Be/MEDILOV-back | 549bea50513a3b9f9bd5daafc77250cf523029cc | [
"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', 'backEnd.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise Import... | 28.5 | 73 | 0.682616 |
537da7f7f7bb74160eade38b40d76d584efe286a | 1,297 | py | Python | prepro.py | linVdcd/AIAYN_MultiTurnChatbot | c33deec9f4be5f669b51a801076a936119c6568a | [
"Apache-2.0"
] | null | null | null | prepro.py | linVdcd/AIAYN_MultiTurnChatbot | c33deec9f4be5f669b51a801076a936119c6568a | [
"Apache-2.0"
] | null | null | null | prepro.py | linVdcd/AIAYN_MultiTurnChatbot | c33deec9f4be5f669b51a801076a936119c6568a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#/usr/bin/python2
'''
June 2017 by kyubyong park.
kbpark.linguist@gmail.com.
https://www.github.com/kyubyong/transformer
'''
from __future__ import print_function
from hyperparams import Hyperparams as hp
import tensorflow as tf
import numpy as np
import codecs
import os
import reg... | 33.25641 | 127 | 0.635312 |
0c18d94e4047b9aecfd5107868694b4e3c77d482 | 10,510 | py | Python | lav/models/bev_planner.py | dotchen/LAV | dc9b4cfca39abd50c7438e8749d49f6ac0fe5e4e | [
"Apache-2.0"
] | 122 | 2022-03-22T18:15:25.000Z | 2022-03-31T13:28:57.000Z | lav/models/bev_planner.py | chisyliu/LAV | 0a5068c0fad3ecc2f2616801c6d3b00bc0ff03f3 | [
"Apache-2.0"
] | 5 | 2022-03-23T06:20:25.000Z | 2022-03-30T09:23:09.000Z | lav/models/bev_planner.py | chisyliu/LAV | 0a5068c0fad3ecc2f2616801c6d3b00bc0ff03f3 | [
"Apache-2.0"
] | 11 | 2022-03-22T19:23:09.000Z | 2022-03-30T08:13:33.000Z | import numpy as np
import torch
from torch import nn
from torch.nn import functional as F
from .resnet import resnet18
from copy import deepcopy
class BEVPlanner(nn.Module):
def __init__(self,
pixels_per_meter=2, crop_size=64, x_offset=0, y_offset=0.75,
feature_x_jitter=1, feature_angle_jitter=10, ... | 35.150502 | 181 | 0.604662 |
296703d4e5382c8196e944ad3d2824ff4a3de5d4 | 6,418 | py | Python | testdata/bin/generate-test-vectors.py | AtScaleInc/Impala | 1073a9108220faffe61c3bc9dff7a953adde12df | [
"Apache-2.0"
] | 51 | 2015-01-02T04:10:26.000Z | 2020-11-21T16:33:19.000Z | testdata/bin/generate-test-vectors.py | AtScaleInc/Impala | 1073a9108220faffe61c3bc9dff7a953adde12df | [
"Apache-2.0"
] | 58 | 2015-01-29T15:52:19.000Z | 2016-04-19T08:19:02.000Z | testdata/bin/generate-test-vectors.py | AtScaleInc/Impala | 1073a9108220faffe61c3bc9dff7a953adde12df | [
"Apache-2.0"
] | 8 | 2015-03-16T11:03:41.000Z | 2019-07-11T06:39:31.000Z | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
# This script is used to generate test "vectors" based on a dimension input file.
# A vector in this context is simply a permutation of the values in the the
# dimension input file. For example, in this case the script is generating test ... | 44.569444 | 90 | 0.727797 |
05e741972f16bc0dadda991949d8be5fc742fc24 | 470 | py | Python | main.py | philippwiesner/compiler | 52c00221ace2cb56b9fba91b3949c14a6f0e4f68 | [
"MIT"
] | null | null | null | main.py | philippwiesner/compiler | 52c00221ace2cb56b9fba91b3949c14a6f0e4f68 | [
"MIT"
] | 8 | 2020-05-15T14:50:59.000Z | 2020-06-05T11:44:33.000Z | main.py | philippwiesner/compiler | 52c00221ace2cb56b9fba91b3949c14a6f0e4f68 | [
"MIT"
] | null | null | null | """Vega compiler"""
from argparse import ArgumentParser
from argparse import FileType
from vega.front_end.parser import Parser
from vega.front_end.exception import BaseError
if __name__ == "__main__":
parser = ArgumentParser(description="Compile")
parser.add_argument('code', type=FileType('r'))
args = par... | 23.5 | 51 | 0.702128 |
4d0c6a83d91ab3ad10c2183cb544be446e21f64f | 1,070 | py | Python | tests/dags/test_legacy_job_operator.py | Fahadsaadullahkhan/KubernetesJobOperator | d96f9498667f937503d1e45142060904674f823f | [
"MIT"
] | null | null | null | tests/dags/test_legacy_job_operator.py | Fahadsaadullahkhan/KubernetesJobOperator | d96f9498667f937503d1e45142060904674f823f | [
"MIT"
] | null | null | null | tests/dags/test_legacy_job_operator.py | Fahadsaadullahkhan/KubernetesJobOperator | d96f9498667f937503d1e45142060904674f823f | [
"MIT"
] | null | null | null | from utils import default_args
from airflow import DAG
from airflow_kubernetes_job_operator.kubernetes_legacy_job_operator import KubernetesLegacyJobOperator
dag = DAG(
"kub-job-op-legacy",
default_args=default_args,
description="Test base job operator",
schedule_interval=None,
catchup=False,
)
b... | 20.576923 | 102 | 0.688785 |
a0aba84f36e369ba885173b99f7cf522802abca1 | 25,575 | py | Python | littlelambocoin/wallet/trade_manager.py | BTCgreen-Network/littlelambocoin-blockchain | 0e70a50dd11db08275d116929222dddbaeb0d6e6 | [
"Apache-2.0"
] | 5 | 2022-01-10T08:12:19.000Z | 2022-03-14T07:20:30.000Z | littlelambocoin/wallet/trade_manager.py | BTCgreen-Network/littlelambocoin-blockchain | 0e70a50dd11db08275d116929222dddbaeb0d6e6 | [
"Apache-2.0"
] | 5 | 2022-01-18T18:17:29.000Z | 2022-03-01T18:14:44.000Z | littlelambocoin/wallet/trade_manager.py | BTCgreen-Network/littlelambocoin-blockchain | 0e70a50dd11db08275d116929222dddbaeb0d6e6 | [
"Apache-2.0"
] | 5 | 2022-01-11T03:19:43.000Z | 2022-03-20T19:42:28.000Z | import dataclasses
import logging
import time
import traceback
from typing import Any, Dict, List, Optional, Tuple, Union, Set
from littlelambocoin.protocols.wallet_protocol import CoinState
from littlelambocoin.types.blockchain_format.coin import Coin
from littlelambocoin.types.blockchain_format.program import Progra... | 47.273567 | 120 | 0.614233 |
8c6416dbd4bba5fa91f842726a68d732b3836128 | 7,737 | py | Python | tests/test_http_api.py | moeoverflow/BGmi | d3128e78976f81fd75a4d2587a8e69f5cc28dbf6 | [
"MIT"
] | 1 | 2021-05-10T17:10:36.000Z | 2021-05-10T17:10:36.000Z | tests/test_http_api.py | moeoverflow/BGmi | d3128e78976f81fd75a4d2587a8e69f5cc28dbf6 | [
"MIT"
] | null | null | null | tests/test_http_api.py | moeoverflow/BGmi | d3128e78976f81fd75a4d2587a8e69f5cc28dbf6 | [
"MIT"
] | null | null | null | import json
import logging
import os
import random
import string
from bgmi.config import ADMIN_TOKEN, SAVE_PATH
from bgmi.front.server import make_app
from tornado.testing import AsyncHTTPTestCase
logging.basicConfig(level=logging.DEBUG)
def random_word(length):
letters = string.ascii_lowercase
return "".jo... | 32.103734 | 88 | 0.55086 |
9b1acad16c4e8fb1b24bf39885937dfbd9d7c24e | 22,976 | py | Python | src/backend/kandbox_planner/fsm_adapter/toy_generator/london_service_generator.py | qiyangduan/kandbox_planner | 4785a76443bd4b8f25aeb36e03945daedb165c43 | [
"Apache-2.0"
] | 1 | 2020-05-03T21:26:43.000Z | 2020-05-03T21:26:43.000Z | src/backend/kandbox_planner/fsm_adapter/toy_generator/london_service_generator.py | qiyangduan/kandbox_planner | 4785a76443bd4b8f25aeb36e03945daedb165c43 | [
"Apache-2.0"
] | 11 | 2020-11-13T18:48:37.000Z | 2022-03-12T00:26:37.000Z | src/backend/kandbox_planner/fsm_adapter/toy_generator/london_service_generator.py | qiyangduan/kandbox_planner | 4785a76443bd4b8f25aeb36e03945daedb165c43 | [
"Apache-2.0"
] | null | null | null | # https://stackoverflow.com/questions/19069701/python-requests-library-how-to-pass-authorization-header-with-single-token
# https://www.quora.com/How-can-I-make-an-API-call-with-basic-HTTP-authentication-using-Python
import requests
import pandas as pd
from kandbox_planner.fsm_adapter.kplanner_db_adapter import KPlan... | 45.587302 | 450 | 0.63575 |
f25a5f8401b0d7aecf3bfffa77dc6b0b4981fd65 | 424 | py | Python | manage.py | nanguoyu/FileCollectionWeb | 118f8efda5cf567787095808220f6ffe510b0644 | [
"MIT"
] | 1 | 2019-10-29T00:35:37.000Z | 2019-10-29T00:35:37.000Z | manage.py | nanguoyu/FileCollectionWeb | 118f8efda5cf567787095808220f6ffe510b0644 | [
"MIT"
] | null | null | null | manage.py | nanguoyu/FileCollectionWeb | 118f8efda5cf567787095808220f6ffe510b0644 | [
"MIT"
] | null | null | null | import os
from flask_script import Shell
from app import create_app
from flask_script import Manager
from config import ProductionConfig
# app = create_app(os.getenv('FLASK_CONFIG') or 'default')
app = create_app(ProductionConfig)
manager = Manager(app)
def make_shell_context():
return dict(app=app)
manager.add... | 22.315789 | 68 | 0.778302 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.