hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
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
245
max_issues_repo_name
stringlengths
6
130
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
245
max_forks_repo_name
stringlengths
6
130
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
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c43f415944cc54adda6eed157b9ba14a13830c1
948
py
Python
lupdate_xml.py
Skycoder42/QtMvvmSettingsCore
4489151d3e7de940790c5a93041c7381799f695a
[ "BSD-3-Clause" ]
null
null
null
lupdate_xml.py
Skycoder42/QtMvvmSettingsCore
4489151d3e7de940790c5a93041c7381799f695a
[ "BSD-3-Clause" ]
null
null
null
lupdate_xml.py
Skycoder42/QtMvvmSettingsCore
4489151d3e7de940790c5a93041c7381799f695a
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # Usage: lupdate_xml.py bindir srcdir locales(space seperated) xml_sources... import sys import os import subprocess from xml.etree.ElementTree import Element, parse bindir = sys.argv[1] srcdir = sys.argv[2] srces = sys.argv[3:] os.chdir(srcdir) tsmap = {} for src in srces: trstrings = set()...
23.7
84
0.690928
import sys import os import subprocess from xml.etree.ElementTree import Element, parse bindir = sys.argv[1] srcdir = sys.argv[2] srces = sys.argv[3:] os.chdir(srcdir) tsmap = {} for src in srces: trstrings = set() tree = parse(src) root = Element("TS") for elem in tree.iter(): if elem.tag == "SearchKey": ...
true
true
1c43f45217488b9d1f345b843dcd9e4b6f84640c
990
py
Python
6.py
andy0130tw/advent-of-code-2019
aeaeb50db3170e619aef41756ce0608793a64baa
[ "Unlicense" ]
null
null
null
6.py
andy0130tw/advent-of-code-2019
aeaeb50db3170e619aef41756ce0608793a64baa
[ "Unlicense" ]
null
null
null
6.py
andy0130tw/advent-of-code-2019
aeaeb50db3170e619aef41756ce0608793a64baa
[ "Unlicense" ]
null
null
null
def rec_sum(root, depth): ans = depth for el in root.values(): ans += rec_sum(el, depth + 1) return ans def find_path(root, target): for lab, sub in root.items(): if lab == target: return [lab] res = find_path(sub, target) if res: return [lab, *...
19.038462
49
0.489899
def rec_sum(root, depth): ans = depth for el in root.values(): ans += rec_sum(el, depth + 1) return ans def find_path(root, target): for lab, sub in root.items(): if lab == target: return [lab] res = find_path(sub, target) if res: return [lab, *...
true
true
1c43f58337d7879e5d18e9e1149c4866747fbd4d
926
py
Python
src/partition_set_into_equal_sum.py
redfast00/daily-algorithm-challenge
3507164d5ec58abe68a6e820120625e100dee96c
[ "MIT" ]
null
null
null
src/partition_set_into_equal_sum.py
redfast00/daily-algorithm-challenge
3507164d5ec58abe68a6e820120625e100dee96c
[ "MIT" ]
null
null
null
src/partition_set_into_equal_sum.py
redfast00/daily-algorithm-challenge
3507164d5ec58abe68a6e820120625e100dee96c
[ "MIT" ]
null
null
null
from collections import Counter from get_subset_sum import subset_sum def partition_into_equal_parts(l): '''Partitions s into two subsets of l that have the same sum. >>> problem = [15, 5, 20, 10, 35, 25, 10] >>> first, second = partition_into_equal_parts(problem) >>> valid_solution(first, second, pr...
30.866667
93
0.654428
from collections import Counter from get_subset_sum import subset_sum def partition_into_equal_parts(l): total = sum(l) if total % 2: return first = subset_sum(total // 2, l) if first is None: return second = [] second_counter = Counter(l) - Counter(first) for num...
true
true
1c43f593ad0ffdb5320aa7b3fb8d314b549d0517
1,804
py
Python
colorize_sky.py
kcotar/Stellar_abudance_trees
1a4377ef53a4b4c8df1be860598a70be31626110
[ "MIT" ]
null
null
null
colorize_sky.py
kcotar/Stellar_abudance_trees
1a4377ef53a4b4c8df1be860598a70be31626110
[ "MIT" ]
null
null
null
colorize_sky.py
kcotar/Stellar_abudance_trees
1a4377ef53a4b4c8df1be860598a70be31626110
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.basemap import Basemap def _prepare_ra_dec(data): ra = data['ra'] idx_trans = ra > 180 if len(idx_trans) > 0: ra[idx_trans] -= 360 ra = np.deg2rad(ra) dec = np.deg2rad(data['dec']) return ra, dec def plot_ra_dec_loc...
30.066667
73
0.616962
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.basemap import Basemap def _prepare_ra_dec(data): ra = data['ra'] idx_trans = ra > 180 if len(idx_trans) > 0: ra[idx_trans] -= 360 ra = np.deg2rad(ra) dec = np.deg2rad(data['dec']) return ra, dec def plot_ra_dec_loc...
true
true
1c43f730fff18adef3c514b8dfe4a98cff45a408
4,124
py
Python
test/coreneuron/test_spikes.py
ishandutta2007/nrn
418d42fb7afc0ebb06138b80e511c8ae716dcad0
[ "BSD-3-Clause" ]
null
null
null
test/coreneuron/test_spikes.py
ishandutta2007/nrn
418d42fb7afc0ebb06138b80e511c8ae716dcad0
[ "BSD-3-Clause" ]
null
null
null
test/coreneuron/test_spikes.py
ishandutta2007/nrn
418d42fb7afc0ebb06138b80e511c8ae716dcad0
[ "BSD-3-Clause" ]
null
null
null
import distutils.util import os import sys # Hacky, but it's non-trivial to pass commandline arguments to pytest tests. enable_gpu = bool( distutils.util.strtobool(os.environ.get("CORENRN_ENABLE_GPU", "false")) ) mpi4py_option = bool( distutils.util.strtobool(os.environ.get("NRN_TEST_SPIKES_MPI4PY", "false")) ...
26.606452
87
0.629243
import distutils.util import os import sys enable_gpu = bool( distutils.util.strtobool(os.environ.get("CORENRN_ENABLE_GPU", "false")) ) mpi4py_option = bool( distutils.util.strtobool(os.environ.get("NRN_TEST_SPIKES_MPI4PY", "false")) ) file_mode_option = bool( distutils.util.strtobool(os.environ.get("NRN_...
true
true
1c43f74d5c8df35633dbd047a88eb355747254bb
20,064
py
Python
mumbojumbo.py
kristerhedfors/mumbojumbo
d5e139ad0ac3477a866ab2ad4997df3df8995692
[ "BSD-2-Clause" ]
null
null
null
mumbojumbo.py
kristerhedfors/mumbojumbo
d5e139ad0ac3477a866ab2ad4997df3df8995692
[ "BSD-2-Clause" ]
null
null
null
mumbojumbo.py
kristerhedfors/mumbojumbo
d5e139ad0ac3477a866ab2ad4997df3df8995692
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # # Copyright (c) 2016, Krister Hedfors # 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 # l...
31.399061
80
0.614234
import base64 import functools import logging import Queue import socket import struct import subprocess import sys import optparse import ConfigParser import traceback import smtplib import hashlib import hmac import getpass from email.mime.text import MIMEText im...
false
true
1c43f74e70b164c0121e3a9b4edda8f51bbb7dec
984
py
Python
python_Project/Day_16-20/Day_16-20_Sort&Search_Algorithms/Cocktail_sort.py
Zzz-ww/Python-prac
c97f2c16b74a2c1df117f377a072811cc596f98b
[ "MIT" ]
null
null
null
python_Project/Day_16-20/Day_16-20_Sort&Search_Algorithms/Cocktail_sort.py
Zzz-ww/Python-prac
c97f2c16b74a2c1df117f377a072811cc596f98b
[ "MIT" ]
null
null
null
python_Project/Day_16-20/Day_16-20_Sort&Search_Algorithms/Cocktail_sort.py
Zzz-ww/Python-prac
c97f2c16b74a2c1df117f377a072811cc596f98b
[ "MIT" ]
null
null
null
""" 双向冒泡: 冒泡排序,每次都是从左往右,交换相邻的元素,从而达到循环一边可以把最大的元素放在右边。 而双向冒泡排序,在完成一次从左往右的冒泡排序后,再从右往左进行冒泡,从而把小的元素放在左边。 下面这张图可以很好地表达: """ def bubble_sort(origin_items): """高质量冒泡排序(搅拌排序)/双向冒泡排序""" comp = lambda x, y: x > y items = origin_items[:] for i in range(len(items) - 1): swapped = False # 这个标志位也是可以放到简单冒...
27.333333
73
0.530488
def bubble_sort(origin_items): comp = lambda x, y: x > y items = origin_items[:] for i in range(len(items) - 1): swapped = False for j in range(i, len(items) - 1 - i): if comp(items[j], items[j + 1]): items[j], items[j + 1] = items[j + 1], items[j] ...
true
true
1c43f7cc88953082721b55d83771cbbd3042f65b
1,154
py
Python
check_generated_geometry.py
hyuanmech/MOPSO
f2cbe9151d9dbd21b562957b368f22e2648232b9
[ "MIT" ]
null
null
null
check_generated_geometry.py
hyuanmech/MOPSO
f2cbe9151d9dbd21b562957b368f22e2648232b9
[ "MIT" ]
null
null
null
check_generated_geometry.py
hyuanmech/MOPSO
f2cbe9151d9dbd21b562957b368f22e2648232b9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Mar 23 16:05:17 2020 @author: yuanh """ import os import shutil from openpyxl import load_workbook import numpy as np it = 6 flag = 0 nPop = 100 if flag == 1: n = 9 index = np.zeros((n, 1)) wb = load_workbook('Positions.xlsx') sheet ...
28.85
146
0.587522
import os import shutil from openpyxl import load_workbook import numpy as np it = 6 flag = 0 nPop = 100 if flag == 1: n = 9 index = np.zeros((n, 1)) wb = load_workbook('Positions.xlsx') sheet = wb['2_mu'] for i in range(n): index[i,0] = sheet.cell(row=i+2,column=1).v...
true
true
1c43fa14320229168e0e657e1dda3761504a32b4
992
py
Python
guillotina/tests/test_middlewares.py
psanlorenzo/guillotina
0840cf39914d23a9e26e35bd40939511d3ca78d7
[ "BSD-2-Clause" ]
null
null
null
guillotina/tests/test_middlewares.py
psanlorenzo/guillotina
0840cf39914d23a9e26e35bd40939511d3ca78d7
[ "BSD-2-Clause" ]
null
null
null
guillotina/tests/test_middlewares.py
psanlorenzo/guillotina
0840cf39914d23a9e26e35bd40939511d3ca78d7
[ "BSD-2-Clause" ]
null
null
null
import asyncio import pytest import time class AsgiMiddlewate: def __init__(self, app): self.next_app = app async def __call__(self, scope, receive, send): start = time.time() await asyncio.sleep(0.1) response = await self.next_app(scope, receive, send) end = time.time...
31
96
0.633065
import asyncio import pytest import time class AsgiMiddlewate: def __init__(self, app): self.next_app = app async def __call__(self, scope, receive, send): start = time.time() await asyncio.sleep(0.1) response = await self.next_app(scope, receive, send) end = time.time...
true
true
1c43fa71bbb82846c555d0bca310adf074f93a62
2,024
py
Python
third_party/tests/Opentitan/util/tlgen/item.py
parzival3/Surelog
cf126533ebfb2af7df321057af9e3535feb30487
[ "Apache-2.0" ]
156
2019-11-16T17:29:55.000Z
2022-01-21T05:41:13.000Z
third_party/tests/Opentitan/util/tlgen/item.py
parzival3/Surelog
cf126533ebfb2af7df321057af9e3535feb30487
[ "Apache-2.0" ]
414
2021-06-11T07:22:01.000Z
2022-03-31T22:06:14.000Z
third_party/tests/Opentitan/util/tlgen/item.py
parzival3/Surelog
cf126533ebfb2af7df321057af9e3535feb30487
[ "Apache-2.0" ]
30
2019-11-18T16:31:40.000Z
2021-12-26T01:22:51.000Z
# Copyright lowRISC contributors. # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 from enum import Enum class Edge: """Edge class contains the connection from a node to a node. a Node can be a host port, output of async_fifo, port in a socket,...
26.986667
74
0.630929
from enum import Enum class Edge: def __init__(self, us, ds): self.us = us self.ds = ds def __repr__(self): return "U(%s) D(%s)" % (self.us.name, self.ds.name) = 2 ASYNC_FIFO = 3 SOCKET_1N = 4 SOCKET_M1 = 5 class Node: name = "" clocks = [] range ...
true
true
1c43fba068f52e1707fd9f7186978e03b366e299
1,960
py
Python
cli/tests/test_cli.py
SophieHerbst/mne-bids
0e9b5e261668b90efec28359772f321d999af7d7
[ "BSD-3-Clause" ]
null
null
null
cli/tests/test_cli.py
SophieHerbst/mne-bids
0e9b5e261668b90efec28359772f321d999af7d7
[ "BSD-3-Clause" ]
null
null
null
cli/tests/test_cli.py
SophieHerbst/mne-bids
0e9b5e261668b90efec28359772f321d999af7d7
[ "BSD-3-Clause" ]
null
null
null
"""Test command line.""" # Authors: Teon L Brooks <teon.brooks@gmail.com> # Stefan Appelhoff <stefan.appelhoff@mailbox.org> # # License: BSD (3-clause) from os import path as op import pytest import mne from mne.datasets import testing from mne.utils import run_tests_if_main, ArgvSetter from cli import mne_b...
27.222222
73
0.642347
from os import path as op import pytest import mne from mne.datasets import testing from mne.utils import run_tests_if_main, ArgvSetter from cli import mne_bids_raw_to_bids, mne_bids_cp base_path = op.join(op.dirname(mne.__file__), 'io') subject_id = '01' task = 'testing' def check_usage(module, force_help=Fal...
true
true
1c43fc03ab33ea2e19164c0644663693552fe20d
17,011
py
Python
opics/utils.py
jaspreetj/opics
037ed93ad9f6c9ad9fec5feb214bb89de24635f0
[ "MIT" ]
null
null
null
opics/utils.py
jaspreetj/opics
037ed93ad9f6c9ad9fec5feb214bb89de24635f0
[ "MIT" ]
null
null
null
opics/utils.py
jaspreetj/opics
037ed93ad9f6c9ad9fec5feb214bb89de24635f0
[ "MIT" ]
null
null
null
from typing import Any, Dict, List, Tuple import cmath as cm import time import re import itertools import inspect from copy import deepcopy import numpy as np from numpy import ndarray from pathlib import PosixPath from defusedxml.ElementTree import parse def fromSI(value: str) -> float: """converts from SI unit...
35.146694
141
0.479043
from typing import Any, Dict, List, Tuple import cmath as cm import time import re import itertools import inspect from copy import deepcopy import numpy as np from numpy import ndarray from pathlib import PosixPath from defusedxml.ElementTree import parse def fromSI(value: str) -> float: return float(value.repla...
true
true
1c43fd68b8e8426feafb7efe2b494da8cef3208e
16,870
py
Python
django_extensions/management/modelviz.py
echirchir/django-extensions
ae38e33309b87bf7431bc5f1321699f5d00a0431
[ "MIT" ]
null
null
null
django_extensions/management/modelviz.py
echirchir/django-extensions
ae38e33309b87bf7431bc5f1321699f5d00a0431
[ "MIT" ]
null
null
null
django_extensions/management/modelviz.py
echirchir/django-extensions
ae38e33309b87bf7431bc5f1321699f5d00a0431
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ modelviz.py - DOT file generator for Django Models Based on: Django model to DOT (Graphviz) converter by Antonio Cavedoni <antonio@cavedoni.org> Adapted to be used with django-extensions """ import datetime import os import re import six from django.apps import apps from django.db.m...
38.960739
142
0.605809
import datetime import os import re import six from django.apps import apps from django.db.models.fields.related import ( ForeignKey, ManyToManyField, OneToOneField, RelatedField, ) from django.contrib.contenttypes.fields import GenericRelation from django.template import Context, Template, loader from django.ut...
true
true
1c43fdcc16345073c0458921b47d255ef287bd2e
103
py
Python
edag/cli/__init__.py
sodre/edag-cli
f1f88fd749b3e8a94c93afa6ae78e8cb5fc84436
[ "BSD-3-Clause" ]
null
null
null
edag/cli/__init__.py
sodre/edag-cli
f1f88fd749b3e8a94c93afa6ae78e8cb5fc84436
[ "BSD-3-Clause" ]
4
2019-12-13T05:35:15.000Z
2019-12-30T21:07:14.000Z
edag/cli/__init__.py
sodre/edag-cli
f1f88fd749b3e8a94c93afa6ae78e8cb5fc84436
[ "BSD-3-Clause" ]
null
null
null
"""Top-level package for ElasticDAG CLI.""" from ._version import version as __version__ # noqa: F401
34.333333
58
0.747573
from ._version import version as __version__
true
true
1c43fe45094a53560cc021a433aaee32cab60e0e
2,659
py
Python
galaxia/gcmd/renderer.py
WiproOpenSourcePractice/galaxia
baa6ea0a2192625dce2df7daddb1d983520bb7ab
[ "Apache-2.0" ]
25
2016-04-27T14:45:59.000Z
2020-05-21T00:14:56.000Z
galaxia/gcmd/renderer.py
WiproOpenSource/galaxia
baa6ea0a2192625dce2df7daddb1d983520bb7ab
[ "Apache-2.0" ]
62
2016-04-27T14:13:06.000Z
2016-11-16T05:12:21.000Z
galaxia/gcmd/renderer.py
WiproOpenSource/galaxia
baa6ea0a2192625dce2df7daddb1d983520bb7ab
[ "Apache-2.0" ]
20
2016-05-01T14:28:09.000Z
2018-10-25T18:11:29.000Z
# Copyright 2016 - Wipro Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
33.2375
79
0.661527
""" Module to start galaxia renderer service """ import logging import os import sys from oslo_config import cfg from galaxia.common import service from galaxia.common.rpc import broker from galaxia.grenderer.controller import controller API_SERVICE_OPTS = [ cfg.StrOpt('rabbitmq_host', ...
false
true
1c43fe5c5576e93119229d732edb22ae2f787b24
8,554
py
Python
applications/systems_of_equations_ex2/script/exodus_data_extraction.py
ElsevierSoftwareX/SOFTX_2019_102
123c4b3988ef2fb86b49a247b8431dc94a89eded
[ "MIT" ]
null
null
null
applications/systems_of_equations_ex2/script/exodus_data_extraction.py
ElsevierSoftwareX/SOFTX_2019_102
123c4b3988ef2fb86b49a247b8431dc94a89eded
[ "MIT" ]
null
null
null
applications/systems_of_equations_ex2/script/exodus_data_extraction.py
ElsevierSoftwareX/SOFTX_2019_102
123c4b3988ef2fb86b49a247b8431dc94a89eded
[ "MIT" ]
null
null
null
import sys, os #### import the simple module from the paraview from paraview.simple import * if __name__ == "__main__" and len(sys.argv) > 1: time_step = int(sys.argv[1]) #### disable automatic camera reset on 'Show' paraview.simple._DisableFirstRenderCameraReset() # create a new 'ExodusIIReader' ...
49.445087
452
0.655483
import sys, os lues oute.PointVariables = [] oute.SideSetArrayStatus = [] animationScene1 = GetAnimationScene() animationScene1.UpdateAnimationUsingDataTimeSteps() oute.PointVariables = ['vel_', 'p'] oute.ElementBlocks = ['Unnamed block ID: 0 Type: QUAD9'] renderView1...
true
true
1c43fefda8a6cb0284260eadeb99ad911c49bee5
3,177
py
Python
gala/potential/potential/builtin/pybuiltin.py
akeemlh/gala
0fdaf9159bccc59af2a3525f2926e04501754f48
[ "MIT" ]
null
null
null
gala/potential/potential/builtin/pybuiltin.py
akeemlh/gala
0fdaf9159bccc59af2a3525f2926e04501754f48
[ "MIT" ]
null
null
null
gala/potential/potential/builtin/pybuiltin.py
akeemlh/gala
0fdaf9159bccc59af2a3525f2926e04501754f48
[ "MIT" ]
null
null
null
# Third-party import numpy as np from gala.potential.potential.core import PotentialBase from gala.potential.potential.util import sympy_wrap from gala.potential.common import PotentialParameter __all__ = ["HarmonicOscillatorPotential"] class HarmonicOscillatorPotential(PotentialBase): r""" Represents an N-...
34.912088
89
0.639597
import numpy as np from gala.potential.potential.core import PotentialBase from gala.potential.potential.util import sympy_wrap from gala.potential.common import PotentialParameter __all__ = ["HarmonicOscillatorPotential"] class HarmonicOscillatorPotential(PotentialBase): omega = PotentialParameter('omega', ph...
true
true
1c43ff06f66ece3c7d95b1983fde0993f787cb7e
2,428
py
Python
swaps/utils/channels.py
DunnCreativeSS/cash_carry_leveraged_futures_arbitrageur
1120ebfb487ce4987fe70e6645b36e0d7ce041ec
[ "Apache-2.0" ]
1
2021-09-06T00:09:11.000Z
2021-09-06T00:09:11.000Z
swaps/utils/channels.py
DunnCreativeSS/cash_carry_leveraged_futures_arbitrageur
1120ebfb487ce4987fe70e6645b36e0d7ce041ec
[ "Apache-2.0" ]
null
null
null
swaps/utils/channels.py
DunnCreativeSS/cash_carry_leveraged_futures_arbitrageur
1120ebfb487ce4987fe70e6645b36e0d7ce041ec
[ "Apache-2.0" ]
null
null
null
import json from swaps.utils.time_service import get_current_timestamp from swaps.constant import DepthStep def kline_channel(symbol, interval): channel = dict() channel["sub"] = "market." + symbol + ".kline." + interval channel["id"] = str(get_current_timestamp()) return json.dumps(channel) def tra...
28.904762
96
0.670511
import json from swaps.utils.time_service import get_current_timestamp from swaps.constant import DepthStep def kline_channel(symbol, interval): channel = dict() channel["sub"] = "market." + symbol + ".kline." + interval channel["id"] = str(get_current_timestamp()) return json.dumps(channel) def tra...
true
true
1c43ff8b50f9f4dccea00f66a1b714b913f672b2
4,157
py
Python
speech_activity_detection/sad.py
hlt-bme-hu/hunspeech
b8599e232ed2daa6ff6e07b92c6dca003b8c4bde
[ "MIT" ]
17
2017-03-05T03:19:37.000Z
2020-07-28T03:05:55.000Z
speech_activity_detection/sad.py
hlt-bme-hu/hunspeech
b8599e232ed2daa6ff6e07b92c6dca003b8c4bde
[ "MIT" ]
7
2016-07-05T08:40:15.000Z
2016-07-28T10:07:38.000Z
speech_activity_detection/sad.py
hlt-bme-hu/hunspeech
b8599e232ed2daa6ff6e07b92c6dca003b8c4bde
[ "MIT" ]
6
2017-05-10T12:27:35.000Z
2018-09-14T20:13:43.000Z
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright © 2016 Judit Acs <judit@sch.bme.hu> # # Distributed under terms of the GPL license. from argparse import ArgumentParser import os import subprocess class EMSpeechActicityDetection: """Speech activity detection and segmentation This class is a wrapp...
35.836207
76
0.600674
from argparse import ArgumentParser import os import subprocess class EMSpeechActicityDetection: def __init__(self, filename, model=None, segment_out='segments.txt', segment_dir=None, shout_path=os.environ.get('SHOUT_DIR')): self.filename = filename if model is None: ...
true
true
1c4400536ce84830b6a1ec7c250cf1e8cccf83e5
3,961
py
Python
tensorflow_probability/python/mcmc/internal/leapfrog_integrator_test.py
NeelGhoshal/probability
45ed841e3cff6cdc7cd1b2d96dd874d9070318f7
[ "Apache-2.0" ]
2
2019-10-30T04:45:07.000Z
2019-10-30T04:45:08.000Z
tensorflow_probability/python/mcmc/internal/leapfrog_integrator_test.py
gregorystrubel/probability
df96f3d56eff92c6b06fbac68dc58e095e28fed6
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/mcmc/internal/leapfrog_integrator_test.py
gregorystrubel/probability
df96f3d56eff92c6b06fbac68dc58e095e28fed6
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Probability 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 o...
35.053097
92
0.721283
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow.compat.v1 as tf1 import tensorflow.compat.v2 as tf from tensorflow_probability.python.internal import test_util from tensorflow_probability.python.mcmc.inter...
true
true
1c4401781e653e88d9e6d6f9fbced6b590f8d769
243
py
Python
example/envless_mode/app.py
jhesketh/dynaconf
a8038b87763ae8e790ff7e745b9335f997d5bd16
[ "MIT" ]
1
2021-07-21T17:06:16.000Z
2021-07-21T17:06:16.000Z
example/envless_mode/app.py
jhesketh/dynaconf
a8038b87763ae8e790ff7e745b9335f997d5bd16
[ "MIT" ]
null
null
null
example/envless_mode/app.py
jhesketh/dynaconf
a8038b87763ae8e790ff7e745b9335f997d5bd16
[ "MIT" ]
null
null
null
import os from dynaconf import LazySettings settings = LazySettings(ENVLESS_MODE=True) assert settings.FOO == "bar" assert settings.HELLO == "world" assert settings.DATABASES.default.port == 8080 assert settings.LAZY == os.environ["HOME"]
20.25
46
0.769547
import os from dynaconf import LazySettings settings = LazySettings(ENVLESS_MODE=True) assert settings.FOO == "bar" assert settings.HELLO == "world" assert settings.DATABASES.default.port == 8080 assert settings.LAZY == os.environ["HOME"]
true
true
1c440253701030adbddca3040079f2ed3a52870a
4,876
py
Python
gtpython/gt/extended/genome_node.py
ggonnella/genometools
48103b35c99920179fae697086efdf6d0548a1fe
[ "BSD-2-Clause" ]
1
2020-02-19T14:10:38.000Z
2020-02-19T14:10:38.000Z
gtpython/gt/extended/genome_node.py
ggonnella/genometools
48103b35c99920179fae697086efdf6d0548a1fe
[ "BSD-2-Clause" ]
null
null
null
gtpython/gt/extended/genome_node.py
ggonnella/genometools
48103b35c99920179fae697086efdf6d0548a1fe
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2014 Daniel Standage <daniel.standage@gmail.com> # Copyright (c) 2008-2009 Sascha Steinbiss <steinbiss@zbh.uni-hamburg.de> # Copyright (c) 2008-2009 Center for Bioinformatics, University of Hamburg # # Permission to use, copy, modify, and distribute this s...
34.338028
95
0.668991
from gt.dlload import gtlib from gt.core.error import Error, gterror from gt.extended.node_visitor import NodeVisitor from gt.core.gtstr import Str from gt.props import cachedproperty class GenomeNode(object): def __init__(self): pass @classmethod def create_from_ptr(cls, node...
false
true
1c4403bd35f001ff67a9f8496dba9393ab34b2fe
5,177
py
Python
pineboolib/kugar/mreportobject.py
Miguel-J/pineboo-buscar
41a2f3ee0425d163619b78f32544c4b4661d5fa7
[ "MIT" ]
null
null
null
pineboolib/kugar/mreportobject.py
Miguel-J/pineboo-buscar
41a2f3ee0425d163619b78f32544c4b4661d5fa7
[ "MIT" ]
null
null
null
pineboolib/kugar/mreportobject.py
Miguel-J/pineboo-buscar
41a2f3ee0425d163619b78f32544c4b4661d5fa7
[ "MIT" ]
null
null
null
from enum import Enum from PyQt5 import QtGui from PyQt5.QtCore import Qt from PyQt5.Qt import QObject from pineboolib import decorators from pineboolib.flcontrols import ProjectClass from pineboolib.fllegacy.FLStylePainter import FLStylePainter class MReportObject(ProjectClass, QObject): class BorderStyle(En...
26.548718
76
0.615414
from enum import Enum from PyQt5 import QtGui from PyQt5.QtCore import Qt from PyQt5.Qt import QObject from pineboolib import decorators from pineboolib.flcontrols import ProjectClass from pineboolib.fllegacy.FLStylePainter import FLStylePainter class MReportObject(ProjectClass, QObject): class BorderStyle(En...
true
true
1c440499d9570cd84e8b5504049bea924a674c85
2,985
py
Python
deepxde/geometry/geometry_3d.py
mitchelldaneker/deepxde
62e09b62ceaab6bda2ebbd02dc30ad99c2990302
[ "Apache-2.0" ]
955
2019-06-21T21:56:02.000Z
2022-03-31T03:44:45.000Z
deepxde/geometry/geometry_3d.py
mitchelldaneker/deepxde
62e09b62ceaab6bda2ebbd02dc30ad99c2990302
[ "Apache-2.0" ]
517
2019-07-25T16:47:44.000Z
2022-03-31T17:37:58.000Z
deepxde/geometry/geometry_3d.py
mitchelldaneker/deepxde
62e09b62ceaab6bda2ebbd02dc30ad99c2990302
[ "Apache-2.0" ]
374
2019-06-24T00:44:16.000Z
2022-03-30T08:17:36.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import itertools import numpy as np from .geometry_2d import Rectangle from .geometry_nd import Hypercube, Hypersphere class Cuboid(Hypercube): """ Args: xmin: Coordinate of bottom left corn...
35.963855
85
0.540369
from __future__ import absolute_import from __future__ import division from __future__ import print_function import itertools import numpy as np from .geometry_2d import Rectangle from .geometry_nd import Hypercube, Hypersphere class Cuboid(Hypercube): def __init__(self, xmin, xmax): super(Cuboid, sel...
true
true
1c44054209fde45c023c2b56668fd3ef83696358
5,515
py
Python
src_py/rlpytorch/trainer/utils.py
r-woo/elfai
2c37625e608e7720b8bd7847419d7b53e87e260a
[ "BSD-3-Clause" ]
3,305
2018-05-02T17:41:36.000Z
2022-03-28T05:57:56.000Z
src_py/rlpytorch/trainer/utils.py
r-woo/elfai
2c37625e608e7720b8bd7847419d7b53e87e260a
[ "BSD-3-Clause" ]
135
2018-05-02T19:25:13.000Z
2020-08-20T02:39:14.000Z
src_py/rlpytorch/trainer/utils.py
r-woo/elfai
2c37625e608e7720b8bd7847419d7b53e87e260a
[ "BSD-3-Clause" ]
604
2018-05-02T19:38:45.000Z
2022-03-18T10:01:57.000Z
# Copyright (c) 2018-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import os from collections import defaultdict, deque, Counter from datetime import datetime from elf.options import au...
30.469613
78
0.558114
import os from collections import defaultdict, deque, Counter from datetime import datetime from elf.options import auto_import_options, PyOptionSpec class SymLink(object): def __init__(self, sym_prefix, latest_k=5): self.sym_prefix = sym_prefix self.latest_k = latest_k self.latest_...
true
true
1c44057063242c94c41dd5976ac9aa98bd752b8e
956
py
Python
devel/test_forward_all.py
saidbakr/darkhttpd
cb548aef6ded6794b2a5bee06f40ec1ce415baad
[ "ISC" ]
788
2021-01-23T03:58:42.000Z
2022-03-28T12:32:35.000Z
devel/test_forward_all.py
saidbakr/darkhttpd
cb548aef6ded6794b2a5bee06f40ec1ce415baad
[ "ISC" ]
18
2021-02-15T06:31:17.000Z
2022-03-10T21:46:47.000Z
devel/test_forward_all.py
saidbakr/darkhttpd
cb548aef6ded6794b2a5bee06f40ec1ce415baad
[ "ISC" ]
59
2021-01-23T10:10:15.000Z
2022-03-25T13:50:16.000Z
#!/usr/bin/env python3 # This is run by the "run-tests" script. import unittest from test import TestHelper, Conn, parse class TestForwardAll(TestHelper): def test_forward_root(self): resp = self.get('/', req_hdrs={'Host': 'not-example.com'}) status, hdrs, body = parse(resp) self.assertCont...
34.142857
66
0.643305
import unittest from test import TestHelper, Conn, parse class TestForwardAll(TestHelper): def test_forward_root(self): resp = self.get('/', req_hdrs={'Host': 'not-example.com'}) status, hdrs, body = parse(resp) self.assertContains(status, "301 Moved Permanently") expect = "http:/...
true
true
1c4405dd71703bf265606d16a607178206d20790
5,053
py
Python
model/flops.py
JACKYLUO1991/Face-skin-hair-segmentaiton-and-skin-color-evaluation
de2375dc0ebff03b8ac39c8a16dee427838c8ac4
[ "Apache-2.0" ]
152
2020-01-02T01:27:50.000Z
2022-03-23T16:40:01.000Z
model/flops.py
JACKYLUO1991/Face-skin-hair-segmentaiton-and-skin-color-evaluation
de2375dc0ebff03b8ac39c8a16dee427838c8ac4
[ "Apache-2.0" ]
10
2020-01-03T07:29:59.000Z
2021-12-11T10:57:30.000Z
model/flops.py
JACKYLUO1991/Face-skin-hair-segmentaiton-and-skin-color-evaluation
de2375dc0ebff03b8ac39c8a16dee427838c8ac4
[ "Apache-2.0" ]
40
2020-01-03T00:41:49.000Z
2021-11-23T11:44:07.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2020/3/27 17:49 # @Author : JackyLUO # @E-mail : lingluo@stumail.neu.edu.cn # @Site : # @File : flops.py # @Software: PyCharm # https://github.com/ckyrkou/Keras_FLOP_Estimator import keras.backend as K def get_flops(model, table=False): if table...
34.141892
106
0.493766
import keras.backend as K def get_flops(model, table=False): if table: print('%25s | %16s | %16s | %16s | %16s | %6s | %6s' % ( 'Layer Name', 'Input Shape', 'Output Shape', 'Kernel Size', 'Filters', 'Strides', 'FLOPS')) print('-' * 170) t_flops = 0 t_macc = 0 f...
true
true
1c4406d3ffd11fb02809d090a8f414c71c74c0e7
835
py
Python
tests/acceptance/test_acceptance.py
magmax/livedoc
40b7041bcb36b2a2ebbd3d5906ce5954dbc7f1ca
[ "Python-2.0" ]
null
null
null
tests/acceptance/test_acceptance.py
magmax/livedoc
40b7041bcb36b2a2ebbd3d5906ce5954dbc7f1ca
[ "Python-2.0" ]
2
2016-06-13T08:37:20.000Z
2021-03-22T16:56:10.000Z
tests/acceptance/test_acceptance.py
magmax/livedoc
40b7041bcb36b2a2ebbd3d5906ce5954dbc7f1ca
[ "Python-2.0" ]
null
null
null
import os import unittest import tempfile from livedoc.__main__ import main class LivedocTest(unittest.TestCase): def test_example1(self): this_path = os.path.dirname(__file__) example_path = os.path.join( os.path.dirname(os.path.dirname(this_path)), 'examples', ...
28.793103
57
0.578443
import os import unittest import tempfile from livedoc.__main__ import main class LivedocTest(unittest.TestCase): def test_example1(self): this_path = os.path.dirname(__file__) example_path = os.path.join( os.path.dirname(os.path.dirname(this_path)), 'examples', ...
true
true
1c4407450f29ef110bf3b72088dfff08feacca6b
5,291
py
Python
src/arg_utils.py
Nicolas-Reyland/python-polygon
2847bebc58d50219ae8fc7eb5cc14d6b8d1161ed
[ "MIT" ]
1
2021-09-03T08:17:11.000Z
2021-09-03T08:17:11.000Z
src/arg_utils.py
Nicolas-Reyland/python-polygon
2847bebc58d50219ae8fc7eb5cc14d6b8d1161ed
[ "MIT" ]
null
null
null
src/arg_utils.py
Nicolas-Reyland/python-polygon
2847bebc58d50219ae8fc7eb5cc14d6b8d1161ed
[ "MIT" ]
null
null
null
from __future__ import annotations from argparse import ArgumentParser import os ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) DEFAULT_ARGS_JSON_FILE_PATH = "default-args.json" class ArgumentError(Exception): """ Simple class, representing an commandline-argument error. """ pass def gen_a...
26.994898
89
0.567757
from __future__ import annotations from argparse import ArgumentParser import os ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) DEFAULT_ARGS_JSON_FILE_PATH = "default-args.json" class ArgumentError(Exception): pass def gen_arg_parser() -> ArgumentParser: parser = ArgumentParser( descriptio...
true
true
1c4407904b26ff7709bfbd7dfc2fb50b553a83f6
25,483
py
Python
tensorflow/python/autograph/operators/control_flow_test.py
fwtan/tensorflow
efa3fb28d94b7937edaafb5874c191ad0e2149ca
[ "Apache-2.0" ]
1
2020-05-14T03:53:01.000Z
2020-05-14T03:53:01.000Z
tensorflow/python/autograph/operators/control_flow_test.py
fwtan/tensorflow
efa3fb28d94b7937edaafb5874c191ad0e2149ca
[ "Apache-2.0" ]
2
2021-08-25T16:05:52.000Z
2022-02-10T01:51:12.000Z
tensorflow/python/autograph/operators/control_flow_test.py
taotesea/tensorflow
5e6479904941624cf7ce58ab3d236375c8012ef4
[ "Apache-2.0" ]
1
2020-08-07T12:49:50.000Z
2020-08-07T12:49:50.000Z
# Lint as: python3 # Copyright 2017 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 ...
28.251663
81
0.608563
from __future__ import absolute_import from __future__ import division from __future__ import print_function import re import sys import numpy as np import six from tensorflow.python.autograph.operators import control_flow from tensorflow.python.autograph.operators import variables as variable_ope...
true
true
1c440820431ca1ad195527bd8221ac39c820de89
1,174
py
Python
pcdet/models/model_utils/layers.py
collector-m/H-23D_R-CNN
40c89c7a6910b738f7e4ed1d0dbb32b1ca99a016
[ "Apache-2.0" ]
49
2021-08-02T02:04:32.000Z
2022-03-31T03:24:23.000Z
pcdet/models/model_utils/layers.py
collector-m/H-23D_R-CNN
40c89c7a6910b738f7e4ed1d0dbb32b1ca99a016
[ "Apache-2.0" ]
5
2021-08-11T06:29:14.000Z
2022-01-23T02:59:29.000Z
pcdet/models/model_utils/layers.py
collector-m/H-23D_R-CNN
40c89c7a6910b738f7e4ed1d0dbb32b1ca99a016
[ "Apache-2.0" ]
3
2021-08-08T12:11:31.000Z
2021-11-30T15:07:32.000Z
import torch import torch.nn as nn class ConvBNReLU(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride=1, eps=1e-3, momentum=0.01): super().__init__() self.block = nn.Sequential( nn.Conv2d(in_channels, out_channels, kernel_size, stride=stride, padding=kernel_size//2, bias=F...
32.611111
107
0.681431
import torch import torch.nn as nn class ConvBNReLU(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride=1, eps=1e-3, momentum=0.01): super().__init__() self.block = nn.Sequential( nn.Conv2d(in_channels, out_channels, kernel_size, stride=stride, padding=kernel_size//2, bias=F...
true
true
1c440acc35d3ac6fc5cec55840701662ea24566a
2,257
py
Python
lib/GenomeImporter/GenomeImporterClient.py
ModelSEED/GenomeImporter
c7af3e37e194315efa59276eed026373b13af658
[ "MIT" ]
null
null
null
lib/GenomeImporter/GenomeImporterClient.py
ModelSEED/GenomeImporter
c7af3e37e194315efa59276eed026373b13af658
[ "MIT" ]
null
null
null
lib/GenomeImporter/GenomeImporterClient.py
ModelSEED/GenomeImporter
c7af3e37e194315efa59276eed026373b13af658
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ############################################################ # # Autogenerated by the KBase type compiler - # any changes made here will be overwritten # ############################################################ from __future__ import print_function # the following is a hack to get the basec...
41.796296
79
0.633584
true
true
1c440ae2da9545be2fbe11a7cf25b19d6daad111
2,515
py
Python
alttprbot_discord/util/embed_formatter.py
skyscooby/sahasrahbot
16fce824bd024f6357a8f260e2447ba477dcdac2
[ "MIT" ]
15
2019-10-15T21:35:59.000Z
2022-03-31T19:49:39.000Z
alttprbot_discord/util/embed_formatter.py
skyscooby/sahasrahbot
16fce824bd024f6357a8f260e2447ba477dcdac2
[ "MIT" ]
12
2019-10-06T01:33:13.000Z
2022-03-10T14:35:16.000Z
alttprbot_discord/util/embed_formatter.py
skyscooby/sahasrahbot
16fce824bd024f6357a8f260e2447ba477dcdac2
[ "MIT" ]
28
2019-11-25T23:49:56.000Z
2022-03-10T04:03:31.000Z
import discord def config(ctx, configdict): embed = discord.Embed( title="Server Configuration", description="List of configuration parameters for this server.", color=discord.Colour.teal()) for item in configdict: embed.add_field(name=item['parameter'], value=item['va...
37.537313
131
0.611531
import discord def config(ctx, configdict): embed = discord.Embed( title="Server Configuration", description="List of configuration parameters for this server.", color=discord.Colour.teal()) for item in configdict: embed.add_field(name=item['parameter'], value=item['va...
true
true
1c440b1e1de464dfdff22caf8ef6161d4e39e699
5,094
py
Python
tests/python/contrib/test_cmsisnn/test_pooling.py
jwfromm/relax
f120282007778706199243ee88b50697c2b9550c
[ "Apache-2.0" ]
2,084
2020-11-25T02:31:53.000Z
2022-03-31T11:33:47.000Z
tests/python/contrib/test_cmsisnn/test_pooling.py
jwfromm/relax
f120282007778706199243ee88b50697c2b9550c
[ "Apache-2.0" ]
3,022
2020-11-24T14:02:31.000Z
2022-03-31T23:55:31.000Z
tests/python/contrib/test_cmsisnn/test_pooling.py
jwfromm/relax
f120282007778706199243ee88b50697c2b9550c
[ "Apache-2.0" ]
977
2020-11-25T00:54:52.000Z
2022-03-31T12:47:08.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
29.275862
98
0.65371
import itertools import numpy as np import pytest import tvm from tvm import relay from tvm.relay.op.contrib import cmsisnn from tests.python.relay.aot.aot_test_utils import ( AOTTestModel, AOT_CORSTONE300_RUNNER, AOT_DEFAULT_RUNNER, generate_ref_data, compile_and_run, ) from util...
true
true
1c440b708248398fce0129be28a565447b2b4b8c
8,025
py
Python
pyEX/tests/test_refdata.py
andrescevp/pyEX
4c8daa411b01133a292d341a78f6e1b80cc2be99
[ "Apache-2.0" ]
null
null
null
pyEX/tests/test_refdata.py
andrescevp/pyEX
4c8daa411b01133a292d341a78f6e1b80cc2be99
[ "Apache-2.0" ]
null
null
null
pyEX/tests/test_refdata.py
andrescevp/pyEX
4c8daa411b01133a292d341a78f6e1b80cc2be99
[ "Apache-2.0" ]
null
null
null
# for Coverage from mock import patch, MagicMock class TestAll: def setup(self): pass # setup() before each test method def teardown(self): pass # teardown() after each test method @classmethod def setup_class(cls): pass # setup_class() before any meth...
33.024691
70
0.594891
from mock import patch, MagicMock class TestAll: def setup(self): pass def teardown(self): pass @classmethod def setup_class(cls): pass @classmethod def teardown_class(cls): pass def test_symbols(self): from p...
true
true
1c440b889b1465133c187d8b8d2d064e1d116e83
6,186
py
Python
pandas/tests/resample/test_timedelta.py
CJL89/pandas
6210077d32a9e9675526ea896e6d1f9189629d4a
[ "BSD-3-Clause" ]
603
2020-12-23T13:49:32.000Z
2022-03-31T23:38:03.000Z
pandas/tests/resample/test_timedelta.py
CJL89/pandas
6210077d32a9e9675526ea896e6d1f9189629d4a
[ "BSD-3-Clause" ]
387
2020-12-15T14:54:04.000Z
2022-03-31T07:00:21.000Z
pandas/tests/resample/test_timedelta.py
CJL89/pandas
6210077d32a9e9675526ea896e6d1f9189629d4a
[ "BSD-3-Clause" ]
35
2021-03-26T03:12:04.000Z
2022-03-23T10:15:10.000Z
from datetime import timedelta import numpy as np import pytest import pandas as pd from pandas import DataFrame, Series import pandas._testing as tm from pandas.core.indexes.timedeltas import timedelta_range def test_asfreq_bug(): df = DataFrame(data=[1, 3], index=[timedelta(), timedelta(minutes=3)]) resul...
33.080214
88
0.631911
from datetime import timedelta import numpy as np import pytest import pandas as pd from pandas import DataFrame, Series import pandas._testing as tm from pandas.core.indexes.timedeltas import timedelta_range def test_asfreq_bug(): df = DataFrame(data=[1, 3], index=[timedelta(), timedelta(minutes=3)]) resul...
true
true
1c440bf67138afa263b8887f4363d386e850994f
1,395
py
Python
azure-mgmt-compute/azure/mgmt/compute/models/storage_profile.py
CharaD7/azure-sdk-for-python
9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c
[ "MIT" ]
null
null
null
azure-mgmt-compute/azure/mgmt/compute/models/storage_profile.py
CharaD7/azure-sdk-for-python
9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c
[ "MIT" ]
null
null
null
azure-mgmt-compute/azure/mgmt/compute/models/storage_profile.py
CharaD7/azure-sdk-for-python
9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
36.710526
79
0.615771
from msrest.serialization import Model class StorageProfile(Model): _attribute_map = { 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'}, 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, } de...
true
true
1c440ead8b5d13c3647b3df37feee6ea8b6383e4
492
py
Python
weather-forecast-api/weather_forecast/tasks/receive_weather_forecast_failure.py
dalmarcogd/weather-forecast
f0987009c5691e46d9b8b6ba6f4408688ebec944
[ "Apache-2.0" ]
null
null
null
weather-forecast-api/weather_forecast/tasks/receive_weather_forecast_failure.py
dalmarcogd/weather-forecast
f0987009c5691e46d9b8b6ba6f4408688ebec944
[ "Apache-2.0" ]
null
null
null
weather-forecast-api/weather_forecast/tasks/receive_weather_forecast_failure.py
dalmarcogd/weather-forecast
f0987009c5691e46d9b8b6ba6f4408688ebec944
[ "Apache-2.0" ]
null
null
null
from typing import Dict from celery.task import Task from weather_forecast.database import queries from weather_forecast.database.models.weather_forecast import WeatherForecastStatus class ReceiveWeatherForecastFailureTask(Task): name = "receive-weather-forecast-failure" ignore_result = True def run(se...
28.941176
86
0.754065
from typing import Dict from celery.task import Task from weather_forecast.database import queries from weather_forecast.database.models.weather_forecast import WeatherForecastStatus class ReceiveWeatherForecastFailureTask(Task): name = "receive-weather-forecast-failure" ignore_result = True def run(se...
true
true
1c44110674bac1be1a91e7868849d9425da2b31e
27,746
py
Python
anchore_engine/utils.py
ballad86/anchore-engine
51f784dbb697586083bce023e2e6a708a25f1797
[ "Apache-2.0" ]
1,484
2017-09-11T19:08:42.000Z
2022-03-29T07:47:44.000Z
anchore_engine/utils.py
ballad86/anchore-engine
51f784dbb697586083bce023e2e6a708a25f1797
[ "Apache-2.0" ]
913
2017-09-27T20:37:53.000Z
2022-03-29T17:21:28.000Z
anchore_engine/utils.py
PhoenixRedflash/anchore-engine
4192eba02bb91cf0eebebe32e8134b27b06feefe
[ "Apache-2.0" ]
294
2017-09-12T16:54:03.000Z
2022-03-14T01:28:51.000Z
""" Generic utilities """ import decimal import os import platform import re import shlex import subprocess import threading import time import uuid from contextlib import contextmanager from operator import itemgetter from ijson import common as ijcommon from ijson.backends import python as ijpython from anchore_eng...
32.225319
161
0.558026
import decimal import os import platform import re import shlex import subprocess import threading import time import uuid from contextlib import contextmanager from operator import itemgetter from ijson import common as ijcommon from ijson.backends import python as ijpython from anchore_engine.subsys import logger ...
true
true
1c44111cc007cf80d7930ed6a4faa8477866dacd
12,036
py
Python
src/docker_code/docker_face_detect_v0.py
yuhaoluo/facenet
d3a3087f52ae1a17a77a1dadb81c53911be97b4b
[ "MIT" ]
null
null
null
src/docker_code/docker_face_detect_v0.py
yuhaoluo/facenet
d3a3087f52ae1a17a77a1dadb81c53911be97b4b
[ "MIT" ]
null
null
null
src/docker_code/docker_face_detect_v0.py
yuhaoluo/facenet
d3a3087f52ae1a17a77a1dadb81c53911be97b4b
[ "MIT" ]
null
null
null
# MIT License # # Copyright (c) 2016 David Sandberg # # 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, me...
36.695122
133
0.601196
from __future__ import absolute_import from __future__ import division from __future__ import print_function from scipy import misc import sys import os import argparse import tensorflow as tf import numpy as np import align.detect_face import time import imageio import requests import json os.en...
true
true
1c4411906a6862cd76a4a9ab8fdaf4a537918ff5
62,520
py
Python
isi_sdk/api/fsa_results_api.py
robzim/isilon_sdk_python
3c2efcae7002f8ad25c0cfcb42a53b4d83e826d7
[ "MIT" ]
null
null
null
isi_sdk/api/fsa_results_api.py
robzim/isilon_sdk_python
3c2efcae7002f8ad25c0cfcb42a53b4d83e826d7
[ "MIT" ]
null
null
null
isi_sdk/api/fsa_results_api.py
robzim/isilon_sdk_python
3c2efcae7002f8ad25c0cfcb42a53b4d83e826d7
[ "MIT" ]
null
null
null
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 3 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # noqa: F401 # python 2 and pyth...
50.056045
334
0.644962
from __future__ import absolute_import import re import six from isi_sdk_8_0.api_client import ApiClient class FsaResultsApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def get_histogram_stat...
true
true
1c4412a8c09bdeeffe088f019f7889bfd861cd4d
1,918
py
Python
command/box.py
DrLarck/DragonBotZ
eab773d6e55f7f5f325828fe249800193120abaf
[ "MIT" ]
3
2020-05-01T07:38:38.000Z
2020-06-02T12:03:40.000Z
command/box.py
DrLarck/DragonBotZ
eab773d6e55f7f5f325828fe249800193120abaf
[ "MIT" ]
19
2020-11-01T22:15:57.000Z
2021-09-08T15:28:30.000Z
command/box.py
DrLarck/DragonBotZ
eab773d6e55f7f5f325828fe249800193120abaf
[ "MIT" ]
1
2021-03-05T04:51:21.000Z
2021-03-05T04:51:21.000Z
""" Box command -- Author : Drlarck Last update : 25/12/20 by DrLarck """ from discord.ext import commands # util from utility.command.checker import CommandChecker from utility.entity.player import Player from utility.global_tool import GlobalTool # tool from utility.command.tool.tool_box import ToolBox class ...
26.273973
80
0.661627
from discord.ext import commands from utility.command.checker import CommandChecker from utility.entity.player import Player from utility.global_tool import GlobalTool from utility.command.tool.tool_box import ToolBox class CommandBox(commands.Cog): def __init__(self, client): self.client =...
true
true
1c4412e0c4f9a993f9fd8586877ecb41b54a8605
2,297
py
Python
mlens/parallel/tests/test_a_learner_subset.py
mehrdad-shokri/mlens
6cbc11354b5f9500a33d9cefb700a1bba9d3199a
[ "MIT" ]
760
2017-03-13T10:11:45.000Z
2022-03-30T20:59:20.000Z
mlens/parallel/tests/test_a_learner_subset.py
rahulsaini/mlens
6cbc11354b5f9500a33d9cefb700a1bba9d3199a
[ "MIT" ]
115
2017-01-18T22:10:33.000Z
2022-03-17T12:42:34.000Z
mlens/parallel/tests/test_a_learner_subset.py
rahulsaini/mlens
6cbc11354b5f9500a33d9cefb700a1bba9d3199a
[ "MIT" ]
96
2017-03-13T10:12:48.000Z
2022-02-23T17:12:39.000Z
""""ML-ENSEMBLE Testing suite for Learner and Transformer """ from mlens.testing import Data, EstimatorContainer, get_learner, run_learner def test_fit(): """[Parallel | Learner | Subset | No Proba | No Prep] test fit""" args = get_learner('fit', 'subsemble', False, False) run_learner(*args) def test_p...
29.448718
76
0.65825
from mlens.testing import Data, EstimatorContainer, get_learner, run_learner def test_fit(): args = get_learner('fit', 'subsemble', False, False) run_learner(*args) def test_predict(): args = get_learner('predict', 'subsemble', False, False) run_learner(*args) def test_transform(): args = get_...
true
true
1c4413a8fd4db352cd8e11d757e9ebd5c2024042
3,019
py
Python
donations/management/commands/export_translations.py
diffractive/newstream
cf1a1f230e18d01c63b50ab9d360aa44ac5a486f
[ "MIT" ]
1
2020-05-03T12:33:42.000Z
2020-05-03T12:33:42.000Z
donations/management/commands/export_translations.py
diffractive/newstream
cf1a1f230e18d01c63b50ab9d360aa44ac5a486f
[ "MIT" ]
14
2020-07-06T20:05:57.000Z
2022-03-12T00:39:11.000Z
donations/management/commands/export_translations.py
diffractive/newstream
cf1a1f230e18d01c63b50ab9d360aa44ac5a486f
[ "MIT" ]
null
null
null
import csv import os import re from zipfile import ZipFile from django.core.management.base import BaseCommand from django.apps import apps from pages.models import HomePage class Command(BaseCommand): help = 'updates .po files, compiles all i18n fields into a csv file and zips them all into one zip file' de...
47.920635
138
0.561444
import csv import os import re from zipfile import ZipFile from django.core.management.base import BaseCommand from django.apps import apps from pages.models import HomePage class Command(BaseCommand): help = 'updates .po files, compiles all i18n fields into a csv file and zips them all into one zip file' de...
true
true
1c4414e04d2fcbc39108f6767504885c71b48ec0
1,927
py
Python
modules/AIWorker/backend/celery_interface.py
junxnone/aerial_wildlife_detection
0eebed2aaf926ceb212b6a2b7a75bb0a82b28a88
[ "MIT" ]
1
2021-04-26T22:50:52.000Z
2021-04-26T22:50:52.000Z
modules/AIWorker/backend/celery_interface.py
junxnone/aerial_wildlife_detection
0eebed2aaf926ceb212b6a2b7a75bb0a82b28a88
[ "MIT" ]
null
null
null
modules/AIWorker/backend/celery_interface.py
junxnone/aerial_wildlife_detection
0eebed2aaf926ceb212b6a2b7a75bb0a82b28a88
[ "MIT" ]
2
2021-04-15T17:26:40.000Z
2021-04-15T17:26:53.000Z
''' Wrapper for the Celery message broker concerning the AIWorker(s). 2019-20 Benjamin Kellenberger ''' import os from celery import current_app from kombu.common import Broadcast from constants.version import AIDE_VERSION from modules.AIWorker.app import AIWorker from util.configDef import Config # ini...
31.080645
128
0.705241
import os from celery import current_app from kombu.common import Broadcast from constants.version import AIDE_VERSION from modules.AIWorker.app import AIWorker from util.configDef import Config modules = os.environ['AIDE_MODULES'] passiveMode = (os.environ['PASSIVE_MODE']=='1' if 'PASSIVE_MODE' in os.environ else ...
true
true
1c44168c82761f7500b7377a312882fa34c63c3c
2,479
py
Python
scripts/empirical/generate_hcp_surrogates.py
netneurolab/markello_spatialnulls
06eb614af626791d55be0e1c8fc3694fa0771c67
[ "BSD-3-Clause" ]
8
2020-08-17T13:00:26.000Z
2022-01-09T05:37:44.000Z
scripts/empirical/generate_hcp_surrogates.py
netneurolab/markello_spatialnulls
06eb614af626791d55be0e1c8fc3694fa0771c67
[ "BSD-3-Clause" ]
1
2021-02-24T19:28:37.000Z
2021-02-24T19:28:37.000Z
scripts/empirical/generate_hcp_surrogates.py
netneurolab/markello_spatialnulls
06eb614af626791d55be0e1c8fc3694fa0771c67
[ "BSD-3-Clause" ]
3
2020-08-27T20:00:04.000Z
2021-01-30T01:55:53.000Z
# -*- coding: utf-8 -*- """ Creates surrogate maps for HCP myelin data using Burt 2018 + 2020 methods. In both cases, surrogate maps are stored as resampling arrays of the original maps and are saved to `data/derivatives/surrogates/<atlas>/<method>/hcp`. """ from pathlib import Path from joblib import Parallel, delay...
30.231707
79
0.657523
from pathlib import Path from joblib import Parallel, delayed from parspin import surrogates, utils as putils ROIDIR = Path('./data/raw/rois').resolve() HCPDIR = Path('./data/derivatives/hcp').resolve() DISTDIR = Path('./data/derivatives/geodesic').resolve() SURRDIR = Path('./data/derivatives/surrogates').resolve(...
true
true
1c4416da16e0e24c7acaf69acc78211ad072d992
3,296
py
Python
update_windows_mappings.py
jean/tzlocal
37b49de83103f81c5e3f414eacf265972b85f9af
[ "MIT" ]
null
null
null
update_windows_mappings.py
jean/tzlocal
37b49de83103f81c5e3f414eacf265972b85f9af
[ "MIT" ]
null
null
null
update_windows_mappings.py
jean/tzlocal
37b49de83103f81c5e3f414eacf265972b85f9af
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # This script generates the mapping between MS Windows timezone names and # tzdata/Olsen timezone names, by retrieving a file: # http://unicode.org/cldr/data/common/supplemental/supplementalData.xml # and parsing it, and from this generating the file windows_tz.py. # # It must be run with Python...
32.313725
105
0.664138
import ftplib import logging from io import BytesIO from pprint import pprint import tarfile from urllib.parse import urlparse from urllib.request import urlopen from xml.dom import minidom WIN_ZONES_URL = 'http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml' ZONEINFO_URL = 'ftp://ftp.ian...
true
true
1c44181b13c6e5605edca9644c493c62871b48d8
900
py
Python
todoism/apis/v1/errors.py
zhaofangfang1991/airsupport-
b2599091dae6105ad7a01444acb9ab53d273675e
[ "MIT" ]
null
null
null
todoism/apis/v1/errors.py
zhaofangfang1991/airsupport-
b2599091dae6105ad7a01444acb9ab53d273675e
[ "MIT" ]
null
null
null
todoism/apis/v1/errors.py
zhaofangfang1991/airsupport-
b2599091dae6105ad7a01444acb9ab53d273675e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from flask import jsonify from werkzeug.http import HTTP_STATUS_CODES from todoism.apis.v1 import api_v1 def api_abort(code, message=None, **kwargs): if message is None: message = HTTP_STATUS_CODES.get(code, '') response = jsonify(code=code, message=message, **kwargs) re...
24.324324
114
0.718889
from flask import jsonify from werkzeug.http import HTTP_STATUS_CODES from todoism.apis.v1 import api_v1 def api_abort(code, message=None, **kwargs): if message is None: message = HTTP_STATUS_CODES.get(code, '') response = jsonify(code=code, message=message, **kwargs) response.status_code = co...
true
true
1c441909547247dc21e1764be21febe8946d6c2e
6,424
py
Python
global_directions/cog_predict.py
bfirsh/StyleCLIP
164fa8497ea91ea184c0488fcc5e3e14f709561a
[ "MIT" ]
null
null
null
global_directions/cog_predict.py
bfirsh/StyleCLIP
164fa8497ea91ea184c0488fcc5e3e14f709561a
[ "MIT" ]
null
null
null
global_directions/cog_predict.py
bfirsh/StyleCLIP
164fa8497ea91ea184c0488fcc5e3e14f709561a
[ "MIT" ]
null
null
null
import tempfile from pathlib import Path import os from argparse import Namespace import time import dlib import os import sys import numpy as np from PIL import Image import torch import torchvision.transforms as transforms import tensorflow as tf import numpy as np import torch import clip from PIL import Image impor...
32.444444
197
0.636986
import tempfile from pathlib import Path import os from argparse import Namespace import time import dlib import os import sys import numpy as np from PIL import Image import torch import torchvision.transforms as transforms import tensorflow as tf import numpy as np import torch import clip from PIL import Image impor...
true
true
1c4419cfc5241033119415ac6f09947cc75e8ab2
40,341
py
Python
superset/security/manager.py
GodelTech/superset
da170aa57e94053cf715f7b41b09901c813a149a
[ "Apache-2.0" ]
44
2021-04-14T10:53:36.000Z
2021-09-11T00:29:50.000Z
superset/security/manager.py
GodelTech/superset
da170aa57e94053cf715f7b41b09901c813a149a
[ "Apache-2.0" ]
60
2021-04-09T08:17:13.000Z
2022-03-04T07:41:38.000Z
superset/security/manager.py
GodelTech/superset
da170aa57e94053cf715f7b41b09901c813a149a
[ "Apache-2.0" ]
11
2021-06-09T08:30:57.000Z
2021-11-30T03:16:14.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
35.763298
88
0.620634
import logging import re from typing import Any, Callable, cast, List, Optional, Set, Tuple, TYPE_CHECKING, Union from flask import current_app, g from flask_appbuilder import Model from flask_appbuilder.security.sqla.manager import SecurityManager from flask_appbuilder.security.sqla.models import ( ...
true
true
1c441a02c742a3dfe6abbfd727f960c9fef4f1d5
552
py
Python
network/migrations/0007_auto_20181013_1141.py
pawangeek/PollsChain
6059796c671d3250f2cd8bb36171bf54013d176e
[ "MIT" ]
null
null
null
network/migrations/0007_auto_20181013_1141.py
pawangeek/PollsChain
6059796c671d3250f2cd8bb36171bf54013d176e
[ "MIT" ]
null
null
null
network/migrations/0007_auto_20181013_1141.py
pawangeek/PollsChain
6059796c671d3250f2cd8bb36171bf54013d176e
[ "MIT" ]
null
null
null
# Generated by Django 2.1 on 2018-10-13 11:41 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('network', '0006_transaction_transaction_id'), ] operations = [ migrations.RemoveField( model_name='block', name='trans...
23
62
0.586957
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('network', '0006_transaction_transaction_id'), ] operations = [ migrations.RemoveField( model_name='block', name='transaction', ), migrations.AddFie...
true
true
1c441a48841857af47bd57c1c28d22667ebaeb0d
542
py
Python
A_mecanica_das_Classes_e_Instancias/09-Instance-Methods.py
nnsdtr/OOP-Python
3b739966c9b35c32a2bd934574f6421b1470eb23
[ "MIT" ]
null
null
null
A_mecanica_das_Classes_e_Instancias/09-Instance-Methods.py
nnsdtr/OOP-Python
3b739966c9b35c32a2bd934574f6421b1470eb23
[ "MIT" ]
null
null
null
A_mecanica_das_Classes_e_Instancias/09-Instance-Methods.py
nnsdtr/OOP-Python
3b739966c9b35c32a2bd934574f6421b1470eb23
[ "MIT" ]
null
null
null
# Exemplo 1: class Person(object): greeting = '\nHello there!' joe = Person() print(joe.greeting) print('\n') # Exemplo 2: # Método interno à classe utiliza self como 1º parâmetro, sempre. class Something(object): def call_this_method(self): print('Verificação de john == john.call_this_method() re...
20.846154
98
0.693727
class Person(object): greeting = '\nHello there!' joe = Person() print(joe.greeting) print('\n') class Something(object): def call_this_method(self): print('Verificação de john == john.call_this_method() resulta em:') return self john = Something() print(john == john.call_this_meth...
true
true
1c441b172e4ee117cc58cbc80d255338d7e0f552
2,835
py
Python
tests/test_queries.py
klen/aio-databases
395edcc810598e1639ccd9727aecb4d97cf04df9
[ "MIT" ]
6
2021-08-13T16:17:47.000Z
2022-02-04T01:22:02.000Z
tests/test_queries.py
klen/aio-databases
395edcc810598e1639ccd9727aecb4d97cf04df9
[ "MIT" ]
null
null
null
tests/test_queries.py
klen/aio-databases
395edcc810598e1639ccd9727aecb4d97cf04df9
[ "MIT" ]
null
null
null
import pytest from pypika import Parameter @pytest.fixture async def schema(pool, User, manager): UserManager = manager(User) await pool.execute(UserManager.create_table().if_not_exists()) yield await pool.execute(UserManager.drop_table().if_exists()) async def test_base(db): await db.execute("...
29.842105
88
0.631393
import pytest from pypika import Parameter @pytest.fixture async def schema(pool, User, manager): UserManager = manager(User) await pool.execute(UserManager.create_table().if_not_exists()) yield await pool.execute(UserManager.drop_table().if_exists()) async def test_base(db): await db.execute("...
true
true
1c441ba3d757d278aee135f301e462d85e7c43f4
2,447
py
Python
python/GafferAppleseedUI/AppleseedRenderUI.py
ddesmond/gaffer
4f25df88103b7893df75865ea919fb035f92bac0
[ "BSD-3-Clause" ]
561
2016-10-18T04:30:48.000Z
2022-03-30T06:52:04.000Z
python/GafferAppleseedUI/AppleseedRenderUI.py
ddesmond/gaffer
4f25df88103b7893df75865ea919fb035f92bac0
[ "BSD-3-Clause" ]
1,828
2016-10-14T19:01:46.000Z
2022-03-30T16:07:19.000Z
python/GafferAppleseedUI/AppleseedRenderUI.py
ddesmond/gaffer
4f25df88103b7893df75865ea919fb035f92bac0
[ "BSD-3-Clause" ]
120
2016-10-18T15:19:13.000Z
2021-12-20T16:28:23.000Z
########################################################################## # # Copyright (c) 2014, Esteban Tovagliari. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistribution...
32.626667
77
0.688598
true
true
1c441bb44de6f92ddbdce2bba4858f65eb61b169
3,559
py
Python
bindings/python/ensmallen/datasets/string/coriobacteriumglomerans.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/string/coriobacteriumglomerans.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/coriobacteriumglomerans.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph Coriobacterium glomerans. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: protein--prote...
32.953704
223
0.678561
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen import Graph def CoriobacteriumGlomerans( directed: bool = False, preprocess: bool = True, load_nodes: bool = True, verbose: int = 2, cache: bool = True, cache_path: str = "graphs/s...
true
true
1c441bde02d7e435b5ed2bc275e134215dc9609b
54,472
py
Python
fmpy/gui/MainWindow.py
CSchulzeTLK/FMPy
fde192346c36eb69dbaca60a96e80cdc8ef37b89
[ "CC-BY-3.0", "CC-BY-4.0" ]
1
2021-03-17T14:24:08.000Z
2021-03-17T14:24:08.000Z
fmpy/gui/MainWindow.py
CSchulzeTLK/FMPy
fde192346c36eb69dbaca60a96e80cdc8ef37b89
[ "CC-BY-3.0", "CC-BY-4.0" ]
null
null
null
fmpy/gui/MainWindow.py
CSchulzeTLK/FMPy
fde192346c36eb69dbaca60a96e80cdc8ef37b89
[ "CC-BY-3.0", "CC-BY-4.0" ]
null
null
null
""" Entry point for the graphical user interface """ try: from . import compile_resources compile_resources() except Exception as e: print("Failed to compiled resources. %s" % e) import os import sys from PyQt5.QtCore import QCoreApplication, QDir, Qt, pyqtSignal, QUrl, QSettings, QPoint, QTim...
41.966102
272
0.62265
try: from . import compile_resources compile_resources() except Exception as e: print("Failed to compiled resources. %s" % e) import os import sys from PyQt5.QtCore import QCoreApplication, QDir, Qt, pyqtSignal, QUrl, QSettings, QPoint, QTimer, QStandardPaths, \ QPointF, QBuffer, QIODevice...
true
true
1c441c536b6f0ba2ae48a33a2e97137a6527f44f
17,494
py
Python
lib/python2.7/site-packages/matplotlib/tests/test_dates.py
wfehrnstrom/harmonize
e5661d24b2021739e8ac4bf1d3a530eda4e155b3
[ "MIT" ]
1
2017-12-05T15:35:47.000Z
2017-12-05T15:35:47.000Z
lib/python2.7/site-packages/matplotlib/tests/test_dates.py
wfehrnstrom/harmonize
e5661d24b2021739e8ac4bf1d3a530eda4e155b3
[ "MIT" ]
10
2017-07-13T00:24:03.000Z
2017-07-17T07:39:03.000Z
lib/python2.7/site-packages/matplotlib/tests/test_dates.py
wfehrnstrom/harmonize
e5661d24b2021739e8ac4bf1d3a530eda4e155b3
[ "MIT" ]
7
2017-08-01T04:02:07.000Z
2018-10-06T21:07:20.000Z
from __future__ import (absolute_import, division, print_function, unicode_literals) import six from six.moves import map import datetime import warnings import tempfile import dateutil import pytz try: # mock in python 3.3+ from unittest import mock except ImportError: import mo...
36.752101
89
0.613124
from __future__ import (absolute_import, division, print_function, unicode_literals) import six from six.moves import map import datetime import warnings import tempfile import dateutil import pytz try: from unittest import mock except ImportError: import mock from nose.tools im...
true
true
1c441f687a15c8a847fbb5b8238c9fec5fcdeb16
728
py
Python
icekit/plugins/child_pages/migrations/0001_initial.py
ic-labs/django-icekit
c507ea5b1864303732c53ad7c5800571fca5fa94
[ "MIT" ]
52
2016-09-13T03:50:58.000Z
2022-02-23T16:25:08.000Z
icekit/plugins/child_pages/migrations/0001_initial.py
ic-labs/django-icekit
c507ea5b1864303732c53ad7c5800571fca5fa94
[ "MIT" ]
304
2016-08-11T14:17:30.000Z
2020-07-22T13:35:18.000Z
icekit/plugins/child_pages/migrations/0001_initial.py
ic-labs/django-icekit
c507ea5b1864303732c53ad7c5800571fca5fa94
[ "MIT" ]
12
2016-09-21T18:46:35.000Z
2021-02-15T19:37:50.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('fluent_contents', '0001_initial'), ] operations = [ migrations.CreateModel( name='ChildPageItem', fi...
28
164
0.593407
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('fluent_contents', '0001_initial'), ] operations = [ migrations.CreateModel( name='ChildPageItem', fields=[ ...
true
true
1c441f7092ffbffe374692c431f8dc72b30823c8
21,565
py
Python
pyrpg/pyrpg19/pyrpg19.py
kenjisatoh/pygame
cf5ba2331dc6b4a930f9c3dacbaa7954f51498db
[ "MIT" ]
22
2016-06-02T06:05:59.000Z
2021-05-17T03:38:28.000Z
pyrpg/pyrpg19/pyrpg19.py
kenjisatoh/pygame
cf5ba2331dc6b4a930f9c3dacbaa7954f51498db
[ "MIT" ]
null
null
null
pyrpg/pyrpg19/pyrpg19.py
kenjisatoh/pygame
cf5ba2331dc6b4a930f9c3dacbaa7954f51498db
[ "MIT" ]
17
2016-03-04T12:29:15.000Z
2020-11-29T13:11:28.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import pygame from pygame.locals import * import codecs import os import random import struct import sys SCR_RECT = Rect(0, 0, 640, 480) GS = 32 DOWN,LEFT,RIGHT,UP = 0,1,2,3 STOP, MOVE = 0, 1 # 移動タイプ PROB_MOVE = 0.005 # 移動確率 TRANS_COLOR = (190,179,145) # マップチップの透明色 def...
37.569686
124
0.542175
import pygame from pygame.locals import * import codecs import os import random import struct import sys SCR_RECT = Rect(0, 0, 640, 480) GS = 32 DOWN,LEFT,RIGHT,UP = 0,1,2,3 STOP, MOVE = 0, 1 PROB_MOVE = 0.005 TRANS_COLOR = (190,179,145) def main(): pygame.init() screen = pygame.display.set_mode(SCR_R...
false
true
1c4421bf3400323db69447583130a58df30bd901
1,811
py
Python
src/embedding/auxiliary/factory.py
chengemily/Distributional-Signatures
7ef96f9cfc8aeb2fb54e117e3968e4390aaad819
[ "MIT" ]
243
2019-08-15T18:34:09.000Z
2022-03-31T11:51:00.000Z
src/embedding/auxiliary/factory.py
phymucs/460d60d2c25a118c67dcbfdd37f27d6c
cd7e4659fc9761a8af046e824853aa338b22f2f6
[ "MIT" ]
34
2019-10-22T08:11:28.000Z
2022-03-19T08:03:30.000Z
src/embedding/auxiliary/factory.py
phymucs/460d60d2c25a118c67dcbfdd37f27d6c
cd7e4659fc9761a8af046e824853aa338b22f2f6
[ "MIT" ]
54
2019-08-19T16:11:49.000Z
2022-03-31T05:36:01.000Z
import datetime import torch import torch.nn as nn import torch.nn.functional as F from embedding.auxiliary.pos import POS def get_embedding(args): ''' @return AUX module with aggregated embeddings or None if args.aux did not provide additional embeddings ''' print("{}, Building augmente...
27.861538
78
0.605191
import datetime import torch import torch.nn as nn import torch.nn.functional as F from embedding.auxiliary.pos import POS def get_embedding(args): print("{}, Building augmented embedding".format( datetime.datetime.now().strftime('%02y/%02m/%02d %H:%M:%S'))) aux = [] for ebd in args.auxiliary: ...
true
true
1c44232a092f5ad3d514e0826917e96a5a8c0b13
1,278
py
Python
leads/urls.py
tmbyers1102/djcrm
7a2830a3d1867a223a748b5cb9b771fcc45577e4
[ "MIT" ]
null
null
null
leads/urls.py
tmbyers1102/djcrm
7a2830a3d1867a223a748b5cb9b771fcc45577e4
[ "MIT" ]
null
null
null
leads/urls.py
tmbyers1102/djcrm
7a2830a3d1867a223a748b5cb9b771fcc45577e4
[ "MIT" ]
null
null
null
from django.urls import path from .views import ( LeadListView, LeadDetailView, LeadCreateView, LeadUpdateView, LeadDeleteView, AssignAgentView, CategoryListView, CategoryDetailView, LeadCategoryUpdateView, CategoryCreateView, CategoryUpdateView, CategoryDeleteView ) app_name = "leads" urlpatterns = [ ...
55.565217
94
0.717527
from django.urls import path from .views import ( LeadListView, LeadDetailView, LeadCreateView, LeadUpdateView, LeadDeleteView, AssignAgentView, CategoryListView, CategoryDetailView, LeadCategoryUpdateView, CategoryCreateView, CategoryUpdateView, CategoryDeleteView ) app_name = "leads" urlpatterns = [ ...
true
true
1c4423c0dbd6723411c958372c1c8fc474df25d0
819
py
Python
examples/loading_images.py
FPEPOSHI/PyBoof
00c67c0689be35019b65d5e5dc1a8a5a8e471d9d
[ "Apache-2.0" ]
1
2022-02-10T04:18:28.000Z
2022-02-10T04:18:28.000Z
examples/loading_images.py
yuantailing/PyBoof
a5a0ffba6adfeb8d97c099c2470995553466eeaa
[ "Apache-2.0" ]
null
null
null
examples/loading_images.py
yuantailing/PyBoof
a5a0ffba6adfeb8d97c099c2470995553466eeaa
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import numpy as np import cv2 import pyboof as pb # Enable use of memory mapped files for MUCH faster conversion of images between java and python pb.init_memmap() image_path = '../data/example/outdoors01.jpg' # Can load an image using OpenCV then convert it into BoofCV ndarray_img = cv2.imr...
26.419355
96
0.73138
import numpy as np import cv2 import pyboof as pb pb.init_memmap() image_path = '../data/example/outdoors01.jpg' ndarray_img = cv2.imread(image_path, 0) boof_cv = pb.ndarray_to_boof(ndarray_img) boof_gray = pb.load_single_band(image_path, np.uint8) boof_color = pb.load_planar(image_path, np.uint8) # displa...
true
true
1c4423ccd33c81a933965b4db4ae0ecdcaf8a624
1,563
py
Python
app/urls.py
victoriadrake/django-starter
4fbb423edf79bf4e512a4a6c578072c539d00b9d
[ "MIT" ]
6
2021-08-25T12:06:29.000Z
2022-02-16T12:36:58.000Z
app/urls.py
victoriadrake/django-starter
4fbb423edf79bf4e512a4a6c578072c539d00b9d
[ "MIT" ]
null
null
null
app/urls.py
victoriadrake/django-starter
4fbb423edf79bf4e512a4a6c578072c539d00b9d
[ "MIT" ]
2
2021-08-28T07:50:16.000Z
2022-02-21T09:47:46.000Z
"""URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based views ...
39.075
87
0.715291
import app.views as views from django.conf import settings from django.urls import re_path from django.views.static import serve from django.contrib import admin from django.urls import include, path urlpatterns = [path("admin/", admin.site.urls), path("", views.Welcome.as_view())] if settings.DEBUG: from django....
true
true
1c4423e641fedf13db70ea243a100a5ec19fb37b
711
py
Python
dodo.py
Thirty-OneR/Astr496_assignment03
e5c8c842906fa9d6c141fb92a0fc9e134810ec64
[ "BSD-3-Clause" ]
null
null
null
dodo.py
Thirty-OneR/Astr496_assignment03
e5c8c842906fa9d6c141fb92a0fc9e134810ec64
[ "BSD-3-Clause" ]
null
null
null
dodo.py
Thirty-OneR/Astr496_assignment03
e5c8c842906fa9d6c141fb92a0fc9e134810ec64
[ "BSD-3-Clause" ]
null
null
null
from doit.tools import run_once import h5py import numpy as np import matplotlib.pyplot as plt def task_generate_gaussian(): N = 32**3 seed = 0x4d3d3d3 fn = "gaussian.h5" def _generate(): np.random.seed(seed) pos = np.random.normal(loc = [0.5, 0.5, 0.5], scale = 0.2, size = (N, 3)) ...
33.857143
81
0.583685
from doit.tools import run_once import h5py import numpy as np import matplotlib.pyplot as plt def task_generate_gaussian(): N = 32**3 seed = 0x4d3d3d3 fn = "gaussian.h5" def _generate(): np.random.seed(seed) pos = np.random.normal(loc = [0.5, 0.5, 0.5], scale = 0.2, size = (N, 3)) ...
true
true
1c4423f3e839538adbe798b9a8ec37bc7802b9d8
4,881
py
Python
ciscoisesdk/models/validators/v3_1_0/jsd_df9ab8ff636353279d5c787585dcb6af.py
CiscoISE/ciscoisesdk
860b0fc7cc15d0c2a39c64608195a7ab3d5f4885
[ "MIT" ]
36
2021-05-18T16:24:19.000Z
2022-03-05T13:44:41.000Z
ciscoisesdk/models/validators/v3_0_0/jsd_df9ab8ff636353279d5c787585dcb6af.py
CiscoISE/ciscoisesdk
860b0fc7cc15d0c2a39c64608195a7ab3d5f4885
[ "MIT" ]
15
2021-06-08T19:03:37.000Z
2022-02-25T14:47:33.000Z
ciscoisesdk/models/validators/v3_1_0/jsd_df9ab8ff636353279d5c787585dcb6af.py
CiscoISE/ciscoisesdk
860b0fc7cc15d0c2a39c64608195a7ab3d5f4885
[ "MIT" ]
6
2021-06-10T09:32:01.000Z
2022-01-12T08:34:39.000Z
# -*- coding: utf-8 -*- """Identity Services Engine updateRadiusServerSequenceById data model. Copyright (c) 2021 Cisco and/or its affiliates. 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 with...
31.694805
83
0.461995
from __future__ import ( absolute_import, division, print_function, unicode_literals, ) import fastjsonschema import json from ciscoisesdk.exceptions import MalformedRequest from builtins import * class JSONSchemaValidatorDf9Ab8Ff636353279D5C787585Dcb6Af(object): def __init__(self): s...
true
true
1c44240d49c67657b76398b4c928871217f7814a
1,365
py
Python
blog/migrations/0001_initial.py
albertmil97/django_AlbertMIliano
9d1c1763e9061083d1cc1e389a77423cfd2e7daf
[ "MIT" ]
null
null
null
blog/migrations/0001_initial.py
albertmil97/django_AlbertMIliano
9d1c1763e9061083d1cc1e389a77423cfd2e7daf
[ "MIT" ]
null
null
null
blog/migrations/0001_initial.py
albertmil97/django_AlbertMIliano
9d1c1763e9061083d1cc1e389a77423cfd2e7daf
[ "MIT" ]
null
null
null
# Generated by Django 3.0.7 on 2020-06-08 04:47 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUT...
37.916667
146
0.606593
from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ ...
true
true
1c4424f6ccb062b4183b7bc73cbbf4c674e6bcfd
25,179
py
Python
hw/vendor/lowrisc_ibex/vendor/google_riscv-dv/pygen/pygen_src/isa/riscv_cov_instr.py
msfschaffner/opentitan-bak
de4cb1bb9e7b707a3ca2a6882d83af7ed2aa1ab8
[ "Apache-2.0" ]
1
2021-12-15T09:23:09.000Z
2021-12-15T09:23:09.000Z
hw/vendor/lowrisc_ibex/vendor/google_riscv-dv/pygen/pygen_src/isa/riscv_cov_instr.py
msfschaffner/opentitan-bak
de4cb1bb9e7b707a3ca2a6882d83af7ed2aa1ab8
[ "Apache-2.0" ]
3
2020-05-29T13:12:25.000Z
2020-06-19T13:07:23.000Z
hw/vendor/lowrisc_ibex/vendor/google_riscv-dv/pygen/pygen_src/isa/riscv_cov_instr.py
msfschaffner/opentitan-bak
de4cb1bb9e7b707a3ca2a6882d83af7ed2aa1ab8
[ "Apache-2.0" ]
1
2021-08-28T16:19:23.000Z
2021-08-28T16:19:23.000Z
"""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 agreed to in writing, software dis...
42.604061
91
0.569959
import vsc import logging from importlib import import_module from enum import IntEnum, auto from pygen_src.riscv_instr_pkg import * from pygen_src.riscv_instr_gen_config import cfg rcs = import_module("pygen_src.target." + cfg.argv.target + ".riscv_core_setting") class operand_sign_e(IntEnum): POSITIVE = 0 ...
true
true
1c4425361079a914aa13fb002ab4d66acd3e4a30
104
py
Python
poetry/__main__.py
uda/poetry
30e3d7e33c20cbe2af8eda06e0db4888275caaa1
[ "MIT" ]
12,347
2019-12-12T07:07:32.000Z
2022-03-31T21:08:50.000Z
poetry/__main__.py
uda/poetry
30e3d7e33c20cbe2af8eda06e0db4888275caaa1
[ "MIT" ]
3,483
2019-12-11T20:20:20.000Z
2022-03-31T23:18:18.000Z
poetry/__main__.py
uda/poetry
30e3d7e33c20cbe2af8eda06e0db4888275caaa1
[ "MIT" ]
1,399
2019-12-12T12:27:46.000Z
2022-03-31T09:12:53.000Z
import sys if __name__ == "__main__": from .console.application import main sys.exit(main())
13
41
0.673077
import sys if __name__ == "__main__": from .console.application import main sys.exit(main())
true
true
1c44263ae8800ae610a0ea2b221f9c8a0ffd43f6
911
py
Python
handlers/InputHandler.py
sachio222/socketchat_v3
cd62b892842f6708055359fa2384269038f425dc
[ "MIT" ]
1
2020-11-30T03:54:35.000Z
2020-11-30T03:54:35.000Z
handlers/InputHandler.py
sachio222/socketchat_v3
cd62b892842f6708055359fa2384269038f425dc
[ "MIT" ]
null
null
null
handlers/InputHandler.py
sachio222/socketchat_v3
cd62b892842f6708055359fa2384269038f425dc
[ "MIT" ]
null
null
null
import socket from sys import prefix from chatutils import utils import config.filepaths as paths from handlers import EncryptionHandler, ClientMsgHandler prefixes = utils.JSONLoader(paths.prefix_path) def dispatch(sock: socket, msg: str) -> bytes: """Splits input data between commands and transmissions. Me...
30.366667
69
0.637761
import socket from sys import prefix from chatutils import utils import config.filepaths as paths from handlers import EncryptionHandler, ClientMsgHandler prefixes = utils.JSONLoader(paths.prefix_path) def dispatch(sock: socket, msg: str) -> bytes: if len(msg): if msg[0] == '/': msg = Clien...
true
true
1c4427a91f89d5195c34bc012f9a3d3cfc65f9b3
3,355
py
Python
Octopus/app/__init__.py
zhnlk/octopus
4deb502eebc655ed512273a330b885d77bb8e32a
[ "MIT" ]
null
null
null
Octopus/app/__init__.py
zhnlk/octopus
4deb502eebc655ed512273a330b885d77bb8e32a
[ "MIT" ]
null
null
null
Octopus/app/__init__.py
zhnlk/octopus
4deb502eebc655ed512273a330b885d77bb8e32a
[ "MIT" ]
null
null
null
# Import flask and template operators import logging import traceback import apscheduler from apscheduler.schedulers.background import BackgroundScheduler from flask import Flask from flask import jsonify from flask_basicauth import BasicAuth from flask_restful import Api from flask_restful_swagger import swagger from...
25.807692
100
0.739493
import logging import traceback import apscheduler from apscheduler.schedulers.background import BackgroundScheduler from flask import Flask from flask import jsonify from flask_basicauth import BasicAuth from flask_restful import Api from flask_restful_swagger import swagger from flask_sqlalchemy import SQLAlchemy f...
true
true
1c4427b25aca05f214bd3202fd7bba4c40a1e7a0
87,751
py
Python
typhon/plots/cm/_cmocean.py
tmieslinger/typhon
588539e5c4831ee18753d7ead5b2f2736e922bb1
[ "MIT" ]
53
2017-09-19T06:40:37.000Z
2022-03-21T07:59:30.000Z
typhon/plots/cm/_cmocean.py
tmieslinger/typhon
588539e5c4831ee18753d7ead5b2f2736e922bb1
[ "MIT" ]
96
2017-09-18T12:01:42.000Z
2021-12-17T13:54:45.000Z
typhon/plots/cm/_cmocean.py
tmieslinger/typhon
588539e5c4831ee18753d7ead5b2f2736e922bb1
[ "MIT" ]
32
2017-09-07T09:09:21.000Z
2021-10-01T03:54:23.000Z
# -*- coding: utf-8 -*- """ It is a subset of the cmocean package [0] provided by Kristen M. Thyng. The MIT License (MIT) Copyright (c) 2015 Kristen M. Thyng 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 t...
41.548769
78
0.645337
_density_data = [ [0.90220216, 0.94417980, 0.94380273], [0.89544454, 0.94095789, 0.94106488], [0.88868558, 0.93774038, 0.93840987], [0.88192751, 0.93452625, 0.93583728], [0.87517248, 0.93131455, 0.93334654], [0.86842255, 0.92810438, 0.93093690], [0.86167970, 0.92489490, 0.92860749], [0...
true
true
1c442889a1b7474a639e574b6d8ff896dff9adeb
7,809
py
Python
instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py
stschenk/opentelemetry-python-contrib
28c1331e571d386baab74f5028e3268e4bfda4cd
[ "Apache-2.0", "BSD-3-Clause" ]
1
2020-03-17T05:37:21.000Z
2020-03-17T05:37:21.000Z
instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py
stschenk/opentelemetry-python-contrib
28c1331e571d386baab74f5028e3268e4bfda4cd
[ "Apache-2.0", "BSD-3-Clause" ]
3
2019-08-26T13:06:36.000Z
2020-02-21T21:44:02.000Z
instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py
stschenk/opentelemetry-python-contrib
28c1331e571d386baab74f5028e3268e4bfda4cd
[ "Apache-2.0", "BSD-3-Clause" ]
1
2020-10-22T20:13:37.000Z
2020-10-22T20:13:37.000Z
# Copyright The 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 in ...
37.363636
91
0.619029
import operator import typing import urllib from functools import wraps from typing import Tuple from asgiref.compatibility import guarantee_single_callable from opentelemetry import context, propagators, trace from opentelemetry.instrumentation.asgi.version import __version__ from opentelemetry.inst...
true
true
1c4429efcf1bf8e61716fe3bf3416c05614bb251
6,071
py
Python
tests/falcon_test.py
titaux12/falcon-apispec
2f680622ddfb2af57685903578f9d4dccba72a6b
[ "MIT" ]
null
null
null
tests/falcon_test.py
titaux12/falcon-apispec
2f680622ddfb2af57685903578f9d4dccba72a6b
[ "MIT" ]
null
null
null
tests/falcon_test.py
titaux12/falcon-apispec
2f680622ddfb2af57685903578f9d4dccba72a6b
[ "MIT" ]
1
2021-03-25T17:13:09.000Z
2021-03-25T17:13:09.000Z
import logging import falcon import pytest from apispec import APISpec from apispec.exceptions import APISpecError from falcon_apispec import FalconPlugin logging.basicConfig(level="DEBUG") @pytest.fixture() def spec_factory(): def _spec(app): return APISpec( title="Swagger Petstore", ...
30.661616
79
0.51919
import logging import falcon import pytest from apispec import APISpec from apispec.exceptions import APISpecError from falcon_apispec import FalconPlugin logging.basicConfig(level="DEBUG") @pytest.fixture() def spec_factory(): def _spec(app): return APISpec( title="Swagger Petstore", ...
true
true
1c442aa98df653b95bdf0ffef94696a49f90a158
22,175
py
Python
sdk/python/pulumi_azure_native/network/v20200501/express_route_port.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20200501/express_route_port.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20200501/express_route_port.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
47.997835
3,108
0.670891
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs from ._enums import * from ._inputs import * __all__ = ['ExpressRoutePortArgs', 'ExpressRoutePort'] @pulumi.input_type class ExpressRoutePortArg...
true
true
1c442ab2c8f5c84fc82c2d5fdb56f5553c96b1cb
14,164
py
Python
reversion/revisions.py
baffolobill/django-reversion
e0e12ce00f91043ba9c828dc47cbe0e57d3cbc36
[ "BSD-3-Clause" ]
null
null
null
reversion/revisions.py
baffolobill/django-reversion
e0e12ce00f91043ba9c828dc47cbe0e57d3cbc36
[ "BSD-3-Clause" ]
null
null
null
reversion/revisions.py
baffolobill/django-reversion
e0e12ce00f91043ba9c828dc47cbe0e57d3cbc36
[ "BSD-3-Clause" ]
null
null
null
from collections import namedtuple, defaultdict from contextlib import contextmanager from functools import wraps from threading import local from django.apps import apps from django.core import serializers from django.core.exceptions import ObjectDoesNotExist from django.db import models, transaction, router from djan...
30.724512
109
0.662666
from collections import namedtuple, defaultdict from contextlib import contextmanager from functools import wraps from threading import local from django.apps import apps from django.core import serializers from django.core.exceptions import ObjectDoesNotExist from django.db import models, transaction, router from djan...
true
true
1c442c4ca43be27ff4775ef2715d2c6c62226955
3,211
py
Python
rfxcom/protocol/lighting2.py
d0ugal-archive/python-rfxcom
2eb87f85e5f5a04d00f32f25e0f010edfefbde0d
[ "BSD-3-Clause" ]
3
2015-07-16T13:33:13.000Z
2017-09-17T13:11:42.000Z
rfxcom/protocol/lighting2.py
d0ugal/python-rfxcom
2eb87f85e5f5a04d00f32f25e0f010edfefbde0d
[ "BSD-3-Clause" ]
6
2015-07-20T21:50:36.000Z
2017-06-05T06:06:25.000Z
rfxcom/protocol/lighting2.py
d0ugal-archive/python-rfxcom
2eb87f85e5f5a04d00f32f25e0f010edfefbde0d
[ "BSD-3-Clause" ]
6
2015-07-21T07:47:25.000Z
2017-03-03T05:11:03.000Z
""" Lighting 5 ========== """ from rfxcom.protocol.base import BasePacketHandler from rfxcom.protocol.rfxpacketutils import RfxPacketUtils SUB_TYPE_COMMANDS = { 0x00: { 0x00: 'Off', 0x01: 'On', 0x02: 'Set level', 0x03: 'Group Off', 0x04: 'Group On', 0x05: 'Set Gro...
22.612676
78
0.50109
from rfxcom.protocol.base import BasePacketHandler from rfxcom.protocol.rfxpacketutils import RfxPacketUtils SUB_TYPE_COMMANDS = { 0x00: { 0x00: 'Off', 0x01: 'On', 0x02: 'Set level', 0x03: 'Group Off', 0x04: 'Group On', 0x05: 'Set Group Level', }, 0x01: { ...
true
true
1c442c763412ef5363e2973cbb581f3531ffb93c
32,879
py
Python
mmdet/datasets/pipelines/transforms.py
ktw361/Local-Mid-Propagation
0a99e82cccf8c35bc5f6989af2702203def4c7a4
[ "Apache-2.0" ]
10
2020-08-13T17:51:20.000Z
2021-05-23T08:31:50.000Z
mmdet/datasets/pipelines/transforms.py
ktw361/Local-Mid-Propagation
0a99e82cccf8c35bc5f6989af2702203def4c7a4
[ "Apache-2.0" ]
null
null
null
mmdet/datasets/pipelines/transforms.py
ktw361/Local-Mid-Propagation
0a99e82cccf8c35bc5f6989af2702203def4c7a4
[ "Apache-2.0" ]
2
2020-09-07T08:33:43.000Z
2020-12-22T12:28:26.000Z
import inspect import albumentations import mmcv import numpy as np from albumentations import Compose from imagecorruptions import corrupt from numpy import random from mmdet.core.evaluation.bbox_overlaps import bbox_overlaps from ..registry import PIPELINES @PIPELINES.register_module class Resize(object): """...
36.370575
94
0.559962
import inspect import albumentations import mmcv import numpy as np from albumentations import Compose from imagecorruptions import corrupt from numpy import random from mmdet.core.evaluation.bbox_overlaps import bbox_overlaps from ..registry import PIPELINES @PIPELINES.register_module class Resize(object): de...
true
true
1c442d2fada5240fc6d9343528a6ef23452beded
7,694
py
Python
nova/api/openstack/compute/contrib/baremetal_nodes.py
bopopescu/nova-39
36c7a819582b838b7bbab11d55ca3d991a587405
[ "Apache-2.0" ]
1
2021-04-08T10:13:03.000Z
2021-04-08T10:13:03.000Z
nova/api/openstack/compute/contrib/baremetal_nodes.py
bopopescu/nova-39
36c7a819582b838b7bbab11d55ca3d991a587405
[ "Apache-2.0" ]
null
null
null
nova/api/openstack/compute/contrib/baremetal_nodes.py
bopopescu/nova-39
36c7a819582b838b7bbab11d55ca3d991a587405
[ "Apache-2.0" ]
1
2020-07-24T09:39:47.000Z
2020-07-24T09:39:47.000Z
# Copyright (c) 2013 NTT DOCOMO, 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 requ...
35.13242
78
0.610216
import webob from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova import exception from nova.virt.baremetal import db authorize = extensions.extension_authorizer('compute', 'baremetal_nodes') node_fields = ['id', 'cpus', 'local...
true
true
1c442e3d79417cf8362146c9eef72af711a9391e
1,130
py
Python
demo/example/wsgi.py
afahounko/django-plans
089c90486ead3b8ab69b8b119f33d5ef923ca08e
[ "MIT" ]
13
2016-01-19T15:45:32.000Z
2018-06-21T22:51:56.000Z
demo/example/wsgi.py
afahounko/django-plans
089c90486ead3b8ab69b8b119f33d5ef923ca08e
[ "MIT" ]
11
2015-12-01T20:01:06.000Z
2018-07-07T05:12:17.000Z
demo/example/wsgi.py
afahounko/django-plans
089c90486ead3b8ab69b8b119f33d5ef923ca08e
[ "MIT" ]
8
2015-11-17T02:12:36.000Z
2018-08-01T22:17:12.000Z
""" WSGI config for xmpl project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` set...
38.965517
79
0.806195
import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "xmpl.settings") # setting points here. from django.core.wsgi import get_wsgi_application application = get_wsgi_application() # Apply WSGI middleware here. # from helloworld.wsgi import HelloWorldApplication # application = HelloWorldApplication(applicatio...
true
true
1c442f847b28080303990953647216aee7c6607f
11,205
py
Python
python_src/adaptive_formation/gradient_interactive.py
tkortz/motion_planning_rt
08e914642b802f7217a8ad0f6153d41ccdce8c7d
[ "MIT" ]
null
null
null
python_src/adaptive_formation/gradient_interactive.py
tkortz/motion_planning_rt
08e914642b802f7217a8ad0f6153d41ccdce8c7d
[ "MIT" ]
null
null
null
python_src/adaptive_formation/gradient_interactive.py
tkortz/motion_planning_rt
08e914642b802f7217a8ad0f6153d41ccdce8c7d
[ "MIT" ]
null
null
null
# In order to launch execute: # python3 gradient_interactive.py import numpy as np from numpy.linalg import norm import matplotlib.pyplot as plt from matplotlib import collections from scipy.ndimage.morphology import distance_transform_edt as bwdist from math import * import random from impedance_modeles import * impo...
40.745455
139
0.619188
import numpy as np from numpy.linalg import norm import matplotlib.pyplot as plt from matplotlib import collections from scipy.ndimage.morphology import distance_transform_edt as bwdist from math import * import random from impedance_modeles import * import time from progress.bar import FillingCirclesBar from tasks...
true
true
1c442f8e6a0dc8f5fe2a81b2f44f17d32075be5c
2,598
py
Python
openarticlegauge/plugins/hindawi.py
CottageLabs/OpenArticleGauge
58d29b4209a7b59041d61326ffe1cf03f98f3cff
[ "BSD-3-Clause" ]
1
2016-04-07T18:29:27.000Z
2016-04-07T18:29:27.000Z
openarticlegauge/plugins/hindawi.py
CottageLabs/OpenArticleGauge
58d29b4209a7b59041d61326ffe1cf03f98f3cff
[ "BSD-3-Clause" ]
11
2015-01-06T15:53:09.000Z
2022-03-01T01:46:14.000Z
openarticlegauge/plugins/hindawi.py
CottageLabs/OpenArticleGauge
58d29b4209a7b59041d61326ffe1cf03f98f3cff
[ "BSD-3-Clause" ]
null
null
null
""" This plugin handles Hindawi articles. Hindawi publish from a single domain and use a consistent format for licenses so this one should be relatively straightforward. """ from openarticlegauge import plugin class HindawiPlugin(plugin.Plugin): _short_name = __name__.split('.')[-1] __version__='0.1' # consid...
41.238095
302
0.635104
from openarticlegauge import plugin class HindawiPlugin(plugin.Plugin): _short_name = __name__.split('.')[-1] __version__='0.1' __desc__ = "Obtains licenses from articles published by Hindawi" _base_urls = ["www.hindawi.com"] _license_mappings = [ ...
true
true
1c443024fe6467b58121c2e7ba26b7dca51aeb4e
1,070
py
Python
algorithms/backtrack/subsets.py
nisaruj/algorithms
1e03cd259c2d7ada113eb99843dcada9f20adf54
[ "MIT" ]
6
2018-12-12T09:14:05.000Z
2019-04-29T22:07:28.000Z
algorithms/backtrack/subsets.py
nisaruj/algorithms
1e03cd259c2d7ada113eb99843dcada9f20adf54
[ "MIT" ]
null
null
null
algorithms/backtrack/subsets.py
nisaruj/algorithms
1e03cd259c2d7ada113eb99843dcada9f20adf54
[ "MIT" ]
7
2019-03-21T10:18:22.000Z
2021-09-22T07:34:10.000Z
""" Given a set of distinct integers, nums, return all possible subsets. Note: The solution set must not contain duplicate subsets. For example, If nums = [1,2,3], a solution is: [ [3], [1], [2], [1,2,3], [1,3], [2,3], [1,2], [] ] """ def subsets(nums): """ O(2**n) """ def backtrack...
17.833333
68
0.526168
def subsets(nums): def backtrack(res, nums, stack, pos): if pos == len(nums): res.append(list(stack)) else: stack.append(nums[pos]) backtrack(res, nums, stack, pos+1) stack.pop() backtrack(res, nums, stack, pos+1...
true
true
1c4430552bfe4f27d5a07dbbf8a7fb3bc4ff2e65
1,659
py
Python
tests/optimization/test_genetic_algorithm.py
iamchetry/DataChallenge-Fall2021
fa7748c9ea2f3c0f6bde8d0b094fc75463e28f33
[ "BSD-3-Clause" ]
108
2018-03-23T20:06:03.000Z
2022-01-06T19:32:46.000Z
tests/optimization/test_genetic_algorithm.py
hachmannlab/ChemML
42b152579872a57c834884596f700c76b9320280
[ "BSD-3-Clause" ]
18
2019-08-09T21:16:14.000Z
2022-02-14T21:52:06.000Z
tests/optimization/test_genetic_algorithm.py
hachmannlab/ChemML
42b152579872a57c834884596f700c76b9320280
[ "BSD-3-Clause" ]
28
2018-04-28T17:07:33.000Z
2022-02-28T07:22:56.000Z
import pytest from chemml.optimization import GeneticAlgorithm space = ({'alpha': {'uniform': [-20, 0], 'mutation': [0, 2]}}, {'neurons': {'int': [0,10]}}, {'act': {'choice':range(0,100,5)}}) def evaluate(individual): return sum(individual) def test_algorithms(...
30.163636
72
0.517782
import pytest from chemml.optimization import GeneticAlgorithm space = ({'alpha': {'uniform': [-20, 0], 'mutation': [0, 2]}}, {'neurons': {'int': [0,10]}}, {'act': {'choice':range(0,100,5)}}) def evaluate(individual): return sum(individual) def test_algorithms(...
true
true
1c44335e84dfb5cd043b5622e45e9e7089d0a86c
1,232
py
Python
2016/day_13.py
viddrobnic/adventofcode
8f06f4ad3ed6744d20d222b050a15b8ff0ff9c82
[ "MIT" ]
null
null
null
2016/day_13.py
viddrobnic/adventofcode
8f06f4ad3ed6744d20d222b050a15b8ff0ff9c82
[ "MIT" ]
null
null
null
2016/day_13.py
viddrobnic/adventofcode
8f06f4ad3ed6744d20d222b050a15b8ff0ff9c82
[ "MIT" ]
1
2020-12-01T16:49:12.000Z
2020-12-01T16:49:12.000Z
from queue import Queue seed = 1362 seen = set() def is_empty(x, y): n = x*x + 3*x + 2*x*y + y + y*y + seed return bin(n).count('1') % 2 == 0 def valid_moves(x, y): result = [] actions = [-1, 1] for action in actions: new_x = x + action if x > 0 and is_empty(new_x, y) and (new_x...
20.196721
67
0.564935
from queue import Queue seed = 1362 seen = set() def is_empty(x, y): n = x*x + 3*x + 2*x*y + y + y*y + seed return bin(n).count('1') % 2 == 0 def valid_moves(x, y): result = [] actions = [-1, 1] for action in actions: new_x = x + action if x > 0 and is_empty(new_x, y) and (new_x...
true
true
1c4433f0812e9b10a3f57fc23795522eae70a302
1,207
py
Python
tempest/services/volume/json/admin/volume_services_client.py
midokura/tempest
b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b
[ "Apache-2.0" ]
null
null
null
tempest/services/volume/json/admin/volume_services_client.py
midokura/tempest
b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b
[ "Apache-2.0" ]
null
null
null
tempest/services/volume/json/admin/volume_services_client.py
midokura/tempest
b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 NEC Corporation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
32.621622
78
0.714996
import json import urllib from tempest.common import service_client class BaseVolumesServicesClientJSON(service_client.ServiceClient): def list_services(self, params=None): url = 'os-services' if params: url += '?%s' % urllib.urlencode(params) resp, body = sel...
true
true
1c4434aaeea67d038888d9e299fd5181e631f135
137
py
Python
tests/test_placeholder.py
bveeramani/sysx
ca67995d4fafb5280d16ccb3825cdd6c2a7c7e48
[ "Apache-2.0" ]
null
null
null
tests/test_placeholder.py
bveeramani/sysx
ca67995d4fafb5280d16ccb3825cdd6c2a7c7e48
[ "Apache-2.0" ]
null
null
null
tests/test_placeholder.py
bveeramani/sysx
ca67995d4fafb5280d16ccb3825cdd6c2a7c7e48
[ "Apache-2.0" ]
null
null
null
"""A placeholder test to prevent pytest from erroring.""" def test_placeholder(): """Test that 1 + 1 = 2.""" assert 1 + 1 == 2
19.571429
57
0.59854
def test_placeholder(): assert 1 + 1 == 2
true
true
1c443523f65f5f8c973e9eb58b9cf057505dc784
630
py
Python
tests/unit/db/test_users.py
jaimecruz21/lifeloopweb
ba0ffe1ea94ba3323a4e9c66c9506a338cae3212
[ "MIT" ]
null
null
null
tests/unit/db/test_users.py
jaimecruz21/lifeloopweb
ba0ffe1ea94ba3323a4e9c66c9506a338cae3212
[ "MIT" ]
null
null
null
tests/unit/db/test_users.py
jaimecruz21/lifeloopweb
ba0ffe1ea94ba3323a4e9c66c9506a338cae3212
[ "MIT" ]
null
null
null
import pytest from lifeloopweb.db.models import User from lifeloopweb import exception import tests class TestUser(tests.TestBase): def test_get_email_from_full_name_and_email(self): full_name_and_email = "Jason Meridth (jason@meridth.io)" result = User.get_email_from_full_name_and_email( ...
33.157895
73
0.757143
import pytest from lifeloopweb.db.models import User from lifeloopweb import exception import tests class TestUser(tests.TestBase): def test_get_email_from_full_name_and_email(self): full_name_and_email = "Jason Meridth (jason@meridth.io)" result = User.get_email_from_full_name_and_email( ...
true
true
1c443672071b863adb6d9fc4151f01406c3f4e08
1,165
py
Python
funcstructs/prototypes/necklace_groups.py
caleblevy/endofunction-structures
084ddeab8d12307dd95b8727190c589a1bf659df
[ "MIT" ]
5
2015-05-06T05:08:26.000Z
2017-04-21T03:32:13.000Z
funcstructs/prototypes/necklace_groups.py
caleblevy/endofunction-structures
084ddeab8d12307dd95b8727190c589a1bf659df
[ "MIT" ]
null
null
null
funcstructs/prototypes/necklace_groups.py
caleblevy/endofunction-structures
084ddeab8d12307dd95b8727190c589a1bf659df
[ "MIT" ]
null
null
null
"""Caleb Levy, 2015.""" from funcstructs.structures import necklaces from funcstructs import combinat from . import polynomials, integer_partitions def count_by_period(beads): return necklaces.FixedContentNecklaces(beads).count_by_period() def period_combos(beads, reps): """All possible combinations of pe...
33.285714
78
0.744206
from funcstructs.structures import necklaces from funcstructs import combinat from . import polynomials, integer_partitions def count_by_period(beads): return necklaces.FixedContentNecklaces(beads).count_by_period() def period_combos(beads, reps): necklace_counts = count_by_period(beads) periods = [i ...
true
true
1c443772534ffc1c373c281238456b449eecb7ea
309
py
Python
samples/frontend/manage.py
liuyu81/datagator-contrib
813529e211f680732bd1dc9568f5b4f2bdcacdcc
[ "Apache-2.0" ]
2
2015-02-20T02:50:07.000Z
2017-05-02T19:26:42.000Z
samples/frontend/manage.py
liuyu81/datagator-contrib
813529e211f680732bd1dc9568f5b4f2bdcacdcc
[ "Apache-2.0" ]
null
null
null
samples/frontend/manage.py
liuyu81/datagator-contrib
813529e211f680732bd1dc9568f5b4f2bdcacdcc
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DATAGATOR_DEVELOP", "1") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "datagator.wsgi.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
25.75
78
0.763754
import os import sys if __name__ == "__main__": os.environ.setdefault("DATAGATOR_DEVELOP", "1") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "datagator.wsgi.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
true
true
1c4437932e33a6e182efd278f5f9d445858bdcb6
1,021
py
Python
main.py
SamAlhabash/fast-api-with-mongodb
20f5b05f37fda088ffcd6479d79847234ffc1370
[ "MIT" ]
null
null
null
main.py
SamAlhabash/fast-api-with-mongodb
20f5b05f37fda088ffcd6479d79847234ffc1370
[ "MIT" ]
null
null
null
main.py
SamAlhabash/fast-api-with-mongodb
20f5b05f37fda088ffcd6479d79847234ffc1370
[ "MIT" ]
null
null
null
from fastapi import FastAPI from config.config import settings from starlette.middleware.cors import CORSMiddleware from api.api_v1.api import api_router from api.api_v1.services.database import connect_db, close_db import uvicorn app = FastAPI( title=settings.PROJECT_NAME, description=settings.PROJECT_DESC, ...
28.361111
68
0.688541
from fastapi import FastAPI from config.config import settings from starlette.middleware.cors import CORSMiddleware from api.api_v1.api import api_router from api.api_v1.services.database import connect_db, close_db import uvicorn app = FastAPI( title=settings.PROJECT_NAME, description=settings.PROJECT_DESC, ...
true
true
1c4437a501f34a54f0bce2a6c39e661634304ed4
415
py
Python
api/urls.py
GomaGoma676/ScrumTaskApi_Backend
f977f6fae514ee92f3f37b94c052d953b8dcc693
[ "MIT" ]
1
2020-11-03T10:17:48.000Z
2020-11-03T10:17:48.000Z
api/urls.py
GomaGoma676/ScrumTaskApi_Backend
f977f6fae514ee92f3f37b94c052d953b8dcc693
[ "MIT" ]
null
null
null
api/urls.py
GomaGoma676/ScrumTaskApi_Backend
f977f6fae514ee92f3f37b94c052d953b8dcc693
[ "MIT" ]
1
2021-03-20T15:24:42.000Z
2021-03-20T15:24:42.000Z
from django.urls import path from django.conf.urls import include from rest_framework import routers from .views import TaskViewSet, UserViewSet, SprintViewSet, TagViewSet router = routers.DefaultRouter() router.register('users', UserViewSet) router.register('tasks', TaskViewSet) router.register('sprints', SprintViewS...
27.666667
70
0.785542
from django.urls import path from django.conf.urls import include from rest_framework import routers from .views import TaskViewSet, UserViewSet, SprintViewSet, TagViewSet router = routers.DefaultRouter() router.register('users', UserViewSet) router.register('tasks', TaskViewSet) router.register('sprints', SprintViewS...
true
true
1c44380bc3440a460421d22b63007e3644b1af03
587
py
Python
python_script.py
benjiyo/computer_usage_statistics
e53cd5facdbec34062b092eabeb0121f1727e36f
[ "MIT" ]
1
2016-12-08T14:10:06.000Z
2016-12-08T14:10:06.000Z
python_script.py
benjiyo/computer_usage_statistics
e53cd5facdbec34062b092eabeb0121f1727e36f
[ "MIT" ]
null
null
null
python_script.py
benjiyo/computer_usage_statistics
e53cd5facdbec34062b092eabeb0121f1727e36f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Call this script with "hour" as argument # Use the file "bash_script" to call this script import sys hour = int(sys.argv[1]) with open('PATH_TO_REPOSITORY/histogram.txt', 'r') as myfile: data = myfile.read() newdata = data.splitlines() newdata[hour] = int(newdata[hour]) + 1 tmpstr =...
23.48
61
0.667802
import sys hour = int(sys.argv[1]) with open('PATH_TO_REPOSITORY/histogram.txt', 'r') as myfile: data = myfile.read() newdata = data.splitlines() newdata[hour] = int(newdata[hour]) + 1 tmpstr = str(newdata) tmpstr = tmpstr.replace("'","") tmpstr = tmpstr.replace(" ","") tmpstr = tmpstr.replace(",","\n")...
true
true
1c4438564c78ea33e922ec1b15a0905f72d7a386
3,669
py
Python
Tests/test_weakset_stdlib.py
pxl9588/ironpython3
3417b2d29f4116b8f44af31defb9a098686cd566
[ "Apache-2.0" ]
1
2019-06-27T13:04:33.000Z
2019-06-27T13:04:33.000Z
Tests/test_weakset_stdlib.py
pxl9588/ironpython3
3417b2d29f4116b8f44af31defb9a098686cd566
[ "Apache-2.0" ]
null
null
null
Tests/test_weakset_stdlib.py
pxl9588/ironpython3
3417b2d29f4116b8f44af31defb9a098686cd566
[ "Apache-2.0" ]
null
null
null
# Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the Apache 2.0 License. # See the LICENSE file in the project root for more information. ## ## Run selected tests from test_weakset from StdLib ## import unittest import sys from iptest import run_te...
53.955882
101
0.746525
un_test import test.test_weakset def load_tests(loader, standard_tests, pattern): if sys.implementation.name == 'ironpython': suite = unittest.TestSuite() suite.addTest(test.test_weakset.TestWeakSet('test_add')) suite.addTest(test.test_weakset.TestWeakSet('test_and')) suite.add...
true
true
1c44391f7131c3bfff778a039706cd9754d9e372
890
py
Python
examples/pybullet/examples/switchConstraintSolver.py
stolk/bullet3
41a0d72759a47ef2df986b0bfe56a03e22516123
[ "Zlib" ]
158
2016-11-17T19:37:51.000Z
2022-03-21T19:57:55.000Z
examples/pybullet/examples/switchConstraintSolver.py
stolk/bullet3
41a0d72759a47ef2df986b0bfe56a03e22516123
[ "Zlib" ]
94
2016-11-18T09:55:57.000Z
2021-01-14T08:50:40.000Z
examples/pybullet/examples/switchConstraintSolver.py
stolk/bullet3
41a0d72759a47ef2df986b0bfe56a03e22516123
[ "Zlib" ]
51
2017-05-24T10:20:25.000Z
2022-03-17T15:07:02.000Z
import pybullet as p import time p.connect(p.GUI) #p.setPhysicsEngineParameter(constraintSolverType=p.CONSTRAINT_SOLVER_LCP_PGS, globalCFM = 0.0001) p.setPhysicsEngineParameter(constraintSolverType=p.CONSTRAINT_SOLVER_LCP_DANTZIG, globalCFM=0.000001) #p.setPhysicsEngineParameter(constraintS...
28.709677
98
0.748315
import pybullet as p import time p.connect(p.GUI) p.setPhysicsEngineParameter(constraintSolverType=p.CONSTRAINT_SOLVER_LCP_DANTZIG, globalCFM=0.000001) p.loadURDF("plane.urdf") radius = 0.025 distance = 1.86 yaw = 135 pitch = -11 targetPos = [0, 0, 0] p.setPhysicsEngineParameter(solverR...
true
true
1c4439485e85dc067e2ce19d19190057cd711a5a
13,225
py
Python
project/Python Code/implementations.py
parkjan4/HiggsBoson
1e31f9bd2c6cb03c6acc8caed573046bbc0d2c08
[ "MIT" ]
null
null
null
project/Python Code/implementations.py
parkjan4/HiggsBoson
1e31f9bd2c6cb03c6acc8caed573046bbc0d2c08
[ "MIT" ]
null
null
null
project/Python Code/implementations.py
parkjan4/HiggsBoson
1e31f9bd2c6cb03c6acc8caed573046bbc0d2c08
[ "MIT" ]
null
null
null
from proj1_helpers import * import numpy as np import random import matplotlib.pyplot as plt ######################### Loss Functions ######################### # Compute loss with Mean Squared Error def compute_loss(y, tx, w): e = y.reshape((len(y),1)) - tx.dot(w).reshape((len(y),1)) return 1/2*np.mean(e**2) ...
36.035422
136
0.61603
from proj1_helpers import * import numpy as np import random import matplotlib.pyplot as plt ion_terms def build_k_indices(y, k_fold, seed): num_row = y.shape[0] interval = int(num_row / k_fold) np.random.seed(seed) indices = np.random.permutation(num_row) k_indices = [indices[k * interval: (k + ...
true
true
1c443992ade1ebf92009bd9acefe5a6589fee159
652
py
Python
Egzersiz/efecan/FonksiyonEgzersiz.py
ibrahimediz/ornekproje
c5ebeafc43a9c6d2aa639d0d95eedbce65991576
[ "Apache-2.0" ]
null
null
null
Egzersiz/efecan/FonksiyonEgzersiz.py
ibrahimediz/ornekproje
c5ebeafc43a9c6d2aa639d0d95eedbce65991576
[ "Apache-2.0" ]
null
null
null
Egzersiz/efecan/FonksiyonEgzersiz.py
ibrahimediz/ornekproje
c5ebeafc43a9c6d2aa639d0d95eedbce65991576
[ "Apache-2.0" ]
null
null
null
from string import ascii_lowercase,ascii_uppercase,punctuation,digits import random as rnd def passwordfunc (): pwd='' liste = [ascii_lowercase,ascii_uppercase,punctuation,digits] opt=input("uzunluk belirtmek ister misiniz? (yes or no)") if opt =='Yes': lent=input("Şifre uzunluğu ne kadar olsun...
29.636364
81
0.659509
from string import ascii_lowercase,ascii_uppercase,punctuation,digits import random as rnd def passwordfunc (): pwd='' liste = [ascii_lowercase,ascii_uppercase,punctuation,digits] opt=input("uzunluk belirtmek ister misiniz? (yes or no)") if opt =='Yes': lent=input("Şifre uzunluğu ne kadar olsun...
true
true
1c443a79ec656385843cf4a30bde8b1696a07a76
3,116
py
Python
setup.py
cigroup-ol/metaopt
6dfd5105d3c6eaf00f96670175cae16021069514
[ "BSD-3-Clause" ]
8
2015-02-02T21:42:23.000Z
2019-06-30T18:12:43.000Z
setup.py
cigroup-ol/metaopt
6dfd5105d3c6eaf00f96670175cae16021069514
[ "BSD-3-Clause" ]
4
2015-09-24T14:12:38.000Z
2021-12-08T22:42:52.000Z
setup.py
cigroup-ol/metaopt
6dfd5105d3c6eaf00f96670175cae16021069514
[ "BSD-3-Clause" ]
6
2015-02-27T12:35:33.000Z
2020-10-15T21:04:02.000Z
# -*- coding: utf-8 -*- """setup.py script for MetaOpt.""" from __future__ import division, print_function, with_statement import os import sys try: from setuptools import setup, find_packages except ImportError: import ez_setup ez_setup.use_setuptools() from setuptools import setup, find_packages fro...
38
82
0.643774
from __future__ import division, print_function, with_statement import os import sys try: from setuptools import setup, find_packages except ImportError: import ez_setup ez_setup.use_setuptools() from setuptools import setup, find_packages from pip.req import parse_requirements import metaopt def ...
true
true
1c443b008425d87a2b13f8d0a5cd54540e1eb168
4,058
py
Python
setup.py
jemilc/shap
ed284b6278813c5292d83dc2a22976a0fdedd4ec
[ "MIT" ]
1
2020-05-28T18:31:41.000Z
2020-05-28T18:31:41.000Z
setup.py
jemilc/shap
ed284b6278813c5292d83dc2a22976a0fdedd4ec
[ "MIT" ]
null
null
null
setup.py
jemilc/shap
ed284b6278813c5292d83dc2a22976a0fdedd4ec
[ "MIT" ]
2
2021-12-13T19:34:37.000Z
2021-12-13T23:45:36.000Z
from setuptools import setup, Extension from setuptools.command.build_ext import build_ext as _build_ext import os import re import codecs # to publish use: # > python setup.py sdist bdist_wheel upload # which depends on ~/.pypirc here = os.path.abspath(os.path.dirname(__file__)) def read(*parts): with codecs.op...
38.283019
123
0.646624
from setuptools import setup, Extension from setuptools.command.build_ext import build_ext as _build_ext import os import re import codecs here = os.path.abspath(os.path.dirname(__file__)) def read(*parts): with codecs.open(os.path.join(here, *parts), 'r') as fp: return fp.read() def find_version(*fi...
true
true
1c443b87b4667d7b5c5d094da07a31ceb014d168
3,529
py
Python
src/rf_power_monitor/nodes/rf_power_monitor_node.py
rumblefishrobotics/rf_rov_ws
8111ec0ef48634a329251c3006de47e3419ae8c5
[ "BSD-3-Clause" ]
null
null
null
src/rf_power_monitor/nodes/rf_power_monitor_node.py
rumblefishrobotics/rf_rov_ws
8111ec0ef48634a329251c3006de47e3419ae8c5
[ "BSD-3-Clause" ]
null
null
null
src/rf_power_monitor/nodes/rf_power_monitor_node.py
rumblefishrobotics/rf_rov_ws
8111ec0ef48634a329251c3006de47e3419ae8c5
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 """ power_monitor_node reads power information from a high side INA260 power monitor. Power data is published to rf_power_monitor_topic """ import rospy import time import board import adafruit_ina260 from rf_common.msg import RFPowerMonitorData import numpy as np from scipy.ndimage.f...
33.292453
86
0.548597
""" power_monitor_node reads power information from a high side INA260 power monitor. Power data is published to rf_power_monitor_topic """ import rospy import time import board import adafruit_ina260 from rf_common.msg import RFPowerMonitorData import numpy as np from scipy.ndimage.filters import uniform_...
false
true
1c443bbd588fb502514c1dc2517c751f29430408
478
py
Python
server/functionsfake.py
Yavonix/011-Battlebot-App
143e1990548837d81c9fcbf805e5c727e2038850
[ "MIT" ]
1
2021-07-29T03:26:29.000Z
2021-07-29T03:26:29.000Z
server/functionsfake.py
Yavonix/011-Battlebot-App
143e1990548837d81c9fcbf805e5c727e2038850
[ "MIT" ]
null
null
null
server/functionsfake.py
Yavonix/011-Battlebot-App
143e1990548837d81c9fcbf805e5c727e2038850
[ "MIT" ]
null
null
null
# Dummy program for development def jointMode(ID): print("JointModeEvent") # Move a dynamixel that has been set up as a joint. def moveJoint(ID, position, speed): print("MoveJointEvent") # === WHEEL FUNCTIONS === # # Set up a dynamixel so that it behaves like wheel. def wheelMode(ID): pass ...
22.761905
51
0.656904
def jointMode(ID): print("JointModeEvent") def moveJoint(ID, position, speed): print("MoveJointEvent") def wheelMode(ID): pass def moveWheel(ID, speed): pass
true
true