hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f7f2bb2e30d5d380e6dae2c03e5889cd7f2f381b | 313 | py | Python | wireframe/wireframe.py | AliShazly/maya-scripts | 1716a1f80f7081fbb36300ad98baf4a08e2376b4 | [
"MIT"
] | null | null | null | wireframe/wireframe.py | AliShazly/maya-scripts | 1716a1f80f7081fbb36300ad98baf4a08e2376b4 | [
"MIT"
] | null | null | null | wireframe/wireframe.py | AliShazly/maya-scripts | 1716a1f80f7081fbb36300ad98baf4a08e2376b4 | [
"MIT"
] | null | null | null | import maya.cmds as cmds
def wireframe(obj_name, offset, thickness):
cmds.select(obj_name + ".f[0:]")
cmds.setAttr(cmds.polyExtrudeFacet(keepFacesTogether=False)[0] + ".offset", offset)
cmds.delete()
cmds.select("{}.f[0:]".format(obj_name))
cmds.polyExtrudeFacet(thickness=thickness) | 39.125 | 88 | 0.686901 |
f7f2eabf49894705305e5ddaecf66c59a5a6e24b | 813 | py | Python | example/staticlib-demo/BUILD.py | adinosaur/configure | 0c2bf44a8dff2312dc201da75d86798a8df07671 | [
"MIT"
] | 6 | 2021-05-25T03:18:45.000Z | 2022-01-08T04:37:36.000Z | example/staticlib-demo/BUILD.py | adinosaur/configure | 0c2bf44a8dff2312dc201da75d86798a8df07671 | [
"MIT"
] | null | null | null | example/staticlib-demo/BUILD.py | adinosaur/configure | 0c2bf44a8dff2312dc201da75d86798a8df07671 | [
"MIT"
] | null | null | null | # -*- coding=utf-8 -*-
from __main__ import StaticLibraryTarget
import os
class StaticLibraryDemo(StaticLibraryTarget):
def __init__(self):
super(StaticLibraryDemo, self).__init__()
if os.name == 'posix':
self.name = 'example/staticlib-demo/liby.a'
self.cxxflags = ... | 36.954545 | 69 | 0.484625 |
f7f3284fe9a75fe40bedccb51ce163dff40c9f73 | 547 | py | Python | core/base.py | ShreyasTheOne/Super-Duper-Fuzzer | b667e2dca3e49a370634ad4b0bd826aca06136b7 | [
"MIT"
] | null | null | null | core/base.py | ShreyasTheOne/Super-Duper-Fuzzer | b667e2dca3e49a370634ad4b0bd826aca06136b7 | [
"MIT"
] | null | null | null | core/base.py | ShreyasTheOne/Super-Duper-Fuzzer | b667e2dca3e49a370634ad4b0bd826aca06136b7 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from api_interface import api_configuration
class BaseFuzzer(ABC):
@abstractmethod
def __init__(self, iterations=None):
"""
Initialise SampleFuzzer instance with the API Configuration
Args:
iterations (int): Number of requests to send pe... | 30.388889 | 79 | 0.707495 |
f7f329f73b98d32e97ef0b9b604511813e77134b | 5,588 | py | Python | tests/integration/managers/test_proxysql_manager.py | ovaistariq/proxysql-tools | f775fe5de908756da8522092450aec7171fbdbb3 | [
"Apache-2.0"
] | null | null | null | tests/integration/managers/test_proxysql_manager.py | ovaistariq/proxysql-tools | f775fe5de908756da8522092450aec7171fbdbb3 | [
"Apache-2.0"
] | null | null | null | tests/integration/managers/test_proxysql_manager.py | ovaistariq/proxysql-tools | f775fe5de908756da8522092450aec7171fbdbb3 | [
"Apache-2.0"
] | 1 | 2021-11-20T08:37:48.000Z | 2021-11-20T08:37:48.000Z | import pytest
from proxysql_tools.entities.proxysql import (
BACKEND_STATUS_OFFLINE_SOFT,
ProxySQLMySQLBackend,
ProxySQLMySQLUser
)
from proxysql_tools.managers.proxysql_manager import (
ProxySQLManager,
ProxySQLAdminConnectionError
)
def test__can_connect_to_proxysql_admin_interface(proxysql_man... | 33.866667 | 78 | 0.734073 |
f7f33647f63ef302e76c669cd8ef047d9f0e3ee5 | 2,111 | py | Python | core/sawtooth/cli/admin.py | trust-tech/sawtooth-core | fcd66ff2f13dba51d7642049e0c0306dbee3b07d | [
"Apache-2.0"
] | 1 | 2017-08-04T10:31:00.000Z | 2017-08-04T10:31:00.000Z | core/sawtooth/cli/admin.py | trust-tech/sawtooth-core | fcd66ff2f13dba51d7642049e0c0306dbee3b07d | [
"Apache-2.0"
] | 1 | 2021-12-09T23:11:26.000Z | 2021-12-09T23:11:26.000Z | core/sawtooth/cli/admin.py | trust-tech/sawtooth-core | fcd66ff2f13dba51d7642049e0c0306dbee3b07d | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 40.596154 | 80 | 0.755092 |
f7f344cf70320358dc12046f3a66852f0412088f | 18,667 | py | Python | panaroo/__main__.py | AMARTELKE/Pangenome-with-Panaroo | b720debf8616882668d53600038c334393080d9b | [
"MIT"
] | 116 | 2019-11-28T07:54:26.000Z | 2022-03-31T03:20:44.000Z | panaroo/__main__.py | AMARTELKE/Pangenome-with-Panaroo | b720debf8616882668d53600038c334393080d9b | [
"MIT"
] | 120 | 2019-12-08T21:01:46.000Z | 2022-03-30T04:11:52.000Z | panaroo/__main__.py | AMARTELKE/Pangenome-with-Panaroo | b720debf8616882668d53600038c334393080d9b | [
"MIT"
] | 19 | 2019-12-19T05:34:03.000Z | 2022-03-19T05:54:51.000Z | import os, sys
import tempfile
from Bio import SeqIO
import shutil
import networkx as nx
import argparse
import textwrap
import ast
from .isvalid import *
from .set_default_args import set_default_args
from .prokka import process_prokka_input
from .cdhit import check_cdhit_version
from .cdhit import run_cdhit
from .ge... | 37.711111 | 86 | 0.581293 |
f7f346fe2dec4989a51725aaf43d16e9bed65d3c | 2,276 | py | Python | tests/app/storage/test_dynamodb.py | ons-eq-team/eq-questionnaire-runner | 8d029097faa2b9d53d9621064243620db60c62c7 | [
"MIT"
] | null | null | null | tests/app/storage/test_dynamodb.py | ons-eq-team/eq-questionnaire-runner | 8d029097faa2b9d53d9621064243620db60c62c7 | [
"MIT"
] | null | null | null | tests/app/storage/test_dynamodb.py | ons-eq-team/eq-questionnaire-runner | 8d029097faa2b9d53d9621064243620db60c62c7 | [
"MIT"
] | null | null | null | import boto3
from flask import current_app
from moto import mock_dynamodb2
from app.data_model.app_models import QuestionnaireState
from app.storage.dynamodb import TABLE_CONFIG, DynamodbStorage
from app.storage.errors import ItemAlreadyExistsError
from tests.app.app_context_test_case import AppContextTestCase
class... | 32.514286 | 84 | 0.605448 |
f7f35824c8a6e82ce9fc0ada0075de27eb37a571 | 42,286 | py | Python | igniter/bootstrap_repos.py | yosuperdope/OpenPype | 0c90df97ddb8cda291a4f66d35da58b3deb94a71 | [
"MIT"
] | 44 | 2019-03-19T04:56:35.000Z | 2021-04-23T12:05:08.000Z | igniter/bootstrap_repos.py | jrsndl/pype | f9d80ef2c0663921291c5f47d24bea51fc43bac7 | [
"MIT"
] | 655 | 2020-03-17T15:10:21.000Z | 2021-04-23T18:22:52.000Z | igniter/bootstrap_repos.py | jrsndl/pype | f9d80ef2c0663921291c5f47d24bea51fc43bac7 | [
"MIT"
] | 21 | 2019-03-19T04:56:38.000Z | 2021-04-23T09:10:59.000Z | # -*- coding: utf-8 -*-
"""Bootstrap OpenPype repositories."""
from __future__ import annotations
import logging as log
import os
import re
import shutil
import sys
import tempfile
from pathlib import Path
from typing import Union, Callable, List, Tuple
import hashlib
from zipfile import ZipFile, BadZipFile
from appd... | 35.208993 | 286 | 0.575226 |
f7f369f87b1eff287eabdda0971dcb941af72bc8 | 7,679 | py | Python | starcraft/scouting_time.py | awb-carleton/pattern-analysis | 532066398f2d102031aaa86b9a7c739ee16ceb9c | [
"MIT"
] | null | null | null | starcraft/scouting_time.py | awb-carleton/pattern-analysis | 532066398f2d102031aaa86b9a7c739ee16ceb9c | [
"MIT"
] | null | null | null | starcraft/scouting_time.py | awb-carleton/pattern-analysis | 532066398f2d102031aaa86b9a7c739ee16ceb9c | [
"MIT"
] | null | null | null | # Intended to be used for data visualization of when players scout
# during StarCraft 2
from __future__ import print_function
import csv
import sc2reader
import time
import file_locations
from functools import partial
from multiprocessing import Pool, cpu_count
from collections import Counter
from itertools import rep... | 46.823171 | 189 | 0.655945 |
f7f3713d8e21b003b4dc406f37eadf5be5e080e3 | 7,933 | py | Python | documentstore_migracao/utils/xylose_converter.py | joffilyfe/document-store-migracao | b5125b7aedec56f0e8787900bdfd124aaf65e3e3 | [
"BSD-2-Clause"
] | null | null | null | documentstore_migracao/utils/xylose_converter.py | joffilyfe/document-store-migracao | b5125b7aedec56f0e8787900bdfd124aaf65e3e3 | [
"BSD-2-Clause"
] | 14 | 2019-03-13T12:19:12.000Z | 2019-03-19T17:37:08.000Z | documentstore_migracao/utils/xylose_converter.py | joffilyfe/document-store-migracao | b5125b7aedec56f0e8787900bdfd124aaf65e3e3 | [
"BSD-2-Clause"
] | 3 | 2019-03-12T18:55:55.000Z | 2019-03-20T18:38:02.000Z | import logging
from typing import List
from datetime import datetime
from documentstore_migracao.utils import scielo_ids_generator
from xylose.scielodocument import Journal, Issue
logger = logging.getLogger(__name__)
def date_to_datetime(date: str) -> datetime:
"""Transforma datas no formato ISO em objetos datet... | 30.163498 | 88 | 0.651708 |
f7f3ac2b1bc335690dbcd8f7175ad3d7f2c28614 | 22,339 | py | Python | roles/openshift_master_facts/filter_plugins/openshift_master.py | Ravichandramanupati/openshift | 1720af442f0b02359ce4cc70d32adca15d9d26ab | [
"Apache-2.0"
] | 1 | 2017-11-01T05:46:27.000Z | 2017-11-01T05:46:27.000Z | roles/openshift_master_facts/filter_plugins/openshift_master.py | gloria-sentinella/openshift-ansible | e03493f33073965ddf8c49256df80143059a2a51 | [
"Apache-2.0"
] | 3 | 2016-12-01T23:01:36.000Z | 2016-12-02T00:16:48.000Z | roles/openshift_master_facts/filter_plugins/openshift_master.py | gloria-sentinella/openshift-ansible | e03493f33073965ddf8c49256df80143059a2a51 | [
"Apache-2.0"
] | 1 | 2018-01-30T05:44:59.000Z | 2018-01-30T05:44:59.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
Custom filters for use in openshift-master
'''
import copy
import sys
from ansible import errors
from ansible.parsing.yaml.dumper import AnsibleDumper
from ansible.plugins.filter.core import to_bool as ansible_bool
# ansible.compat.six goes away with Ansible 2.4
try:
... | 39.678508 | 120 | 0.58897 |
f7f3d71dda4b8914f21ffb70f5e7589dda8b5d78 | 1,083 | py | Python | large_app/python/api/auth/__init__.py | sahilGupta89/large_flask_app | e1ab54431bb935c02186f586d9246b741d9f2d33 | [
"MIT"
] | null | null | null | large_app/python/api/auth/__init__.py | sahilGupta89/large_flask_app | e1ab54431bb935c02186f586d9246b741d9f2d33 | [
"MIT"
] | null | null | null | large_app/python/api/auth/__init__.py | sahilGupta89/large_flask_app | e1ab54431bb935c02186f586d9246b741d9f2d33 | [
"MIT"
] | null | null | null | from flask import current_app, Response
from flask_login import LoginManager
from models import User
from . import basic_auth
from . import token_auth
login_manager = LoginManager()
@login_manager.request_loader
def load_user_from_auth_header(req) -> User:
"""Try via both http basic check and token auth to get ... | 24.066667 | 77 | 0.67313 |
f7f3d9fa4822c626cc3ed2ceaac1567d407ca197 | 813 | py | Python | hfpy_code/chapter11/find_it.py | leobarros/use_cabeca_python | 4e0897a68fb7ef669ec05eab7cba9412baa0e85e | [
"Apache-2.0"
] | 1 | 2016-04-01T04:31:52.000Z | 2016-04-01T04:31:52.000Z | hfpython_code/hfpy_code/chapter11/find_it.py | tdean1995/HFPythonSandbox | dc72257e4353c5bca7a2c401d18587c6d799f9a1 | [
"Apache-2.0"
] | 2 | 2018-11-27T10:45:45.000Z | 2018-12-13T14:44:54.000Z | hfpython_code/hfpy_code/chapter11/find_it.py | tdean1995/HFPythonSandbox | dc72257e4353c5bca7a2c401d18587c6d799f9a1 | [
"Apache-2.0"
] | 1 | 2020-06-02T17:47:22.000Z | 2020-06-02T17:47:22.000Z |
import time
def find_closest(look_for, target_data):
def whats_the_difference(first, second):
if first == second:
return(0)
elif first > second:
return(first - second)
else:
return(second - first)
max_diff = 9999999
for each_thing in target_dat... | 25.40625 | 61 | 0.591636 |
f7f3e66a5be1ae0e22867e4f3957cc4e86c4f87c | 4,908 | py | Python | app/map.py | mbroz/feel-the-streets | 6e21a496f1530b0500ca66e11712f3f31cd857ae | [
"MIT"
] | null | null | null | app/map.py | mbroz/feel-the-streets | 6e21a496f1530b0500ca66e11712f3f31cd857ae | [
"MIT"
] | null | null | null | app/map.py | mbroz/feel-the-streets | 6e21a496f1530b0500ca66e11712f3f31cd857ae | [
"MIT"
] | null | null | null | import logging
from osm_db import EntitiesQuery, FieldNamed, AreaDatabase
from pygeodesy.ellipsoidalVincenty import LatLon
import shapely.wkb as wkb
from shapely.geometry.point import Point
from .geometry_utils import distance_filter, effective_width_filter, xy_ranges_bounding_square
from .measuring import measur... | 41.243697 | 124 | 0.66361 |
f7f3eb8d00a84ed5e552cb82612616f7fbe779c4 | 2,415 | py | Python | cls_ann.py | ZHUXUHAN/Tools | 98a0776f460febc69af5523e2c69d7702ee04876 | [
"MIT"
] | 1 | 2019-11-20T12:16:21.000Z | 2019-11-20T12:16:21.000Z | cls_ann.py | ZHUXUHAN/Python-Tools | 98a0776f460febc69af5523e2c69d7702ee04876 | [
"MIT"
] | null | null | null | cls_ann.py | ZHUXUHAN/Python-Tools | 98a0776f460febc69af5523e2c69d7702ee04876 | [
"MIT"
] | null | null | null | import os
import random
import shutil
dir = '/home/xuhanzhu/panet/data/cifar2..'
dir2 = '/home/xuhanzhu/panet/cifar2'
files = os.listdir(dir)
def split():
length = [0, 0]
file_split = [[], []]
for file in files:
if 'Normal' in file:
length[0] += 1
file_split[0].append(file)... | 35 | 109 | 0.549482 |
f7f41e78ab51f3fa6a9276832b59ea545804484d | 40,353 | py | Python | core/domain/topic_domain_test.py | OsamaAdam98/oppia | 9c9c3d0fc6710f58394c5e28d414043340ed2a62 | [
"Apache-2.0"
] | 2 | 2019-03-31T07:03:32.000Z | 2019-04-24T18:12:53.000Z | core/domain/topic_domain_test.py | OsamaAdam98/oppia | 9c9c3d0fc6710f58394c5e28d414043340ed2a62 | [
"Apache-2.0"
] | 3 | 2019-08-01T18:38:54.000Z | 2019-08-12T03:02:59.000Z | core/domain/topic_domain_test.py | RafayGhafoor/oppia | 855d02414ca00d0807d841e48be7ce7b94d68c29 | [
"Apache-2.0"
] | 1 | 2020-03-15T14:29:55.000Z | 2020-03-15T14:29:55.000Z | # coding: utf-8
#
# Copyright 2018 The Oppia 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 requi... | 42.25445 | 80 | 0.666493 |
f7f474efa1179d1343e1690744401425b2e9ed31 | 783 | py | Python | unit_tests/python_lib/test_create_roles_cf.py | adrianmkng/watchmen | 4be15ad64a5d54d4f546ca8c139fa41fd42dd6aa | [
"Apache-2.0"
] | 190 | 2017-12-13T05:01:42.000Z | 2021-11-15T23:35:54.000Z | unit_tests/python_lib/test_create_roles_cf.py | adrianmkng/watchmen | 4be15ad64a5d54d4f546ca8c139fa41fd42dd6aa | [
"Apache-2.0"
] | 2 | 2018-08-31T04:53:03.000Z | 2018-11-14T00:13:49.000Z | unit_tests/python_lib/test_create_roles_cf.py | adrianmkng/watchmen | 4be15ad64a5d54d4f546ca8c139fa41fd42dd6aa | [
"Apache-2.0"
] | 22 | 2017-12-13T04:36:46.000Z | 2021-07-29T07:37:41.000Z | # Copyright 2017 Insurance Australia Group 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 ag... | 37.285714 | 74 | 0.780332 |
f7f4895cf92cfb30274d315d1364a4edda968c07 | 65,867 | py | Python | geosoft/gxpy/tests/test_group.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 25 | 2017-07-14T06:39:37.000Z | 2022-03-09T21:39:51.000Z | geosoft/gxpy/tests/test_group.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 100 | 2016-12-13T17:30:41.000Z | 2021-08-01T20:21:13.000Z | geosoft/gxpy/tests/test_group.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 28 | 2016-12-12T17:34:40.000Z | 2022-03-16T15:39:39.000Z | import unittest
import os
import numpy as np
import geosoft
import geosoft.gxapi as gxapi
import geosoft.gxpy.system as gsys
import geosoft.gxpy.map as gxmap
import geosoft.gxpy.geometry as gxgm
import geosoft.gxpy.grid as gxgrd
import geosoft.gxpy.agg as gxagg
import geosoft.gxpy.system as gxsys
import geosoft.gxpy.v... | 41.425786 | 133 | 0.5127 |
f7f4b2a26f0964a8abf23111472ace6f079c8584 | 65,624 | py | Python | class_mbdata.py | lilianschuster/PyGEM | c805d09960f937fe6e35cdd1587f9089d4bec6b8 | [
"MIT"
] | null | null | null | class_mbdata.py | lilianschuster/PyGEM | c805d09960f937fe6e35cdd1587f9089d4bec6b8 | [
"MIT"
] | null | null | null | class_mbdata.py | lilianschuster/PyGEM | c805d09960f937fe6e35cdd1587f9089d4bec6b8 | [
"MIT"
] | null | null | null | """class of mass balance data and functions associated with manipulating the dataset to be in the proper format"""
# External libraries
import pandas as pd
import numpy as np
import calendar
import collections
import datetime
# Local libraries
import pygem_input as input
import pygemfxns_modelsetup as modelsetup
cla... | 59.174031 | 121 | 0.548671 |
f7f4f6a5d626554e5319c3ee7f24cd379fb2c8fa | 22,595 | py | Python | pyscf/pbc/mp/kmp2.py | seunghoonlee89/pyscf-ecCC-TCC | 2091566fb83c1474e40bf74f271be2ce4611f60c | [
"Apache-2.0"
] | 2 | 2021-09-17T06:10:17.000Z | 2022-01-22T23:37:22.000Z | pyscf/pbc/mp/kmp2.py | r-peng/pyscf | 9a14f9bcc63bc75f5939cb4d00eb47861d8d8989 | [
"Apache-2.0"
] | null | null | null | pyscf/pbc/mp/kmp2.py | r-peng/pyscf | 9a14f9bcc63bc75f5939cb4d00eb47861d8d8989 | [
"Apache-2.0"
] | 2 | 2021-09-16T23:37:42.000Z | 2021-10-14T23:00:39.000Z | #!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | 37.784281 | 120 | 0.608365 |
f7f526c0fc47613a272c254a30c9cf1db2eb479b | 8,142 | py | Python | datalad/support/tests/test_globbedpaths.py | soichih/datalad | 797dde3ab7497be170e2c4ea8824f33a4b38e5d8 | [
"MIT"
] | null | null | null | datalad/support/tests/test_globbedpaths.py | soichih/datalad | 797dde3ab7497be170e2c4ea8824f33a4b38e5d8 | [
"MIT"
] | null | null | null | datalad/support/tests/test_globbedpaths.py | soichih/datalad | 797dde3ab7497be170e2c4ea8824f33a4b38e5d8 | [
"MIT"
] | null | null | null | # emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-; coding: utf-8 -*-
# ex: set sts=4 ts=4 sw=4 et:
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the datalad package for the
# copyright and license ter... | 38.771429 | 106 | 0.498649 |
f7f53c9b431c38939880386dfe84de00452510eb | 17,710 | py | Python | oauth_provider/tests/protocol.py | ELSUru/ADL_LRS | aabeb9cf3e56795b148f37d07e1bb2b41e61e470 | [
"Apache-2.0"
] | null | null | null | oauth_provider/tests/protocol.py | ELSUru/ADL_LRS | aabeb9cf3e56795b148f37d07e1bb2b41e61e470 | [
"Apache-2.0"
] | null | null | null | oauth_provider/tests/protocol.py | ELSUru/ADL_LRS | aabeb9cf3e56795b148f37d07e1bb2b41e61e470 | [
"Apache-2.0"
] | 3 | 2021-01-14T12:51:24.000Z | 2022-03-15T17:11:11.000Z | import time
import cgi
import oauth2 as oauth
from django.test import Client
from oauth_provider.tests.auth import BaseOAuthTestCase
from oauth_provider.models import Token, Consumer, Scope
from oauth_provider.compat import get_user_model
User = get_user_model()
class ProtocolExample(BaseOAuthTestCa... | 43.945409 | 132 | 0.666064 |
f7f54bf093d7ebf6362729e7f1fb476789684de0 | 2,156 | py | Python | Data_Science/src/model.py | robovish/Python-Projects | 1cdfa18c093af32cfc02ac7d08e2bdf682670470 | [
"MIT"
] | null | null | null | Data_Science/src/model.py | robovish/Python-Projects | 1cdfa18c093af32cfc02ac7d08e2bdf682670470 | [
"MIT"
] | null | null | null | Data_Science/src/model.py | robovish/Python-Projects | 1cdfa18c093af32cfc02ac7d08e2bdf682670470 | [
"MIT"
] | 1 | 2022-03-03T09:21:37.000Z | 2022-03-03T09:21:37.000Z |
#load the libraries
import pandas as pd
import numpy as np
from pandas_profiling import ProfileReport
from sklearn.preprocessing import StandardScaler
from sklearn.metrics import classification_report
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
from joblib i... | 31.246377 | 151 | 0.74397 |
f7f560d95fea1e072301e9cf6f2d400ad15c09a6 | 5,859 | py | Python | src/cleanShpNet.py | ashish-code/gps-denied-geospatial-positioning | 5006b963e0b8fe50b0cabd5e3a9deb6aeb2416f2 | [
"MIT"
] | 2 | 2021-09-07T14:15:50.000Z | 2021-12-27T06:04:54.000Z | src/cleanShpNet.py | ashish-code/gps-denied-geospatial-positioning | 5006b963e0b8fe50b0cabd5e3a9deb6aeb2416f2 | [
"MIT"
] | null | null | null | src/cleanShpNet.py | ashish-code/gps-denied-geospatial-positioning | 5006b963e0b8fe50b0cabd5e3a9deb6aeb2416f2 | [
"MIT"
] | null | null | null | '''
Created on Aug 31, 2015
@author: ash
'''
"""
cleanNetShp -- Tools to clean spatial Network Shapefiles.
"""
import pysal
import numpy
__author__ = "Charles R. Schmidt <schmidtc@gmail.com>"
__all__ = ['snap_verts', 'find_nodes', 'split_at_nodes']
# urlShpFile = "/home/ash/Data/tl_2014_39049_roads/tl_2014_39049_r... | 32.370166 | 116 | 0.624509 |
f7f5685ce14e3d724e7c28cd1d370749677e9c42 | 23,661 | py | Python | Improvements/gnnimprove.py | Harshitha-Nagapudi/NN_Project | f0df170a33b6b35a00929a0104dc6ee04c5062a9 | [
"MIT"
] | null | null | null | Improvements/gnnimprove.py | Harshitha-Nagapudi/NN_Project | f0df170a33b6b35a00929a0104dc6ee04c5062a9 | [
"MIT"
] | null | null | null | Improvements/gnnimprove.py | Harshitha-Nagapudi/NN_Project | f0df170a33b6b35a00929a0104dc6ee04c5062a9 | [
"MIT"
] | null | null | null | import torch.nn as nn
import torch.nn.functional as F
import math
import torch
import torch.optim as optim
from torch.nn.parameter import Parameter
from torch.nn.modules.module import Module
from deeprobust.graph import utils
from copy import deepcopy
import sys
from scipy import stats
import tensorly as tl
tl.set_bac... | 37.261417 | 131 | 0.571489 |
f7f57e45f77bb0814cd3ee2ef6492a0c115ad7a6 | 3,020 | py | Python | axopy/pipeline/sources.py | jdekarske/axopy | a60abb44a12c5e833b9033170825773bb0691394 | [
"MIT"
] | 13 | 2019-01-23T13:00:00.000Z | 2022-01-17T14:45:32.000Z | axopy/pipeline/sources.py | jdekarske/axopy | a60abb44a12c5e833b9033170825773bb0691394 | [
"MIT"
] | 45 | 2017-01-16T22:44:59.000Z | 2018-12-18T18:43:08.000Z | axopy/pipeline/sources.py | jdekarske/axopy | a60abb44a12c5e833b9033170825773bb0691394 | [
"MIT"
] | 5 | 2017-01-13T00:14:08.000Z | 2018-11-08T13:16:24.000Z | """Data streams for processing with a pipeline."""
import warnings
import numpy as np
def segment(data, length, overlap=0):
"""Generate segments of an array.
Each segment is of a specified length and optional overlap with the
previous segment. Only segments of the specified length are retrieved (if
... | 27.207207 | 78 | 0.57649 |
f7f5838ae0f5ee4578be1ef08bf5040b2c666c8e | 5,656 | py | Python | tensormonk/architectures/trees.py | Tensor46/TensorMONK | 67617d3fdf8fde072ba9cab42de7d67c79b17494 | [
"MIT"
] | 29 | 2018-07-06T23:57:23.000Z | 2022-03-08T20:38:57.000Z | tensormonk/architectures/trees.py | Johnson-yue/TensorMONK | 1785132b82c685c3b3fc05b00dec46b1fccfc948 | [
"MIT"
] | 3 | 2018-12-14T22:21:26.000Z | 2020-06-19T02:13:34.000Z | tensormonk/architectures/trees.py | Johnson-yue/TensorMONK | 1785132b82c685c3b3fc05b00dec46b1fccfc948 | [
"MIT"
] | 8 | 2018-07-06T23:58:03.000Z | 2021-04-12T01:35:54.000Z | """ TensorMONK :: architectures """
import torch
import torch.nn as nn
import numpy as np
import torch.nn.functional as F
from ..layers import Linear
class NeuralTree(nn.Module):
r""" A neural tree for Neural Decision Forest!
Args:
tensor_size: shape of 2D/4D tensor
2D - (None/any intege... | 37.456954 | 77 | 0.571075 |
f7f58e1019d4aea7b585a250b57f6708dbd91c3f | 4,464 | py | Python | ethicophysics/sim.py | advancedresearch/ethicophysics | 52806b53d6d3ee92e1bd2a8c00f7728cebc9e684 | [
"Apache-2.0"
] | 7 | 2018-04-26T17:10:58.000Z | 2021-06-19T01:56:36.000Z | ethicophysics/sim.py | advancedresearch/ethicophysics | 52806b53d6d3ee92e1bd2a8c00f7728cebc9e684 | [
"Apache-2.0"
] | 46 | 2018-04-26T16:25:59.000Z | 2018-12-15T10:13:05.000Z | ethicophysics/sim.py | advancedresearch/ethicophysics | 52806b53d6d3ee92e1bd2a8c00f7728cebc9e684 | [
"Apache-2.0"
] | 1 | 2018-05-13T17:37:48.000Z | 2018-05-13T17:37:48.000Z | import numpy as np
dims = [('evil', 'good'), ('poor', 'rich'), ('unskilled', 'skilled'), ('tool', 'agent')]
ndim = len(dims)
# drives that the agents in the simulation are capable of having, as
# well as the effects that each drive has on the agent's soul
drives = [
('greed for possessions', ['evil', 'rich', 'ski... | 45.090909 | 88 | 0.708333 |
f7f5da4dd988b88fa3806b8d114866fa74d20550 | 52,530 | py | Python | calendarserver/tap/util.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | 1 | 2017-02-18T19:22:19.000Z | 2017-02-18T19:22:19.000Z | calendarserver/tap/util.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | calendarserver/tap/util.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | # -*- test-case-name: calendarserver.tap.test.test_caldav -*-
##
# Copyright (c) 2005-2015 Apple 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.apach... | 34.973369 | 137 | 0.636113 |
f7f5eea2333115caf27e5a8df0623525ea435756 | 5,751 | py | Python | oeml-sdk/python/openapi_client/api/balances_api.py | oskaralfons/coinapi-sdk | 2c79b6d91d0f702040dd865e79f0774a4bba9bb3 | [
"MIT"
] | 1 | 2020-07-23T05:47:52.000Z | 2020-07-23T05:47:52.000Z | oeml-sdk/python/openapi_client/api/balances_api.py | oskaralfons/coinapi-sdk | 2c79b6d91d0f702040dd865e79f0774a4bba9bb3 | [
"MIT"
] | null | null | null | oeml-sdk/python/openapi_client/api/balances_api.py | oskaralfons/coinapi-sdk | 2c79b6d91d0f702040dd865e79f0774a4bba9bb3 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
OEML - REST API
This section will provide necessary information about the `CoinAPI OEML REST API` protocol. This API is also available in the Postman application: <a href=\"https://postman.coinapi.io/\" target=\"_blank\">https://postman.coinapi.io/</a> # noqa: E501
The version... | 38.597315 | 261 | 0.604069 |
f7f60830f317e8a79c8a9db2ca16560bb484746e | 3,345 | py | Python | pyalgotrade/optimizer/local.py | gbecedatxapo/pyalgotrade | b1015f2f20714ae02f834a90f25376e40c6f8ab9 | [
"Apache-2.0"
] | 1 | 2020-07-06T18:38:38.000Z | 2020-07-06T18:38:38.000Z | pyalgotrade/optimizer/local.py | gbecedatxapo/pyalgotrade | b1015f2f20714ae02f834a90f25376e40c6f8ab9 | [
"Apache-2.0"
] | null | null | null | pyalgotrade/optimizer/local.py | gbecedatxapo/pyalgotrade | b1015f2f20714ae02f834a90f25376e40c6f8ab9 | [
"Apache-2.0"
] | null | null | null | # PyAlgoTrade
#
# Copyright 2011-2014 Gabriel Martin Becedillas Ruiz
#
# 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 ap... | 32.163462 | 158 | 0.686099 |
f7f6205dc7b35a9a40fd2de82c28be05ca417e97 | 398 | py | Python | backend/personal_area/logout.py | DuMoH112/cloud_strorage | f995f9a71c9317493e3092a7ec31108afbdc8e05 | [
"MIT"
] | null | null | null | backend/personal_area/logout.py | DuMoH112/cloud_strorage | f995f9a71c9317493e3092a7ec31108afbdc8e05 | [
"MIT"
] | null | null | null | backend/personal_area/logout.py | DuMoH112/cloud_strorage | f995f9a71c9317493e3092a7ec31108afbdc8e05 | [
"MIT"
] | null | null | null | from flask import Blueprint, request, jsonify
from Database.redis import Redis_db
from app.auth_utils import auth_user
logout_bp = Blueprint('logout', __name__)
@logout_bp.route('/back/logout', methods=['GET'])
@auth_user(name_func='logout')
def logout(user):
"""Logout Page"""
r = Redis_db()
r.del_user... | 23.411765 | 58 | 0.71608 |
f7f62987f10cd0b73a4981427ef11e3e18fa36a3 | 745 | py | Python | hy/lex/__init__.py | Tony1928/hylang | 8aeaace7cd719ab1d00b48808cbd53c67c944cb3 | [
"MIT"
] | 4 | 2017-08-09T01:31:56.000Z | 2022-01-17T01:11:23.000Z | hy/lex/__init__.py | woodrush/hy | d9a5acbcc93114031c70fd7ea497e4e59c868e25 | [
"MIT"
] | null | null | null | hy/lex/__init__.py | woodrush/hy | d9a5acbcc93114031c70fd7ea497e4e59c868e25 | [
"MIT"
] | null | null | null | # Copyright 2017 the authors.
# This file is part of Hy, which is free software licensed under the Expat
# license. See the LICENSE.
from rply.errors import LexingError
from hy.lex.exceptions import LexException, PrematureEndOfInput # NOQA
from hy.lex.lexer import lexer
from hy.lex.parser import parser
def tokeniz... | 28.653846 | 74 | 0.661745 |
f7f6367d7103288d685134c99249c5e3b93fc5d5 | 25,146 | py | Python | elit/components/parsers/second_order/tree_crf_dependency_parser.py | emorynlp/levi-graph-amr-parser | f71f1056c13181b8db31d6136451fb8d57114819 | [
"Apache-2.0"
] | 9 | 2021-07-12T22:05:47.000Z | 2022-02-22T03:10:14.000Z | elit/components/parsers/second_order/tree_crf_dependency_parser.py | emorynlp/levi-graph-amr-parser | f71f1056c13181b8db31d6136451fb8d57114819 | [
"Apache-2.0"
] | 4 | 2021-08-31T08:28:37.000Z | 2022-03-28T05:52:14.000Z | elit/components/parsers/second_order/tree_crf_dependency_parser.py | emorynlp/levi-graph-amr-parser | f71f1056c13181b8db31d6136451fb8d57114819 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
# Author: hankcs
# Date: 2020-05-08 20:51
import functools
import os
from typing import Union, Any, List
import torch
from alnlp.modules.util import lengths_to_mask
from torch import nn
from torch.optim import Adam
from torch.optim.lr_scheduler import ExponentialLR
from torch.utils.data import D... | 46.394834 | 117 | 0.57194 |
f7f6486666aa586234e1ea13e89dcced4e872231 | 287 | py | Python | desafios/Mundo 3/Ex097.py | duartecgustavo/Python---Estudos- | 13a47f115dd24ef475addaed7b0c860a7b3817ca | [
"MIT"
] | 6 | 2021-01-20T20:43:39.000Z | 2021-08-13T15:44:10.000Z | desafios/Mundo 3/Ex097.py | duartecgustavo/PythonProgress | 13a47f115dd24ef475addaed7b0c860a7b3817ca | [
"MIT"
] | null | null | null | desafios/Mundo 3/Ex097.py | duartecgustavo/PythonProgress | 13a47f115dd24ef475addaed7b0c860a7b3817ca | [
"MIT"
] | 1 | 2020-09-06T03:34:19.000Z | 2020-09-06T03:34:19.000Z | # Desafio 97 - Aula 20: Receba um texto qualquer como parametrô e mostre a mensagem de forma adaptavel:
def escreva(msg):
tam = len(msg) + 4
print('-'*tam)
print(f' {msg}')
print('-'*tam)
for count in range(0,3):
escreva(msg = str(input('Escreva uma mensagem: '))) | 28.7 | 103 | 0.634146 |
f7f65f4ba219c8d88f26a5f24466d8f59a013261 | 7,961 | py | Python | stats_ais.py | Mandorath/analyze_ais | 335a5185a588f99a8151ea77e2406e8cec43ffcb | [
"Apache-2.0"
] | null | null | null | stats_ais.py | Mandorath/analyze_ais | 335a5185a588f99a8151ea77e2406e8cec43ffcb | [
"Apache-2.0"
] | null | null | null | stats_ais.py | Mandorath/analyze_ais | 335a5185a588f99a8151ea77e2406e8cec43ffcb | [
"Apache-2.0"
] | 1 | 2021-03-27T19:43:41.000Z | 2021-03-27T19:43:41.000Z | import pandas as pd
import numpy as np
def calc_stats(df, col_ais, col_spd, col_zn, unique_col, date, df_out, ship_count):
'''
Statistics calculation function.
'''
# df = pd.read_csv(file, delimiter=",")
# the percentage of "True" in AIS gaps
df['spd_and_gap'] = pd.np.where(df[['flag_spd_chng'... | 43.983425 | 121 | 0.573797 |
f7f674176dcb1db9d4e00b3aac62d41e414b613c | 3,099 | py | Python | src/courses/tests/record_api/tests_purchasing_record.py | vlad-pro/education-backend | f766decc68e820296b6ea347021cf16e76322f32 | [
"MIT"
] | null | null | null | src/courses/tests/record_api/tests_purchasing_record.py | vlad-pro/education-backend | f766decc68e820296b6ea347021cf16e76322f32 | [
"MIT"
] | 1 | 2022-02-10T12:08:02.000Z | 2022-02-10T12:08:02.000Z | src/courses/tests/record_api/tests_purchasing_record.py | vlad-pro/education-backend | f766decc68e820296b6ea347021cf16e76322f32 | [
"MIT"
] | null | null | null | from decimal import Decimal
import pytest
from orders.models import Order
from tinkoff.client import TinkoffBank
pytestmark = [pytest.mark.django_db]
@pytest.fixture(autouse=True)
def record(mixer):
return mixer.blend('courses.Record', slug='home-video')
@pytest.fixture(autouse=True)
def payment_url(mocker):... | 27.184211 | 109 | 0.664085 |
f7f698616912aa6d84dae080a67b1812dc6aabef | 11,036 | py | Python | src/python/google_cloud_utils/big_query.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | null | null | null | src/python/google_cloud_utils/big_query.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | 1 | 2019-06-07T21:29:28.000Z | 2019-06-07T21:29:28.000Z | src/python/google_cloud_utils/big_query.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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, ... | 31.087324 | 87 | 0.649692 |
f7f6ba0f25c86f470f20030f3ca111068509131c | 9,579 | py | Python | codes/projects/test_continuous_parameter/utils_project/prediction_and_plotting_routine_vaeiaf.py | hwangoh/uq-vae | 382548e6f6dd7f9d72feff0e0752beec871db348 | [
"MIT"
] | 2 | 2021-07-28T16:47:18.000Z | 2021-08-03T00:53:58.000Z | codes/projects/test_discrete_parameter/utils_project/prediction_and_plotting_routine_vaeiaf.py | HwanGoh/uq-vae | 24a3d26987e2ec807d57601b14c68b22f3652a18 | [
"MIT"
] | null | null | null | codes/projects/test_discrete_parameter/utils_project/prediction_and_plotting_routine_vaeiaf.py | HwanGoh/uq-vae | 24a3d26987e2ec807d57601b14c68b22f3652a18 | [
"MIT"
] | 2 | 2021-09-29T08:31:46.000Z | 2021-11-07T10:26:45.000Z | '''Prediction and plotting routine
In preparation for prediction and plotting, this script will:
1) Load the obs_dimensions
2) Specify the input_dimensions and latent_dimensions
3) Instantiate the DataHandler class
4) Instantiate the neural network
5) Load the trained neural network weights
6) ... | 40.079498 | 85 | 0.63587 |
f7f6ed0e62e70df672d08b36fce19754a9ac746b | 1,036 | py | Python | tests/utils/test_helper_ab_test.py | avisionh/abtest | 9b4e640b67b2b4d2c3501f1549b63ddd675f058e | [
"MIT"
] | 1 | 2021-01-13T06:39:08.000Z | 2021-01-13T06:39:08.000Z | tests/utils/test_helper_ab_test.py | avisionh/abtest | 9b4e640b67b2b4d2c3501f1549b63ddd675f058e | [
"MIT"
] | null | null | null | tests/utils/test_helper_ab_test.py | avisionh/abtest | 9b4e640b67b2b4d2c3501f1549b63ddd675f058e | [
"MIT"
] | null | null | null | import src.utils.helper_ab_test as f
def test_report_conversions(df_ab_test, out_report_conversions):
assert (
f.report_conversions(
data=df_ab_test,
group_col="group",
group_filter="control",
convert_col="converted",
page_col="landing_page",
... | 31.393939 | 76 | 0.705598 |
f7f6ef4d563cfc3eb9ca06cff2f6513e07df9a98 | 2,723 | py | Python | experiments/steven-images/discrete_classic_envs.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/steven-images/discrete_classic_envs.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/steven-images/discrete_classic_envs.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | """
Run DQN on grid world.
"""
import gym
import numpy as np
from rlkit.torch.dqn.double_dqn import DoubleDQN
import rlkit.misc.hyperparameter as hyp
import rlkit.torch.pytorch_util as ptu
from rlkit.launchers.launcher_util import run_experiment
from rlkit.torch.networks import Mlp
from rlkit.torch.networks.experime... | 28.072165 | 78 | 0.594198 |
f7f70bba530c2576066b46b6f29fec1d0183d8fb | 2,533 | py | Python | modules/frame.py | manparvesh/chenab | b91d4fe9a3295526d46a8424ec22ed8a4f5e110f | [
"MIT"
] | 1 | 2018-06-16T20:19:07.000Z | 2018-06-16T20:19:07.000Z | modules/frame.py | manparvesh/chenab | b91d4fe9a3295526d46a8424ec22ed8a4f5e110f | [
"MIT"
] | null | null | null | modules/frame.py | manparvesh/chenab | b91d4fe9a3295526d46a8424ec22ed8a4f5e110f | [
"MIT"
] | null | null | null | import collections
Block = collections.namedtuple("Block", "type, handler, stack_height")
class Frame(object):
"""
collection of attributes with no methods
the attributes include the code object created by the compiler;
the local, global, and builtin namespaces; a reference to the previous frame;
... | 26.113402 | 81 | 0.564153 |
f7f755fdb958e86c397a6ec2994c176c678ee8d4 | 8,630 | py | Python | tests/test_conv_internal.py | CalebBell/ht | 3b95f9cfff30c8c0272443d523a484977eedbf0d | [
"MIT"
] | 118 | 2016-01-04T07:46:23.000Z | 2022-03-29T14:12:59.000Z | tests/test_conv_internal.py | CalebBell/ht | 3b95f9cfff30c8c0272443d523a484977eedbf0d | [
"MIT"
] | 4 | 2017-06-27T08:01:02.000Z | 2020-10-06T14:18:46.000Z | tests/test_conv_internal.py | CalebBell/ht | 3b95f9cfff30c8c0272443d523a484977eedbf0d | [
"MIT"
] | 22 | 2016-04-20T06:17:35.000Z | 2022-03-07T01:40:25.000Z | # -*- coding: utf-8 -*-
'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling.
Copyright (C) 2016, 2017, 2018, 2019, Caleb Bell <Caleb.Andrew.Bell@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "S... | 38.017621 | 232 | 0.714253 |
f7f774d6bed93d46f1b693b9d34fe372069428f2 | 6,077 | py | Python | exp2/exp2c.py | Haunter17/MIR_SU17 | 0eaefb8cab78ca896c1ed0074892c296110eb161 | [
"MIT"
] | null | null | null | exp2/exp2c.py | Haunter17/MIR_SU17 | 0eaefb8cab78ca896c1ed0074892c296110eb161 | [
"MIT"
] | 5 | 2017-05-22T20:32:07.000Z | 2017-06-02T21:06:23.000Z | exp2/exp2c.py | Haunter17/MIR_SU17 | 0eaefb8cab78ca896c1ed0074892c296110eb161 | [
"MIT"
] | null | null | null | import numpy as np
import tensorflow as tf
import h5py
import time
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
# Functions for initializing neural nets parameters
def init_weight_variable(shape):
initial = tf.truncated_normal(shape, stddev=0.1, dtype=tf.float32)
return tf.Variable(initia... | 34.333333 | 166 | 0.700675 |
f7f7bdffe6e7d03547f245739dffe47f5b63f0a2 | 26,472 | py | Python | sapp/ui/tests/issues_test.py | facebook/sapp | 4b85d10a791d8e9c8ae83d1f62fbded24845f053 | [
"MIT"
] | 74 | 2020-12-18T20:04:30.000Z | 2022-03-22T22:26:02.000Z | sapp/ui/tests/issues_test.py | facebook/sapp | 4b85d10a791d8e9c8ae83d1f62fbded24845f053 | [
"MIT"
] | 61 | 2020-12-21T21:33:05.000Z | 2022-01-27T21:22:20.000Z | sapp/ui/tests/issues_test.py | facebook/sapp | 4b85d10a791d8e9c8ae83d1f62fbded24845f053 | [
"MIT"
] | 20 | 2021-04-08T01:28:53.000Z | 2022-03-22T22:26:05.000Z | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from unittest import TestCase
from ... import queries
from ...db import DB, DBType
from ...models import IssueInstanceSharedTextAssoc
from ... | 36.817803 | 85 | 0.549448 |
f7f7c1e6fd84f3ef761be973c859c21750883d78 | 8,738 | py | Python | HW 3/ps3a.py | minotaur487/MIT-OCW-Problem-Sets | 40ca55009f1543a1249cca4304357ff39d72e3e6 | [
"MIT"
] | null | null | null | HW 3/ps3a.py | minotaur487/MIT-OCW-Problem-Sets | 40ca55009f1543a1249cca4304357ff39d72e3e6 | [
"MIT"
] | null | null | null | HW 3/ps3a.py | minotaur487/MIT-OCW-Problem-Sets | 40ca55009f1543a1249cca4304357ff39d72e3e6 | [
"MIT"
] | null | null | null | # 6.00 Problem Set 3A Solutions
#
# The 6.00 Word Game
# Created by: Kevin Luu <luuk> and Jenna Wiens <jwiens>
#
#
import random
import string
VOWELS = 'aeiou'
CONSONANTS = 'bcdfghjklmnpqrstvwxyz'
HAND_SIZE = 7
SCRABBLE_LETTER_VALUES = {
'a': 1, 'b': 3, 'c': 3, 'd': 2, 'e': 1, 'f': 4, 'g': 2, 'h': 4, 'i': 1, 'j'... | 27.739683 | 212 | 0.597391 |
f7f81d8cd61fe619520c40f6ecbd1e6c384b3f00 | 1,846 | py | Python | python_legacy/others_src/pgu/examples/layout1.py | garred/only_fighters | 55c3cc06884f3226d75a800e1ee79afd2c23aa8b | [
"CC-BY-3.0",
"CC0-1.0"
] | null | null | null | python_legacy/others_src/pgu/examples/layout1.py | garred/only_fighters | 55c3cc06884f3226d75a800e1ee79afd2c23aa8b | [
"CC-BY-3.0",
"CC0-1.0"
] | null | null | null | python_legacy/others_src/pgu/examples/layout1.py | garred/only_fighters | 55c3cc06884f3226d75a800e1ee79afd2c23aa8b | [
"CC-BY-3.0",
"CC0-1.0"
] | null | null | null | """<title>an example of layout usage</title>"""
import pygame
from pygame.locals import *
# the following line is not needed if pgu is installed
import sys; sys.path.insert(0, "..")
from pgu import layout
pygame.font.init()
screen = pygame.display.set_mode((320,320),SWSURFACE)
bg = (255,255,255)
fg = (0,0,0)
screen... | 28.84375 | 271 | 0.66468 |
f7f8337eb29ffe91086c2bd6edbeb60c8e16ba10 | 7,729 | py | Python | spectrum/django/spectrum.py | SpectrumApp/spectrum-python | 773516af1f89547b4a7afe555615247d7e44a393 | [
"BSD-3-Clause"
] | 6 | 2015-11-06T14:46:12.000Z | 2020-01-25T10:28:42.000Z | spectrum/django/spectrum.py | SpectrumApp/spectrum-python | 773516af1f89547b4a7afe555615247d7e44a393 | [
"BSD-3-Clause"
] | 7 | 2015-11-04T23:40:56.000Z | 2018-12-07T11:31:43.000Z | spectrum/django/spectrum.py | SpectrumApp/spectrum-python | 773516af1f89547b4a7afe555615247d7e44a393 | [
"BSD-3-Clause"
] | 2 | 2015-11-04T16:56:38.000Z | 2016-04-17T23:10:26.000Z | FIRE_HOSE = {
'version': 1,
'disable_existing_loggers': False,
'root': {
'level': 'DEBUG',
'handlers': ['console', 'root']
},
'filters': {
'request_id': {
'()': 'spectrum.filters.RequestIdFilter'
}
},
'formatters': {
'verbose': {
... | 27.310954 | 149 | 0.464743 |
f7f8343284b90779924b86ee9400c35d89381292 | 104,329 | py | Python | contrib/.venv/lib/python3.8/site-packages/bitcoinlib/transactions.py | jtatman/katersltc-client | 7ea88bfa32e9bdce9bf8d434a8909a07b65412f7 | [
"MIT"
] | null | null | null | contrib/.venv/lib/python3.8/site-packages/bitcoinlib/transactions.py | jtatman/katersltc-client | 7ea88bfa32e9bdce9bf8d434a8909a07b65412f7 | [
"MIT"
] | null | null | null | contrib/.venv/lib/python3.8/site-packages/bitcoinlib/transactions.py | jtatman/katersltc-client | 7ea88bfa32e9bdce9bf8d434a8909a07b65412f7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# BitcoinLib - Python Cryptocurrency Library
# TRANSACTION class to create, verify and sign Transactions
# © 2017 - 2021 March - 1200 Web Development <http://1200wd.com/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Aff... | 45.578419 | 244 | 0.60107 |
f7f878f1aa78ce5df61fe7b3686bea64cf0b1e66 | 288 | py | Python | ai4water/postprocessing/SeqMetrics/__init__.py | csiro-hydroinformatics/AI4Water | cdb18bd4bf298f77b381f1829045a1e790146985 | [
"MIT"
] | 12 | 2020-10-13T08:23:17.000Z | 2021-01-22T04:36:21.000Z | ai4water/postprocessing/SeqMetrics/__init__.py | csiro-hydroinformatics/AI4Water | cdb18bd4bf298f77b381f1829045a1e790146985 | [
"MIT"
] | 1 | 2020-10-15T02:42:52.000Z | 2020-10-15T02:51:07.000Z | ai4water/postprocessing/SeqMetrics/__init__.py | csiro-hydroinformatics/AI4Water | cdb18bd4bf298f77b381f1829045a1e790146985 | [
"MIT"
] | 2 | 2020-11-23T04:45:38.000Z | 2020-11-26T10:12:34.000Z | """SeqMetrics, the module to calculate performance related to tabular/structured and sequential data.
The values in a sequence are not necessarily related.
"""
from ._SeqMetrics import Metrics
from ._regression import RegressionMetrics
from ._classification import ClassificationMetrics
| 36 | 101 | 0.833333 |
f7f8aad8153f32829043537366778aa134928729 | 2,658 | py | Python | .leetcode/110.balanced-binary-tree.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/110.balanced-binary-tree.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/110.balanced-binary-tree.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | # @lc app=leetcode id=110 lang=python3
#
# [110] Balanced Binary Tree
#
# https://leetcode.com/problems/balanced-binary-tree/description/
#
# algorithms
# Easy (44.89%)
# Likes: 3539
# Dislikes: 232
# Total Accepted: 571.5K
# Total Submissions: 1.3M
# Testcase Example: '[3,9,20,null,null,15,7]'
#
# Given a binar... | 19.688889 | 76 | 0.569977 |
f7f8be9d8015dfeda464d09109d65cc93cb2aef8 | 4,661 | py | Python | preprocessing/smri/extract_freesurfer_metrics.py | GalBenZvi/BrainPrint | 8dda22f130f60bac66fe05f0f5163ee3680616f5 | [
"Apache-2.0"
] | null | null | null | preprocessing/smri/extract_freesurfer_metrics.py | GalBenZvi/BrainPrint | 8dda22f130f60bac66fe05f0f5163ee3680616f5 | [
"Apache-2.0"
] | 1 | 2021-08-12T07:54:37.000Z | 2021-08-12T07:54:37.000Z | preprocessing/smri/extract_freesurfer_metrics.py | GalBenZvi/BrainPrint | 8dda22f130f60bac66fe05f0f5163ee3680616f5 | [
"Apache-2.0"
] | 1 | 2021-08-08T11:56:19.000Z | 2021-08-08T11:56:19.000Z | import os
from nipype.interfaces import ants
from pathlib import Path
from numpy import fabs
from pandas.core.reshape.merge import merge
def get_subject_files(derivatives_dir: Path, subj_id: str) -> dict:
"""
Finds subject's relevant files as were derived from FS's analysis pipeline
Parameters
------... | 31.073333 | 112 | 0.576057 |
f7f8cb6f0179b6b063f09c96301f1c9980221784 | 1,113 | py | Python | python/src/aoc/year2020/day6.py | ocirne/adventofcode | ea9b5f1b48a04284521e85c96b420ed54adf55f0 | [
"Unlicense"
] | 1 | 2021-02-16T21:30:04.000Z | 2021-02-16T21:30:04.000Z | python/src/aoc/year2020/day6.py | ocirne/adventofcode | ea9b5f1b48a04284521e85c96b420ed54adf55f0 | [
"Unlicense"
] | null | null | null | python/src/aoc/year2020/day6.py | ocirne/adventofcode | ea9b5f1b48a04284521e85c96b420ed54adf55f0 | [
"Unlicense"
] | null | null | null | from collections import defaultdict
from aoc.util import load_example, load_input
def part1(lines):
"""
>>> part1(load_example(__file__, '6'))
11
"""
answers = []
a = {}
for line in lines:
if not line.strip():
answers.append(len(a.keys()))
a = {}
els... | 23.1875 | 77 | 0.525606 |
f7f8d3b469cb3c4fabc761ca5ca0ac50691d06a6 | 10,902 | py | Python | old_projects/brachistochrone/graveyard.py | dezren39/manim | 80d7742446c588dc296bd3afb3465a63b63383db | [
"MIT"
] | 1 | 2020-07-05T12:56:31.000Z | 2020-07-05T12:56:31.000Z | old_projects/brachistochrone/graveyard.py | elphasminyato/manim | 8488b621ef3367e6a911354d2765684321fed20e | [
"MIT"
] | 3 | 2021-09-08T02:19:38.000Z | 2022-03-12T00:41:00.000Z | old_projects/brachistochrone/graveyard.py | dezren39/manim | 80d7742446c588dc296bd3afb3465a63b63383db | [
"MIT"
] | 1 | 2020-07-05T12:56:33.000Z | 2020-07-05T12:56:33.000Z | import numpy as np
import itertools as it
from big_ol_pile_of_manim_imports import *
from old_projects.brachistochrone.curves import Cycloid
class MultilayeredGlass(PhotonScene, ZoomedScene):
CONFIG = {
"num_discrete_layers" : 5,
"num_variables" : 3,
"top_color" : BLUE_E,
"bottom_... | 33.441718 | 83 | 0.52495 |
f7f8dc4eea8d9545658fcc1bcc7abc41265a8a74 | 3,649 | py | Python | fire/main_test.py | loynoir/python-fire | 1f99e282f079bea992105f609ad1a70ed60d6635 | [
"Apache-2.0"
] | null | null | null | fire/main_test.py | loynoir/python-fire | 1f99e282f079bea992105f609ad1a70ed60d6635 | [
"Apache-2.0"
] | null | null | null | fire/main_test.py | loynoir/python-fire | 1f99e282f079bea992105f609ad1a70ed60d6635 | [
"Apache-2.0"
] | 1 | 2021-04-10T14:17:27.000Z | 2021-04-10T14:17:27.000Z | # Copyright (C) 2018 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 37.234694 | 88 | 0.597698 |
f7f8e3c3e3f8a8fa75035d3ef14d861b7c2f6cf0 | 1,570 | py | Python | dmrg_helpers/extract/estimator_name.py | iglpdc/dmrg_helpers | df27ff06395c0a4779c2d2723d57524da55cc14a | [
"MIT"
] | 1 | 2019-09-26T13:06:04.000Z | 2019-09-26T13:06:04.000Z | dmrg_helpers/extract/estimator_name.py | iglpdc/dmrg_helpers | df27ff06395c0a4779c2d2723d57524da55cc14a | [
"MIT"
] | null | null | null | dmrg_helpers/extract/estimator_name.py | iglpdc/dmrg_helpers | df27ff06395c0a4779c2d2723d57524da55cc14a | [
"MIT"
] | null | null | null | '''A class for estimator names.
'''
from dmrg_helpers.extract.tuple_to_key import tuple_to_key
from sqlite3 import register_adapter, register_converter
class EstimatorName(object):
"""A class to store estimator names into the database.
You use this function to handle estimator names inside the databasesel... | 28.035714 | 78 | 0.696178 |
f7f92649f6a7e136179d208d352aa824ff4cae2a | 2,013 | py | Python | rlkit/envs/mujoco/ant.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | rlkit/envs/mujoco/ant.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | rlkit/envs/mujoco/ant.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | """
Exact same as gym env, except that the gear ratio is 30 rather than 150.
"""
import numpy as np
from gym.envs.mujoco import MujocoEnv
from rlkit.envs.env_utils import get_asset_full_path
class AntEnv(MujocoEnv):
def __init__(self, use_low_gear_ratio=True):
if use_low_gear_ratio:
xml_path... | 33.55 | 92 | 0.614506 |
f7f92756d4144e78fb3424cd6acd0c6a581225e4 | 1,209 | py | Python | desktopmagic/scripts/screengrab_torture_test.py | p3rd1x/Desktopmagic | 906cbe16f4e6c5fea7121c186ff8c6e7c997b2f7 | [
"MIT"
] | 49 | 2015-05-20T08:19:42.000Z | 2021-11-12T17:20:40.000Z | desktopmagic/scripts/screengrab_torture_test.py | p3rd1x/Desktopmagic | 906cbe16f4e6c5fea7121c186ff8c6e7c997b2f7 | [
"MIT"
] | 9 | 2015-06-17T22:47:21.000Z | 2022-03-15T09:00:28.000Z | desktopmagic/scripts/screengrab_torture_test.py | p3rd1x/Desktopmagic | 906cbe16f4e6c5fea7121c186ff8c6e7c997b2f7 | [
"MIT"
] | 16 | 2015-12-13T18:34:45.000Z | 2021-02-17T13:50:17.000Z | from __future__ import print_function
import sys
from desktopmagic.screengrab_win32 import GrabFailed, getScreenAsImage, getDisplaysAsImages, getRectAsImage
def main():
print("""\
This program helps you test whether screengrab_win32 has memory leaks
and other problems. It takes a screenshot repeatedly and discards... | 24.18 | 107 | 0.732837 |
f7f93b1f00383659b470b49241c9a0c547bacbf6 | 1,605 | py | Python | test/vanilla/low-level/AcceptanceTests/utils.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/vanilla/low-level/AcceptanceTests/utils.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/vanilla/low-level/AcceptanceTests/utils.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.000Z | # coding=utf-8
# --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ... | 41.153846 | 78 | 0.686604 |
f7f93dd897f60ba55b61ad8da80c4ef1c2949a55 | 2,782 | py | Python | benchmark/lsh_benchmark_plot.py | yrik/datasketch | 82d9639bc0011932a952bbae1d4b5bd5ac03c7c8 | [
"MIT"
] | 1 | 2019-06-05T15:06:08.000Z | 2019-06-05T15:06:08.000Z | benchmark/lsh_benchmark_plot.py | yrik/datasketch | 82d9639bc0011932a952bbae1d4b5bd5ac03c7c8 | [
"MIT"
] | null | null | null | benchmark/lsh_benchmark_plot.py | yrik/datasketch | 82d9639bc0011932a952bbae1d4b5bd5ac03c7c8 | [
"MIT"
] | 2 | 2018-11-12T18:00:52.000Z | 2022-03-21T05:36:20.000Z | import json, sys, argparse
import numpy as np
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
def get_precision_recall(found, reference):
reference = set(reference)
intersect = sum(1 for i in found if i in reference)
if len(found) == 0:
precision = 0.0
else:
pre... | 37.594595 | 89 | 0.663911 |
f7f96bd1f2cdb6be9177a9e421651ecb01b38e5c | 1,529 | py | Python | engine/config_storage.py | hive-engine/distribution-engine-smt | 9ed4fddbae17342700a4ba0f24c667c8b853c793 | [
"MIT"
] | null | null | null | engine/config_storage.py | hive-engine/distribution-engine-smt | 9ed4fddbae17342700a4ba0f24c667c8b853c793 | [
"MIT"
] | null | null | null | engine/config_storage.py | hive-engine/distribution-engine-smt | 9ed4fddbae17342700a4ba0f24c667c8b853c793 | [
"MIT"
] | null | null | null | # This Python file uses the following encoding: utf-8
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from builtins import bytes
from builtins import object
from beemgraphenebase.py23 import py23_bytes, bytes_types
from... | 25.915254 | 62 | 0.734467 |
f7f97eea171aeafdaed314fe22447d5c68e6b9fd | 2,221 | py | Python | applications/shop/models/paymentmethod/iban.py | dev-easyshares/mighty | a6cf473fb8cfbf5b92db68c7b068fc8ae2911b8b | [
"MIT"
] | null | null | null | applications/shop/models/paymentmethod/iban.py | dev-easyshares/mighty | a6cf473fb8cfbf5b92db68c7b068fc8ae2911b8b | [
"MIT"
] | 1 | 2022-03-12T00:57:37.000Z | 2022-03-12T00:57:37.000Z | applications/shop/models/paymentmethod/iban.py | dev-easyshares/mighty | a6cf473fb8cfbf5b92db68c7b068fc8ae2911b8b | [
"MIT"
] | null | null | null | from django.conf import settings
from django.core.exceptions import ValidationError
from mighty.applications.shop.apps import sepas_test, ShopConfig
from schwifty import IBAN, BIC
from dateutil.relativedelta import relativedelta
import re
class IbanModel:
@property
def readable_iban(self):
return ' '.j... | 34.703125 | 114 | 0.620891 |
f7f9869adde2802b8a5d98e792e95d6a617f55e6 | 628 | py | Python | test/test_binary_heap.py | paolodelia99/Python-C-Algorithms | 9113ad566e4e659c1f16135c2d3abd3a4c57a46e | [
"MIT"
] | 2 | 2021-02-13T10:58:58.000Z | 2021-03-16T09:56:01.000Z | test/test_binary_heap.py | paolodelia99/Python-C-Algorithms | 9113ad566e4e659c1f16135c2d3abd3a4c57a46e | [
"MIT"
] | null | null | null | test/test_binary_heap.py | paolodelia99/Python-C-Algorithms | 9113ad566e4e659c1f16135c2d3abd3a4c57a46e | [
"MIT"
] | null | null | null | import nose
import binary_heap
BinaryHeap = binary_heap.BinaryHeap
def test_binary_heap_101():
b = BinaryHeap()
nose.tools.assert_is_instance(b, BinaryHeap)
def test_binary_heap_num_entries():
b = BinaryHeap()
nose.tools.assert_equal(b.num_entries(), 0)
def test_binary_heap_insert():
b = Bina... | 19.625 | 48 | 0.687898 |
f7f98c856f56ffb55ddba793a6f969bdabb8eaef | 18,273 | py | Python | packages/galapagos_embedded/libs/lib_frontcam.py | 100kimch/ros_galapagos | 8f92cb93246c263b61199aef113e43cefc5f3939 | [
"MIT"
] | 2 | 2020-10-26T05:01:35.000Z | 2022-02-14T10:37:17.000Z | packages/galapagos_embedded/libs/lib_frontcam.py | 100kimch/ros_galapagos | 8f92cb93246c263b61199aef113e43cefc5f3939 | [
"MIT"
] | null | null | null | packages/galapagos_embedded/libs/lib_frontcam.py | 100kimch/ros_galapagos | 8f92cb93246c263b61199aef113e43cefc5f3939 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import rospy
import matplotlib.pyplot as plt
import sys
from scheduler import SCHEDULER
from constants import *
import os
import sys
# * Variables
# variables for matching
# Initiate SIFT description detector
Orb = cv2.ORB_create()
# create BFMatcher object
Bf = cv2.BFMatcher(cv2.NORM_H... | 34.347744 | 136 | 0.626224 |
f7f9967e6e3514f8f4b1ce4db5f80834c49af67c | 2,806 | py | Python | SimpleGP/tests/test_egp.py | mgraffg/simplegp | 7e4639e3ac76571a4e67669cad6e8e775b3fc345 | [
"Apache-2.0"
] | 2 | 2015-03-18T17:26:20.000Z | 2019-03-18T17:28:16.000Z | SimpleGP/tests/test_egp.py | mgraffg/simplegp | 7e4639e3ac76571a4e67669cad6e8e775b3fc345 | [
"Apache-2.0"
] | 1 | 2015-04-19T17:02:49.000Z | 2015-07-21T18:48:34.000Z | SimpleGP/tests/test_egp.py | mgraffg/simplegp | 7e4639e3ac76571a4e67669cad6e8e775b3fc345 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 Mario Graff Guerrero
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in wri... | 41.264706 | 75 | 0.561654 |
f7f9dc538099b1ac2c1efc11043efddc264d346b | 10,517 | py | Python | venv/Lib/site-packages/alpacalib/syntax.py | rexliu3/StockTradingBotCloud | 46b732b9c05f73bc0e856a3c4a16854b6d12e18e | [
"MIT"
] | null | null | null | venv/Lib/site-packages/alpacalib/syntax.py | rexliu3/StockTradingBotCloud | 46b732b9c05f73bc0e856a3c4a16854b6d12e18e | [
"MIT"
] | null | null | null | venv/Lib/site-packages/alpacalib/syntax.py | rexliu3/StockTradingBotCloud | 46b732b9c05f73bc0e856a3c4a16854b6d12e18e | [
"MIT"
] | 1 | 2020-06-28T11:47:47.000Z | 2020-06-28T11:47:47.000Z | """
syntax.py
Syntax Pasrse for Regex
"""
from alpacalib.rast import RAST
from alpacalib.lex import LexParser
from alpacalib.charset import CharacterSet
class SyntaxParserError(Exception):
pass
class SyntaxParser:
def __init__(self, regex):
self.lex = LexParser(regex)
def build(self):
s... | 39.389513 | 107 | 0.501474 |
f7f9e6ecda9b35f096e44ae0a3f1a4c9159d9aa7 | 2,330 | py | Python | pyplan/pyplan/companies/views.py | jorgedouglas71/pyplan-ide | 5ad0e4a2592b5f2716ff680018f717c65de140f5 | [
"MIT"
] | null | null | null | pyplan/pyplan/companies/views.py | jorgedouglas71/pyplan-ide | 5ad0e4a2592b5f2716ff680018f717c65de140f5 | [
"MIT"
] | null | null | null | pyplan/pyplan/companies/views.py | jorgedouglas71/pyplan-ide | 5ad0e4a2592b5f2716ff680018f717c65de140f5 | [
"MIT"
] | null | null | null | from rest_framework import status, viewsets
from rest_framework.decorators import action
from rest_framework.permissions import IsAdminUser
from rest_framework.response import Response
from pyplan.pyplan.company_preference.service import CompanyPreferenceService
from pyplan.pyplan.preference.serializers import Prefere... | 40.877193 | 129 | 0.734764 |
f7f9faefe441c222cc97bcc160b16b48b42a8190 | 134,876 | py | Python | tests/unit/gapic/compute_v1/test_security_policies.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | tests/unit/gapic/compute_v1/test_security_policies.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | tests/unit/gapic/compute_v1/test_security_policies.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 39.004049 | 120 | 0.677363 |
f7f9ffa08a1c44479e50127445802d03fde50686 | 4,439 | py | Python | components/collector/src/source_collectors/axe_core/accessibility.py | ICTU/quality-time | 88d80ea30e35bd5f0bf5cce7cb43dc9f439e91f5 | [
"Apache-2.0"
] | 33 | 2016-01-20T07:35:48.000Z | 2022-03-14T09:20:51.000Z | components/collector/src/source_collectors/axe_core/accessibility.py | ICTU/quality-time | 88d80ea30e35bd5f0bf5cce7cb43dc9f439e91f5 | [
"Apache-2.0"
] | 2,410 | 2016-01-22T18:13:01.000Z | 2022-03-31T16:57:34.000Z | components/collector/src/source_collectors/axe_core/accessibility.py | ICTU/quality-time | 88d80ea30e35bd5f0bf5cce7cb43dc9f439e91f5 | [
"Apache-2.0"
] | 21 | 2016-01-16T11:49:23.000Z | 2022-01-14T21:53:22.000Z | """Axe-core accessibility analysis collectors."""
from collections.abc import Collection
from typing import Any
from base_collectors import JSONFileSourceCollector, SourceCollector
from collector_utilities.functions import md5_hash, match_string_or_regular_expression
from collector_utilities.type import JSON
from mod... | 48.25 | 120 | 0.631674 |
f7fa02ded7f4751e8fea9a4bac6de3ef50dfba36 | 20,158 | py | Python | bonneville/modules/git.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | null | null | null | bonneville/modules/git.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | null | null | null | bonneville/modules/git.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | 3 | 2020-05-10T02:08:44.000Z | 2020-11-06T11:01:57.000Z | # -*- coding: utf-8 -*-
'''
Support for the Git SCM
'''
# Import python libs
import os
import tempfile
try:
import pipes
HAS_PIPES = True
except ImportError:
HAS_PIPES = False
# Import bonneville libs
from bonneville import utils, exceptions
def __virtual__():
'''
Only load if git exists on the ... | 22.958998 | 109 | 0.598075 |
f7fa305b79b7894b34e4865ca9355c4a05bbc097 | 113,086 | py | Python | Lib/yp_test/test_codecs.py | Syeberman/nohtyP | 59d7214a5a5474a03c54f45d79ad4fd037989a79 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Lib/yp_test/test_codecs.py | Syeberman/nohtyP | 59d7214a5a5474a03c54f45d79ad4fd037989a79 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Lib/yp_test/test_codecs.py | Syeberman/nohtyP | 59d7214a5a5474a03c54f45d79ad4fd037989a79 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | from yp import *
import codecs
import contextlib
import io
import locale
import sys
from yp_test import yp_unittest
import warnings
import encodings
from yp_test import support
# Extra assurance that we're not accidentally testing Python's types...unless we mean to
_str = str
def bytes( *args, **kwargs ): raise NotIm... | 38.399321 | 113 | 0.544382 |
f7fa51cf7ef754862417bcd19836f12f0cc023d0 | 1,048 | py | Python | Hydro/datapoint/models.py | p-v-o-s/hydro | 34eaf227043c69b921650aa120516533d61c6854 | [
"BSD-3-Clause"
] | null | null | null | Hydro/datapoint/models.py | p-v-o-s/hydro | 34eaf227043c69b921650aa120516533d61c6854 | [
"BSD-3-Clause"
] | null | null | null | Hydro/datapoint/models.py | p-v-o-s/hydro | 34eaf227043c69b921650aa120516533d61c6854 | [
"BSD-3-Clause"
] | null | null | null | from django.db import models
from django.utils.translation import gettext_lazy as _
from Hydro.device.models import Device
class Point(models.Model):
_lat = models.DecimalField(_("Latitude"), max_digits=12, decimal_places=9)
_lng = models.DecimalField(_("Longitude"), max_digits=12, decimal_places=9)
def ... | 31.757576 | 79 | 0.695611 |
f7fa64a912a6fdf7458fa98f32593eb327eddb1b | 7,960 | py | Python | pyKinectTools/utils/AlignCameras.py | colincsl/pyKinectTools | a84bb5b7ff9dd613576415932865c2ad435520b3 | [
"BSD-2-Clause-FreeBSD"
] | 33 | 2015-04-07T16:28:04.000Z | 2021-11-22T00:28:43.000Z | pyKinectTools/utils/AlignCameras.py | colincsl/pyKinectTools | a84bb5b7ff9dd613576415932865c2ad435520b3 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | pyKinectTools/utils/AlignCameras.py | colincsl/pyKinectTools | a84bb5b7ff9dd613576415932865c2ad435520b3 | [
"BSD-2-Clause-FreeBSD"
] | 13 | 2015-04-07T16:28:34.000Z | 2021-04-26T08:04:36.000Z | ''' Use this file to hand register multiple depth cameras with the 3D visualizer
Procedure:
1) Modify the scrip below for your files
2) After adding points, click the mayavi button in the window and add Transformation to the scene. Drag the second points to the transformation.
3) Manually match the two scenes
4) Click... | 44.222222 | 338 | 0.72098 |
f7faa9cd76e458ca86b43c3b1502fade86146a38 | 587 | py | Python | visitingController.py | C1626152/bfrp | 2d43f90ba08709446c70453b758c42bb41e5946b | [
"MIT"
] | 1 | 2019-03-05T11:36:17.000Z | 2019-03-05T11:36:17.000Z | visitingController.py | C1626152/bfrp | 2d43f90ba08709446c70453b758c42bb41e5946b | [
"MIT"
] | 1 | 2019-03-12T00:09:09.000Z | 2019-03-12T00:09:09.000Z | visitingController.py | C1626152/bfrp | 2d43f90ba08709446c70453b758c42bb41e5946b | [
"MIT"
] | 2 | 2019-02-14T20:35:34.000Z | 2019-03-05T11:45:54.000Z | import microbit
import radio
# turn radio on
radio.on()
# set channel, power to max, assign group
radio.config(channel=7, power=10, group=1)
tX = radio.send()
rX = radio.receive()
dict currentBlock = []
# While loop to send beacon signal
while rX == False:
tX = "SYN"
if rX == "ACK":
# Placeholder in use here
tX ... | 20.241379 | 61 | 0.698467 |
f7fadb47db37dd5e50248bd8ac038911f732ddae | 1,092 | py | Python | user/collection/manager/modify_one.py | dsvalenciah/ROAp | 24cbff0e719c5009ec1f1e7190924d4d9297e992 | [
"MIT"
] | 4 | 2018-04-23T00:04:01.000Z | 2018-10-28T22:56:51.000Z | user/collection/manager/modify_one.py | dsvalenciah/ROAp | 24cbff0e719c5009ec1f1e7190924d4d9297e992 | [
"MIT"
] | 23 | 2017-12-22T08:27:35.000Z | 2021-12-13T19:57:35.000Z | user/collection/manager/modify_one.py | dsvalenciah/ROAp | 24cbff0e719c5009ec1f1e7190924d4d9297e992 | [
"MIT"
] | 1 | 2020-06-03T02:07:26.000Z | 2020-06-03T02:07:26.000Z |
from datetime import datetime
from manager.exceptions.user import (
UserPermissionError, UserNotFoundError, UserSchemaError
)
from manager.schemas.user import User
def modify_one(db_client, old_user_id, new_user, auth_user):
"""Modify user."""
_ = auth_user.get('language')
if auth_user.get('role')... | 24.818182 | 76 | 0.60989 |
f7fae43b47e0e86cb363499010b040240a6b1465 | 705 | py | Python | master/bopytest-code/code/tasks_proj/src/tasks/config.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | master/bopytest-code/code/tasks_proj/src/tasks/config.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | master/bopytest-code/code/tasks_proj/src/tasks/config.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | from collections import namedtuple
try:
from configparser import ConfigParser
except ImportError:
from ConfigParser import ConfigParser
import os
TasksConfig = namedtuple('TasksConfig', ['db_path', 'db_type',])
def get_config():
parser = ConfigParser()
config_file = os.path.expanduser('~/.tasks.confi... | 30.652174 | 64 | 0.706383 |
f7fae54038bdef582ab82ea0531d0a9f591a3b42 | 4,679 | py | Python | import-site-tree-from-csv/import-waf-site-tree-from-csv.py | imperva/mx-toolbox | 639e32d169bb96c4f2ae3a4dedaefe1eb81c35f3 | [
"MIT"
] | 9 | 2019-10-09T20:15:50.000Z | 2022-02-08T07:12:13.000Z | import-site-tree-from-csv/import-waf-site-tree-from-csv.py | imperva/mx-toolbox | 639e32d169bb96c4f2ae3a4dedaefe1eb81c35f3 | [
"MIT"
] | 4 | 2019-08-22T13:08:17.000Z | 2021-04-27T01:16:51.000Z | import-site-tree-from-csv/import-waf-site-tree-from-csv.py | imperva/mx-toolbox | 639e32d169bb96c4f2ae3a4dedaefe1eb81c35f3 | [
"MIT"
] | 8 | 2019-09-25T10:55:59.000Z | 2021-09-01T09:13:37.000Z | #!/usr/bin/env python
import ss
import sys
import json
import csv
import requests
import logging
import urllib
from subprocess import PIPE,Popen
import pyparsing
############ ENV Settings ############
logging.basicConfig(filename="import_site_tree_from_csv.log", filemode='w', format='%(name)s - %(levelname)s - %(mes... | 64.09589 | 1,011 | 0.613593 |
f7fae696115bcd6de53129321c3c07b9f6603efc | 2,722 | py | Python | cnocr/cnocr/hyperparams/cn_hyperparams.py | DCMMC/chineseocr | 0b8772615239ea7f212b1ab5bc75183e7e9f16b0 | [
"MIT"
] | null | null | null | cnocr/cnocr/hyperparams/cn_hyperparams.py | DCMMC/chineseocr | 0b8772615239ea7f212b1ab5bc75183e7e9f16b0 | [
"MIT"
] | null | null | null | cnocr/cnocr/hyperparams/cn_hyperparams.py | DCMMC/chineseocr | 0b8772615239ea7f212b1ab5bc75183e7e9f16b0 | [
"MIT"
] | null | null | null | from __future__ import print_function
class CnHyperparams(object):
"""
Hyperparameters for LSTM network
"""
def __init__(self):
# Training hyper parameters
# self._train_epoch_size = 2560000
# self._eval_epoch_size = 3000
self._num_epoch = 20
self.optimizer = "A... | 21.776 | 68 | 0.608376 |
f7fae844ae67eac2f1c0b866356426490fbcfeec | 1,141 | py | Python | clustereval/stability.py | vinay-swamy/clustereval | d199cf0f8f232c35602633d8821249e6578d080a | [
"MIT"
] | null | null | null | clustereval/stability.py | vinay-swamy/clustereval | d199cf0f8f232c35602633d8821249e6578d080a | [
"MIT"
] | 10 | 2021-04-07T16:37:18.000Z | 2021-06-08T17:54:54.000Z | clustereval/stability.py | vinay-swamy/clustereval | d199cf0f8f232c35602633d8821249e6578d080a | [
"MIT"
] | null | null | null | #%%
import pandas as pd
import numpy as np
import glob
import os
import re
import pickle
from multiprocessing import Pool
def entropy(exp): # both are dfs with two columsn, Barcode,cluster
# calc H_tot
entropy = (exp
.groupby("labels")
.count()
.reset_index(drop=True)
... | 25.355556 | 80 | 0.577564 |
f7fb22471c1dc26094f9fab0f04f6eeabc78b20a | 2,263 | py | Python | tests/test_bytecode.py | 4577/Jawa | 23f93020ef6687567e45a9afa09bfd6e0faf6f0a | [
"MIT"
] | null | null | null | tests/test_bytecode.py | 4577/Jawa | 23f93020ef6687567e45a9afa09bfd6e0faf6f0a | [
"MIT"
] | null | null | null | tests/test_bytecode.py | 4577/Jawa | 23f93020ef6687567e45a9afa09bfd6e0faf6f0a | [
"MIT"
] | 1 | 2021-01-21T12:17:39.000Z | 2021-01-21T12:17:39.000Z | from jawa.util.bytecode import Instruction, Operand, OperandTypes
GOOD_TABLE_SWITCH = [
Instruction(mnemonic='iconst_1', opcode=4, operands=[], pos=0),
Instruction(mnemonic='tableswitch', opcode=170, operands=[
# DEFAULT
Operand(OperandTypes.BRANCH, value=30),
# LOW
Operand(Ope... | 32.797101 | 68 | 0.679187 |
f7fb508ac353c588a4347cfd6dc0e5564b45f405 | 2,291 | py | Python | experiments/ashvin/icml2020/hand/pen/demo_awr3.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/hand/pen/demo_awr3.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/hand/pen/demo_awr3.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | """
AWR + SAC from demo experiment
"""
from rlkit.demos.source.dict_to_mdp_path_loader import DictToMDPPathLoader
from rlkit.launchers.experiments.awac.awac_rl import experiment
import rlkit.misc.hyperparameter as hyp
from rlkit.launchers.arglauncher import run_variants
if __name__ == "__main__":
variant = dict(... | 27.939024 | 74 | 0.602794 |
f7fb8d225050c51183c45b2c72d33c3a0f270735 | 3,509 | py | Python | tests/client/sdk/text2text/test_models.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | tests/client/sdk/text2text/test_models.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | tests/client/sdk/text2text/test_models.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2021-present, the Recognai S.L. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | 30.25 | 84 | 0.707324 |
f7fb8f81600e0b3d8bd12850f84d936d411cae09 | 1,909 | py | Python | tests/st/ops/ascend/vector/test_elemwise_mul_ad_001.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/st/ops/ascend/vector/test_elemwise_mul_ad_001.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/st/ops/ascend/vector/test_elemwise_mul_ad_001.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2019 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 31.816667 | 88 | 0.663698 |
f7fbd84bd7dc834c667a2f4c61326629d1896354 | 2,687 | py | Python | setup.py | legaultmarc/geneparse | 5a844df77ded5adc765a086a8d346fce6ba01f3d | [
"MIT"
] | 4 | 2018-11-09T11:10:24.000Z | 2021-07-23T22:17:58.000Z | setup.py | legaultmarc/geneparse | 5a844df77ded5adc765a086a8d346fce6ba01f3d | [
"MIT"
] | 5 | 2017-05-02T15:28:01.000Z | 2018-04-16T18:29:15.000Z | setup.py | legaultmarc/geneparse | 5a844df77ded5adc765a086a8d346fce6ba01f3d | [
"MIT"
] | 1 | 2017-05-12T17:58:32.000Z | 2017-05-12T17:58:32.000Z | #!/usr/bin/env python
# How to build source distribution
# - python setup.py sdist --format bztar
# - python setup.py sdist --format gztar
# - python setup.py sdist --format zip
# - python setup.py bdist_wheel
import os
import sys
from setuptools import setup, find_packages
MAJOR = 0
MINOR = 8
MICRO = 1
V... | 30.885057 | 75 | 0.560849 |
f7fc0a4725a095c886d107cd492aaa611a8fffff | 1,019 | py | Python | tests/test_custom_extension.py | avsolatorio/pyscaffoldext-dsproject-vscode | 7bcdc63be6cf638c2da8b291c1e21d3199fbbd35 | [
"MIT"
] | null | null | null | tests/test_custom_extension.py | avsolatorio/pyscaffoldext-dsproject-vscode | 7bcdc63be6cf638c2da8b291c1e21d3199fbbd35 | [
"MIT"
] | null | null | null | tests/test_custom_extension.py | avsolatorio/pyscaffoldext-dsproject-vscode | 7bcdc63be6cf638c2da8b291c1e21d3199fbbd35 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from os.path import exists as path_exists
from pyscaffold.api import create_project
from pyscaffold.cli import parse_args, process_opts
from pyscaffold.utils import chdir
EXT_FLAG = "--dsproject-vscode"
FLAKE8 = "flake8 --max-line-length=88"
def test_add_custom_extension(tmpfolder):
args... | 28.305556 | 77 | 0.716389 |
f7fc1d610341078497b9b650a4fd2011b1fd2145 | 5,138 | py | Python | tractags/db.py | idevat/trac-tags-plugin | 51577d2deb3016b9b89c18d5f9dd2ca0fecf57f6 | [
"MIT"
] | null | null | null | tractags/db.py | idevat/trac-tags-plugin | 51577d2deb3016b9b89c18d5f9dd2ca0fecf57f6 | [
"MIT"
] | null | null | null | tractags/db.py | idevat/trac-tags-plugin | 51577d2deb3016b9b89c18d5f9dd2ca0fecf57f6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 Steffen Hoffmann <hoff.st@web.de>
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
from trac.core import Component, TracError, implements
from trac.db.api import DatabaseMa... | 38.343284 | 79 | 0.561697 |
f7fc522b7620c2b8cb95f33879398ac00dcbe666 | 377 | py | Python | excursions/migrations/0004_alter_excursion_date.py | timptner/farafmb.de | 2b154278d8b44ea3adecafcb8554c1b0b0055e01 | [
"MIT"
] | 1 | 2017-04-06T09:12:45.000Z | 2017-04-06T09:12:45.000Z | excursions/migrations/0004_alter_excursion_date.py | timptner/farafmb.de | 2b154278d8b44ea3adecafcb8554c1b0b0055e01 | [
"MIT"
] | 2 | 2017-09-07T22:09:50.000Z | 2020-06-09T14:46:30.000Z | excursions/migrations/0004_alter_excursion_date.py | timptner/farafmb.de | 2b154278d8b44ea3adecafcb8554c1b0b0055e01 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.4 on 2021-09-18 14:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('excursions', '0003_auto_20210918_1341'),
]
operations = [
migrations.AlterField(
model_name='excursion',
name='date'... | 19.842105 | 50 | 0.591512 |
f7fca2128c1bf1d136f2b78fd70b9046b1f16bda | 3,792 | py | Python | intersight/models/pci_device_list.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/pci_device_list.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/pci_device_list.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class PciDeviceList(object):
"""
NOTE: This class i... | 24.623377 | 78 | 0.542458 |
f7fcdf736be5df3949e0c92adefb6b4899fbc42d | 17,866 | py | Python | vyperlogix/crontab/scheduler.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | 1 | 2020-09-29T01:36:33.000Z | 2020-09-29T01:36:33.000Z | vyperlogix/crontab/scheduler.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | vyperlogix/crontab/scheduler.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python
"""
See also: http://code.activestate.com/recipes/577466-cron-like-triggers/
This module provides a class for cron-like scheduling systems, and
exposes the function used to convert static cron expressions to Python
sets.
CronExpression objects are instantiated with a cron formatted string
that r... | 40.512472 | 215 | 0.585022 |
f7fce897ee2f59d420de72670135bc610f8f54ac | 5,095 | py | Python | rally/common/db/schema.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | null | null | null | rally/common/db/schema.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | null | null | null | rally/common/db/schema.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | 1 | 2015-02-07T09:44:47.000Z | 2015-02-07T09:44:47.000Z | # All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 33.300654 | 78 | 0.655937 |
f7fcea3b57813b46d8d47059d275ed86aed8544b | 7,922 | py | Python | zubhub_backend/zubhub/projects/models.py | NdibeRaymond/zubhub | 23907202af4f4f4f85a108ed15e811abb3d22407 | [
"MIT"
] | 1 | 2022-01-21T14:15:24.000Z | 2022-01-21T14:15:24.000Z | zubhub_backend/zubhub/projects/models.py | NdibeRaymond/zubhub | 23907202af4f4f4f85a108ed15e811abb3d22407 | [
"MIT"
] | null | null | null | zubhub_backend/zubhub/projects/models.py | NdibeRaymond/zubhub | 23907202af4f4f4f85a108ed15e811abb3d22407 | [
"MIT"
] | null | null | null | import uuid
from math import floor
from treebeard.mp_tree import MP_Node
from django.db import models
from django.contrib.auth import get_user_model
from django.utils.text import slugify
from django.utils import timezone
from django.contrib.postgres.search import SearchVectorField
from django.contrib.postgres.indexes i... | 35.684685 | 119 | 0.639485 |
f7fd02406db0cdbed19282f63a503c5fbd99b5d4 | 5,413 | py | Python | tests/data/packages/fetchai/protocols/t_protocol_no_ct/dialogues.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | tests/data/packages/fetchai/protocols/t_protocol_no_ct/dialogues.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | tests/data/packages/fetchai/protocols/t_protocol_no_ct/dialogues.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2022 fetchai
#
# 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
#
#... | 36.328859 | 91 | 0.663403 |
f7fd24a1951d2de758d9ba64113792fa048b8145 | 5,679 | py | Python | tests/ext/django/test_middleware.py | musicinmybrain/aws-xray-sdk-python | b8e59423f1891351ceb1a0bd585603e0cd46c74c | [
"Apache-2.0"
] | 294 | 2017-10-10T19:01:04.000Z | 2022-03-18T15:52:19.000Z | tests/ext/django/test_middleware.py | musicinmybrain/aws-xray-sdk-python | b8e59423f1891351ceb1a0bd585603e0cd46c74c | [
"Apache-2.0"
] | 285 | 2017-10-20T09:27:21.000Z | 2022-03-29T15:33:45.000Z | tests/ext/django/test_middleware.py | musicinmybrain/aws-xray-sdk-python | b8e59423f1891351ceb1a0bd585603e0cd46c74c | [
"Apache-2.0"
] | 134 | 2017-10-11T13:55:17.000Z | 2022-03-23T07:21:17.000Z | import django
from aws_xray_sdk import global_sdk_config
from django.urls import reverse
from django.test import TestCase
from aws_xray_sdk.core import xray_recorder, lambda_launcher
from aws_xray_sdk.core.context import Context
from aws_xray_sdk.core.models import http, facade_segment, segment
from aws_xray_sdk.core ... | 32.637931 | 113 | 0.640606 |
f7fd33a87c0c3ee6438ec38e38c7e4e9fe992d50 | 1,061 | py | Python | tests/unit/fake_data_root/kubernetes/var/lib/juju/agents/unit-kubernetes-master-0/charm/reactive/cdk_service_kicker.py | KellenRenshaw/hotsos | e3fc51ab7f8af606a5846a3486a7fda23d761583 | [
"Apache-2.0"
] | 6 | 2021-10-01T19:46:14.000Z | 2022-03-31T17:05:08.000Z | tests/unit/fake_data_root/kubernetes/var/lib/juju/agents/unit-kubernetes-master-0/charm/reactive/cdk_service_kicker.py | KellenRenshaw/hotsos | e3fc51ab7f8af606a5846a3486a7fda23d761583 | [
"Apache-2.0"
] | 111 | 2021-10-01T18:18:17.000Z | 2022-03-29T12:23:20.000Z | tests/unit/fake_data_root/kubernetes/var/lib/juju/agents/unit-kubernetes-master-0/charm/reactive/cdk_service_kicker.py | KellenRenshaw/hotsos | e3fc51ab7f8af606a5846a3486a7fda23d761583 | [
"Apache-2.0"
] | 10 | 2021-09-29T14:47:54.000Z | 2022-03-18T14:52:16.000Z | import os
import subprocess
from charms import layer
from charms.reactive import hook, when_not, remove_state, set_state
from charmhelpers.core.templating import render
@hook('upgrade-charm')
def upgrade_charm():
remove_state('cdk-service-kicker.installed')
@when_not('cdk-service-kicker.installed')
def install_... | 32.151515 | 76 | 0.719133 |
f7fd4ad24afe06422bc497d69f3c9d9e1412ca33 | 125 | py | Python | project/server/main/modules/api/routes/user/__init__.py | ardikabs/flask-server-template | e1dfb33323cc89f6163d604007263b73ec5b6e12 | [
"MIT"
] | 1 | 2019-01-15T10:33:04.000Z | 2019-01-15T10:33:04.000Z | project/server/main/modules/api/routes/user/__init__.py | ardikabs/flask-server-template | e1dfb33323cc89f6163d604007263b73ec5b6e12 | [
"MIT"
] | null | null | null | project/server/main/modules/api/routes/user/__init__.py | ardikabs/flask-server-template | e1dfb33323cc89f6163d604007263b73ec5b6e12 | [
"MIT"
] | null | null | null |
from flask_restplus import Namespace
api = Namespace("users", description="User Related Operation")
from . import resource | 20.833333 | 62 | 0.792 |
f7fd66d33fc0c329db7daaf87373385156d84217 | 17,850 | py | Python | tensorflow/contrib/training/python/training/evaluation.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/training/python/training/evaluation.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/training/python/training/evaluation.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 38.804348 | 91 | 0.703417 |
f7fd67a235541ec57a2246174a93721eec952813 | 3,672 | py | Python | tests/test_process.py | murilocamargos/pytvname | fa797980d9cbb88d1107019c60f70ec62e68a885 | [
"MIT"
] | null | null | null | tests/test_process.py | murilocamargos/pytvname | fa797980d9cbb88d1107019c60f70ec62e68a885 | [
"MIT"
] | null | null | null | tests/test_process.py | murilocamargos/pytvname | fa797980d9cbb88d1107019c60f70ec62e68a885 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, os
test_root = os.path.dirname(os.path.abspath(__file__))
os.chdir(test_root)
sys.path.insert(0, os.path.dirname(test_root))
sys.path.insert(0, test_root)
import unittest
from pytvname import process
class NormalizeTest(unittest.TestCase):
"""Tests for n... | 36.72 | 108 | 0.651961 |
f7fd6c9517647c70d407dac0ca98e7795d15eacf | 2,768 | py | Python | sdk/python/tests/cli/test_online_retrieval.py | mrzzy/feast | 960f1ed8ba9cb76f1f82a6df54d8317cc7447a03 | [
"Apache-2.0"
] | null | null | null | sdk/python/tests/cli/test_online_retrieval.py | mrzzy/feast | 960f1ed8ba9cb76f1f82a6df54d8317cc7447a03 | [
"Apache-2.0"
] | null | null | null | sdk/python/tests/cli/test_online_retrieval.py | mrzzy/feast | 960f1ed8ba9cb76f1f82a6df54d8317cc7447a03 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime
import pytest
from feast.protos.feast.types.EntityKey_pb2 import EntityKey as EntityKeyProto
from feast.protos.feast.types.Value_pb2 import Value as ValueProto
from tests.cli.utils import CliRunner, get_example_repo
class TestOnlineRetrieval:
def test_basic(self) -> None:
r... | 35.948052 | 87 | 0.493497 |
f7fda70d6ddc238f16a588ac5b140c6453a27f89 | 3,997 | py | Python | alipay/aop/api/request/AlipayUserJobcardJobsupplierQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/request/AlipayUserJobcardJobsupplierQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/request/AlipayUserJobcardJobsupplierQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayUserJobcardJobsupplierQueryModel import AlipayUserJobcardJobsupplierQueryModel
class AlipayUserJobcardJobsupplierQueryRequest(... | 27.565517 | 148 | 0.646985 |
f7fdae23cdea726d4c696ff651a75f7454cbb106 | 1,054 | py | Python | camera.py | andreajessen/robot | e92d318d1e71994cb1c5c19e97bb27b89d23e22a | [
"MIT"
] | null | null | null | camera.py | andreajessen/robot | e92d318d1e71994cb1c5c19e97bb27b89d23e22a | [
"MIT"
] | null | null | null | camera.py | andreajessen/robot | e92d318d1e71994cb1c5c19e97bb27b89d23e22a | [
"MIT"
] | null | null | null | import os
from PIL import Image
class Camera:
def __init__(self, img_width=128, img_height=96, img_rot=0):
self.value = None
self.img_width = img_width
self.img_height = img_height
self.img_rot = img_rot
def get_value(self):
return self.value
def u... | 32.9375 | 150 | 0.594877 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.