max_stars_repo_path stringlengths 4 286 | max_stars_repo_name stringlengths 5 119 | max_stars_count int64 0 191k | id stringlengths 1 7 | content stringlengths 6 1.03M | content_cleaned stringlengths 6 1.03M | language stringclasses 111
values | language_score float64 0.03 1 | comments stringlengths 0 556k | edu_score float64 0.32 5.03 | edu_int_score int64 0 5 |
|---|---|---|---|---|---|---|---|---|---|---|
wagtail/users/models.py | originell/wagtail | 0 | 11600 | import os
import uuid
from django.conf import settings
from django.db import models
from django.utils.translation import ugettext_lazy as _
def upload_avatar_to(instance, filename):
filename, ext = os.path.splitext(filename)
return os.path.join(
'avatar_images',
'avatar_{uuid}_{filename}{ext}... | import os
import uuid
from django.conf import settings
from django.db import models
from django.utils.translation import ugettext_lazy as _
def upload_avatar_to(instance, filename):
filename, ext = os.path.splitext(filename)
return os.path.join(
'avatar_images',
'avatar_{uuid}_{filename}{ext}... | none | 1 | 2.115063 | 2 | |
python/simulator.py | chongdashu/puzzlescript-analyze | 1 | 11601 | __author__ = '<NAME>, <EMAIL>'
import uinput
def Simulator():
def __init__(self):
pass
def test1(self):
device = uinput.Device([uinput.KEY_E, uinput.KEY_H, uinput.KEY_L, uinput.KEY_O])
device.emit_click(uinput.KEY_H)
| __author__ = '<NAME>, <EMAIL>'
import uinput
def Simulator():
def __init__(self):
pass
def test1(self):
device = uinput.Device([uinput.KEY_E, uinput.KEY_H, uinput.KEY_L, uinput.KEY_O])
device.emit_click(uinput.KEY_H)
| none | 1 | 1.547653 | 2 | |
PRESUBMIT.py | oneumyvakin/catapult | 0 | 11602 | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for catapult.
See https://www.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmi... | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for catapult.
See https://www.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmi... | en | 0.824996 | # Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. Top-level presubmit script for catapult. See https://www.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmit AP... | 1.444934 | 1 |
exam_at_home/2/boolean_expression.py | jamie-jjd/110_spring_IDS | 2 | 11603 | <gh_stars>1-10
# author: jamie
# email: <EMAIL>
def Priority (c):
if c == '&': return 3
elif c == '|': return 2
elif c == '^': return 1
elif c == '(': return 0
def InfixToPostfix (infix, postfix):
stack = []
for c in infix:
if c == '(':
stack.append('(')
elif c == ... | # author: jamie
# email: <EMAIL>
def Priority (c):
if c == '&': return 3
elif c == '|': return 2
elif c == '^': return 1
elif c == '(': return 0
def InfixToPostfix (infix, postfix):
stack = []
for c in infix:
if c == '(':
stack.append('(')
elif c == ')':
... | sl | 0.236977 | # author: jamie # email: <EMAIL> | 3.858269 | 4 |
workoutlog/workout/admin.py | michaelrodgers/itc172_final | 0 | 11604 | <reponame>michaelrodgers/itc172_final
from django.contrib import admin
from .models import Target, Exercise, Workout
# Register your models here.
admin.site.register(Target)
admin.site.register(Exercise)
admin.site.register(Workout)
| from django.contrib import admin
from .models import Target, Exercise, Workout
# Register your models here.
admin.site.register(Target)
admin.site.register(Exercise)
admin.site.register(Workout) | en | 0.968259 | # Register your models here. | 1.312438 | 1 |
ciclo.py | BeltetonJosue96/Ejercicio3Python | 0 | 11605 | <reponame>BeltetonJosue96/Ejercicio3Python
class Ciclo:
def __init__(self):
self.cicloNew = ()
self.respu = ()
self.a = ()
self.b = ()
self.c = ()
def nuevoCiclo(self):
cicloNew = []
print(" ")
print("Formulario de ingreso de ciclos")
prin... | class Ciclo:
def __init__(self):
self.cicloNew = ()
self.respu = ()
self.a = ()
self.b = ()
self.c = ()
def nuevoCiclo(self):
cicloNew = []
print(" ")
print("Formulario de ingreso de ciclos")
print("-----------------------------------")
... | none | 1 | 4.177779 | 4 | |
timeglass.py | mountwebs/timeglass | 110 | 11606 | <filename>timeglass.py
import rumps
import sys
import icon_manager
from datetime import timedelta
import timekeeper
import os
# pyinstaller --onefile -w --add-data "Icons/:Icons" --icon="Icons/timeglass.png" --clean timeglass.spec
# rumps.debug_mode(True)
class TimerApp(rumps.App):
def __init__(self, initial_sec... | <filename>timeglass.py
import rumps
import sys
import icon_manager
from datetime import timedelta
import timekeeper
import os
# pyinstaller --onefile -w --add-data "Icons/:Icons" --icon="Icons/timeglass.png" --clean timeglass.spec
# rumps.debug_mode(True)
class TimerApp(rumps.App):
def __init__(self, initial_sec... | en | 0.266723 | # pyinstaller --onefile -w --add-data "Icons/:Icons" --icon="Icons/timeglass.png" --clean timeglass.spec # rumps.debug_mode(True) #1-89 osascript -e 'display notification "{}" with title "{}" sound name "{}"' osascript -e 'display notification "{}" with title "{}"' | 2.419156 | 2 |
example_bot/bot.py | JakeCover/Flare-DiscordPy | 1 | 11607 | import os
from discord.ext.commands import Bot
from Flare import Flare
bot = Bot("~~")
bot.add_cog(Flare(bot))
@bot.command("ping")
async def ping_pong(ctx):
ctx.send("pong")
bot.run(os.environ.get("BOT_TOKEN"))
| import os
from discord.ext.commands import Bot
from Flare import Flare
bot = Bot("~~")
bot.add_cog(Flare(bot))
@bot.command("ping")
async def ping_pong(ctx):
ctx.send("pong")
bot.run(os.environ.get("BOT_TOKEN"))
| none | 1 | 2.301176 | 2 | |
utils/logger.py | huangxd-/BTC-ISMIR19 | 82 | 11608 | <reponame>huangxd-/BTC-ISMIR19
import logging
import os
import sys
import time
project_name = os.getcwd().split('/')[-1]
_logger = logging.getLogger(project_name)
_logger.addHandler(logging.StreamHandler())
def _log_prefix():
# Returns (filename, line number) for the stack frame.
def _get_file_line():
... | import logging
import os
import sys
import time
project_name = os.getcwd().split('/')[-1]
_logger = logging.getLogger(project_name)
_logger.addHandler(logging.StreamHandler())
def _log_prefix():
# Returns (filename, line number) for the stack frame.
def _get_file_line():
# pylint: disable=protected... | en | 0.440068 | # Returns (filename, line number) for the stack frame. # pylint: disable=protected-access # noinspection PyProtectedMember # pylint: enable=protected-access # current time # current filename and line # month # day # hour # min # sec | 2.678963 | 3 |
setup.py | VNOpenAI/OpenControl | 5 | 11609 | import setuptools
ver = {}
with open('OpenControl/_version.py') as fd:
exec(fd.read(), ver)
version = ver.get('__version__')
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="OpenControl",
version=version,
author="VNOpenAI",
author_e... | import setuptools
ver = {}
with open('OpenControl/_version.py') as fd:
exec(fd.read(), ver)
version = ver.get('__version__')
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="OpenControl",
version=version,
author="VNOpenAI",
author_e... | none | 1 | 1.388684 | 1 | |
ismore/plants.py | DerekYJC/bmi_python | 0 | 11610 | '''See the shared Google Drive documentation for an inheritance diagram that
shows the relationships between the classes defined in this file.
'''
import numpy as np
import socket
import time
from riglib import source
from ismore import settings, udp_feedback_client
import ismore_bmi_lib
from utils.constants import *... | '''See the shared Google Drive documentation for an inheritance diagram that
shows the relationships between the classes defined in this file.
'''
import numpy as np
import socket
import time
from riglib import source
from ismore import settings, udp_feedback_client
import ismore_bmi_lib
from utils.constants import *... | en | 0.550348 | See the shared Google Drive documentation for an inheritance diagram that shows the relationships between the classes defined in this file. #import armassist #import rehand Common UDP interface for the ArmAssist/ReHand # seconds. if this number of seconds has passed since sensor data was received, velocity commands wil... | 2.526673 | 3 |
catalog/client/services/catalog.py | eoss-cloud/madxxx_catalog_api | 0 | 11611 | <gh_stars>0
#-*- coding: utf-8 -*-
""" EOSS catalog system
functionality for the catalog endpoint
"""
from utilities.web_utils import remote_file_exists
__author__ = "<NAME>, <NAME>"
__copyright__ = "Copyright 2016, EOSS GmbH"
__credits__ = ["<NAME>", "<NAME>"]
__license__ = "GPL"
__version__ = "1.0.0"
__maintainer_... | #-*- coding: utf-8 -*-
""" EOSS catalog system
functionality for the catalog endpoint
"""
from utilities.web_utils import remote_file_exists
__author__ = "<NAME>, <NAME>"
__copyright__ = "Copyright 2016, EOSS GmbH"
__credits__ = ["<NAME>", "<NAME>"]
__license__ = "GPL"
__version__ = "1.0.0"
__maintainer__ = "<NAME>"... | en | 0.305468 | #-*- coding: utf-8 -*- EOSS catalog system functionality for the catalog endpoint EOSS catalog class from web API # TODO: better grid system handling from extra table? # ExtJS POST requests has provides unicode body # TODO: tiles list as input - only first will be returned or exception thrown ! Handles GET requests ... | 2.050985 | 2 |
tests/ui/test_pvc_ui.py | MeridianExplorer/ocs-ci | 0 | 11612 | import logging
import pytest
from ocs_ci.framework.testlib import tier1, skipif_ui_not_support, ui
from ocs_ci.ocs.ui.pvc_ui import PvcUI
from ocs_ci.framework.testlib import skipif_ocs_version
from ocs_ci.framework.pytest_customization.marks import green_squad
from ocs_ci.ocs.resources.pvc import get_all_pvc_objs, ge... | import logging
import pytest
from ocs_ci.framework.testlib import tier1, skipif_ui_not_support, ui
from ocs_ci.ocs.ui.pvc_ui import PvcUI
from ocs_ci.framework.testlib import skipif_ocs_version
from ocs_ci.framework.pytest_customization.marks import green_squad
from ocs_ci.ocs.resources.pvc import get_all_pvc_objs, ge... | en | 0.878809 | Test PVC User Interface Test create, resize and delete pvc via UI # Creating a test project via CLI # Creating PVC via UI # Verifying PVC via UI # Creating Pod via CLI # Calling the Teardown Factory Method to make sure Pod is deleted # Expanding the PVC # Verifying PVC expansion # Running FIO # Checking if the Pod is d... | 1.893657 | 2 |
feature_generation/datasets/CSCW.py | s0lvang/ideal-pancake | 6 | 11613 | <reponame>s0lvang/ideal-pancake
import pandas as pd
from feature_generation.datasets.Timeseries import Timeseries
from os.path import basename
class CSCW(Timeseries):
def __init__(self):
super().__init__("cscw")
self.column_name_mapping = {
"id": self.column_names["subject_id"],
... | import pandas as pd
from feature_generation.datasets.Timeseries import Timeseries
from os.path import basename
class CSCW(Timeseries):
def __init__(self):
super().__init__("cscw")
self.column_name_mapping = {
"id": self.column_names["subject_id"],
"Fixation Start [ms]": sel... | none | 1 | 2.876141 | 3 | |
reactics-smt/rs/reaction_system_with_concentrations.py | arturmeski/reactics | 2 | 11614 | from sys import exit
from colour import *
from rs.reaction_system import ReactionSystem
class ReactionSystemWithConcentrations(ReactionSystem):
def __init__(self):
self.reactions = []
self.meta_reactions = dict()
self.permanent_entities = dict()
self.background_set = []
... | from sys import exit
from colour import *
from rs.reaction_system import ReactionSystem
class ReactionSystemWithConcentrations(ReactionSystem):
def __init__(self):
self.reactions = []
self.meta_reactions = dict()
self.permanent_entities = dict()
self.background_set = []
... | en | 0.863151 | # legacy. to be removed Sanity check for entities with concentration Returns entities of the given state without levels Chcecks concentration levels and converts entities names into their ids Adds a reaction Adds a reaction Adds a macro/meta reaction for increasing the value of incr_entity Adds a macro/meta reaction fo... | 2.533397 | 3 |
src/models/cnn_train.py | zh272/AIGOGO | 0 | 11615 | <filename>src/models/cnn_train.py
import os
import time
import fire
import torch
import random
import numpy as np
import pandas as pd
import torch.nn.functional as F
## to detach from monitor
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from trainer import Trainer
from model ... | <filename>src/models/cnn_train.py
import os
import time
import fire
import torch
import random
import numpy as np
import pandas as pd
import torch.nn.functional as F
## to detach from monitor
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from trainer import Trainer
from model ... | en | 0.479888 | ## to detach from monitor # assume std deviation of each feature is 1 # descending order # Generate submission In: file_name
Out: interim_data
Description: read data from directory /data/interim # set the path of raw data In:
DataFrame(df),
str(file_name),
Out:
None
Descri... | 2.296452 | 2 |
tests/fetchers/test_hvdcLineCktOwnersFetcher.py | rohit98077/mis_outages_ingest | 0 | 11616 | <filename>tests/fetchers/test_hvdcLineCktOwnersFetcher.py
import unittest
from src.fetchers.hvdcLineCktOwnersFetcher import getOwnersForHvdcLineCktIds
import datetime as dt
from src.appConfig import getConfig
class TestHvdcLineCktOwnersFetcher(unittest.TestCase):
appConfig: dict = {}
def setUp(self):
... | <filename>tests/fetchers/test_hvdcLineCktOwnersFetcher.py
import unittest
from src.fetchers.hvdcLineCktOwnersFetcher import getOwnersForHvdcLineCktIds
import datetime as dt
from src.appConfig import getConfig
class TestHvdcLineCktOwnersFetcher(unittest.TestCase):
appConfig: dict = {}
def setUp(self):
... | en | 0.938364 | tests the function that fetches the owners of HvdcLineCkts from reporting software | 2.851647 | 3 |
3rdParty/boost/1.71.0/libs/python/test/iterator.py | rajeev02101987/arangodb | 12,278 | 11617 | # Copyright <NAME> 2004. Distributed under the Boost
# Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
from __future__ import print_function
'''
>>> from iterator_ext import *
>>> from input_iterator import *
>>> x = list_int()
>>> x.push_back(1)
... | # Copyright <NAME> 2004. Distributed under the Boost
# Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
from __future__ import print_function
'''
>>> from iterator_ext import *
>>> from input_iterator import *
>>> x = list_int()
>>> x.push_back(1)
... | en | 0.565224 | # Copyright <NAME> 2004. Distributed under the Boost # Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) >>> from iterator_ext import * >>> from input_iterator import * >>> x = list_int() >>> x.push_back(1) >>> x.back() 1 >>> x.push_back(3) >>> x.pu... | 3.105958 | 3 |
py/locationdb/geonames.py | acorg/locationdb | 0 | 11618 | # -*- Python -*-
# license
# license.
# ======================================================================
"""Looks name up in the [geonames database](http://www.geonames.org/).
[GeoNames Search Webservice API](http://www.geonames.org/export/geonames-search.html)
"""
import sys, os, urllib.request, json, time
fro... | # -*- Python -*-
# license
# license.
# ======================================================================
"""Looks name up in the [geonames database](http://www.geonames.org/).
[GeoNames Search Webservice API](http://www.geonames.org/export/geonames-search.html)
"""
import sys, os, urllib.request, json, time
fro... | en | 0.173693 | # -*- Python -*- # license # license. # ====================================================================== Looks name up in the [geonames database](http://www.geonames.org/). [GeoNames Search Webservice API](http://www.geonames.org/export/geonames-search.html) # =====================================================... | 2.509915 | 3 |
python/testData/completion/notImportedQualifiedName/UseImportPriorityWhenAddingImport/main.py | 06needhamt/intellij-community | 0 | 11619 | <reponame>06needhamt/intellij-community
import subprocess
import sys
import django.conf
import django.utils.encoding
subprocess.Popen
sys.argv
plt.<caret> | import subprocess
import sys
import django.conf
import django.utils.encoding
subprocess.Popen
sys.argv
plt.<caret> | none | 1 | 1.263203 | 1 | |
Array/271EncodeDecodeStrings.py | john-the-dev/leetcode | 0 | 11620 | <reponame>john-the-dev/leetcode
# 271. Encode and Decode Strings
'''
Design an algorithm to encode a list of strings to a string. The encoded string is then sent over the network and is decoded back to the original list of strings.
Machine 1 (sender) has the function:
string encode(vector<string> strs) {
// ... you... | # 271. Encode and Decode Strings
'''
Design an algorithm to encode a list of strings to a string. The encoded string is then sent over the network and is decoded back to the original list of strings.
Machine 1 (sender) has the function:
string encode(vector<string> strs) {
// ... your code
return encoded_string;
... | en | 0.80593 | # 271. Encode and Decode Strings Design an algorithm to encode a list of strings to a string. The encoded string is then sent over the network and is decoded back to the original list of strings. Machine 1 (sender) has the function: string encode(vector<string> strs) { // ... your code return encoded_string; } Ma... | 3.768463 | 4 |
ois_api_client/v2_0/deserialization/deserialize_invoice_number_query.py | peterkulik/ois_api_client | 7 | 11621 | <filename>ois_api_client/v2_0/deserialization/deserialize_invoice_number_query.py
from typing import Optional
import xml.etree.ElementTree as ET
from ...xml.XmlReader import XmlReader as XR
from ..namespaces import API
from ..namespaces import DATA
from ...deserialization.create_enum import create_enum
from ..dto.Invoi... | <filename>ois_api_client/v2_0/deserialization/deserialize_invoice_number_query.py
from typing import Optional
import xml.etree.ElementTree as ET
from ...xml.XmlReader import XmlReader as XR
from ..namespaces import API
from ..namespaces import DATA
from ...deserialization.create_enum import create_enum
from ..dto.Invoi... | none | 1 | 2.313375 | 2 | |
scripts/markov_rulesets.py | takuyakanbr/covfefe | 0 | 11622 | # Script to generate the necessary grammar rules for the
# markov generator output type
# Dataset:
# http://www.drmaciver.com/2009/12/i-want-one-meelyun-sentences/
import re
ALPHA = ' abcdefghijklmnopqrstuvwxyz'
# read data from file
with open('sentences', 'r', encoding="utf8") as f:
content = f.read().splitlin... | # Script to generate the necessary grammar rules for the
# markov generator output type
# Dataset:
# http://www.drmaciver.com/2009/12/i-want-one-meelyun-sentences/
import re
ALPHA = ' abcdefghijklmnopqrstuvwxyz'
# read data from file
with open('sentences', 'r', encoding="utf8") as f:
content = f.read().splitlin... | en | 0.703661 | # Script to generate the necessary grammar rules for the # markov generator output type # Dataset: # http://www.drmaciver.com/2009/12/i-want-one-meelyun-sentences/ # read data from file # process sentences # sum up next-letter frequencies # normalize frequencies # helper functions for printing rulesets # print rulesets | 3.087578 | 3 |
tools/mo/openvino/tools/mo/front/caffe/proposal_ext.py | ryanloney/openvino-1 | 1,127 | 11623 | # Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
from openvino.tools.mo.front.common.partial_infer.utils import mo_array
from openvino.tools.mo.ops.proposal import ProposalOp
from openvino.tools.mo.front.caffe.collect_attributes import merge_attrs
from openvino.tools.mo.front.extractor... | # Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
from openvino.tools.mo.front.common.partial_infer.utils import mo_array
from openvino.tools.mo.ops.proposal import ProposalOp
from openvino.tools.mo.front.caffe.collect_attributes import merge_attrs
from openvino.tools.mo.front.extractor... | en | 0.317742 | # Copyright (C) 2018-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 # update the attributes of the node | 1.804405 | 2 |
mk42/apps/users/migrations/0003_auto_20170614_0038.py | vint21h/mk42 | 5 | 11624 | # -*- coding: utf-8 -*-
# mk42
# mk42/apps/users/migrations/0003_auto_20170614_0038.py
# Generated by Django 1.11.2 on 2017-06-14 00:38
from __future__ import unicode_literals
from django.db import (
migrations,
models,
)
class Migration(migrations.Migration):
dependencies = [
("users", "0002... | # -*- coding: utf-8 -*-
# mk42
# mk42/apps/users/migrations/0003_auto_20170614_0038.py
# Generated by Django 1.11.2 on 2017-06-14 00:38
from __future__ import unicode_literals
from django.db import (
migrations,
models,
)
class Migration(migrations.Migration):
dependencies = [
("users", "0002... | en | 0.638145 | # -*- coding: utf-8 -*- # mk42 # mk42/apps/users/migrations/0003_auto_20170614_0038.py # Generated by Django 1.11.2 on 2017-06-14 00:38 | 1.657078 | 2 |
utils/datasets.py | LukasStruppek/Plug-and-Play-Attacks | 0 | 11625 | import pickle
import pandas as pd
import torch
import torch.nn as nn
import torchvision.transforms as T
from torch.utils import data
from torch.utils.data import random_split
from torch.utils.data.dataloader import DataLoader
from torch.utils.data.dataset import Dataset
from datasets.celeba import CelebA1000
from dat... | import pickle
import pandas as pd
import torch
import torch.nn as nn
import torchvision.transforms as T
from torch.utils import data
from torch.utils.data import random_split
from torch.utils.data.dataloader import DataLoader
from torch.utils.data.dataset import Dataset
from datasets.celeba import CelebA1000
from dat... | none | 1 | 2.347807 | 2 | |
applications/MappingApplication/test_examples/Fluid_SubModelling/MainKratos.py | AndreaVoltan/MyKratos7.0 | 2 | 11626 | from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7
from KratosMultiphysics import *
from KratosMultiphysics.IncompressibleFluidApplication import *
from KratosMultiphysics.FluidDynamicsApplication import *
from KratosMultiphysics.Exter... | from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7
from KratosMultiphysics import *
from KratosMultiphysics.IncompressibleFluidApplication import *
from KratosMultiphysics.FluidDynamicsApplication import *
from KratosMultiphysics.Exter... | en | 0.549613 | #makes KratosMultiphysics backward compatible with python 2.6 and 2.7 # In this example two domains are solved, a coarse background mesh and a fine mesh around # an obstacle. The fine domain receives the values from the coarse domain as input on it's boundary ############################################################... | 1.972565 | 2 |
src/ga4gh/vrs/extras/vcf_annotation.py | reece/vmc-python | 1 | 11627 | <reponame>reece/vmc-python<gh_stars>1-10
"""
Annotate VCF files with VRS
Input Format: VCF
Output Format: VCF
The user should pass arguments for the VCF input, VCF output, &
the vrs object file name.
ex. python3 src/ga4gh/vrs/extras/vcf_annotation.py input.vcf.gz --out
./output.vcf.gz --vrs-file ./vrs_objects.pkl
""... | """
Annotate VCF files with VRS
Input Format: VCF
Output Format: VCF
The user should pass arguments for the VCF input, VCF output, &
the vrs object file name.
ex. python3 src/ga4gh/vrs/extras/vcf_annotation.py input.vcf.gz --out
./output.vcf.gz --vrs-file ./vrs_objects.pkl
"""
import argparse
import sys
import pick... | en | 0.585249 | Annotate VCF files with VRS Input Format: VCF Output Format: VCF The user should pass arguments for the VCF input, VCF output, & the vrs object file name. ex. python3 src/ga4gh/vrs/extras/vcf_annotation.py input.vcf.gz --out ./output.vcf.gz --vrs-file ./vrs_objects.pkl This class provides utility for annotating VCF'... | 2.989606 | 3 |
ci/infra/testrunner/utils/utils.py | butsoleg/skuba | 0 | 11628 | <gh_stars>0
import glob
import hashlib
import logging
import os
import shutil
import subprocess
from functools import wraps
from tempfile import gettempdir
from threading import Thread
import requests
from timeout_decorator import timeout
from utils.constants import Constant
from utils.format import Format
logger = ... | import glob
import hashlib
import logging
import os
import shutil
import subprocess
from functools import wraps
from tempfile import gettempdir
from threading import Thread
import requests
from timeout_decorator import timeout
from utils.constants import Constant
from utils.format import Format
logger = logging.getL... | en | 0.853014 | # Attempt to remove the file first, because a socket (e.g. # ssh-agent) is not a file but has to be removed like one. Remove any files or dirs in a list if they exist Remove ssh sock files # TODO: also kill ssh agent here? maybe move pkill to kill_ssh_agent()? # also remove tempdir if it's empty afterwards Collect logs... | 2.201759 | 2 |
nonebot/command/argfilter/controllers.py | EVAyo/nonebot | 676 | 11629 | """
提供几种常用的控制器。
这些验证器通常需要提供一些参数进行一次调用,返回的结果才是真正的验证器,其中的技巧在于通过闭包使要控制的对象能够被内部函数访问。
版本: 1.3.0+
"""
import re
from nonebot import CommandSession
from nonebot.helpers import render_expression
def handle_cancellation(session: CommandSession):
"""
在用户发送 `算了`、`不用了`、`取消吧`、`停` 之类的话的时候,结束当前传入的命令会话(调用 `session.finish(... | """
提供几种常用的控制器。
这些验证器通常需要提供一些参数进行一次调用,返回的结果才是真正的验证器,其中的技巧在于通过闭包使要控制的对象能够被内部函数访问。
版本: 1.3.0+
"""
import re
from nonebot import CommandSession
from nonebot.helpers import render_expression
def handle_cancellation(session: CommandSession):
"""
在用户发送 `算了`、`不用了`、`取消吧`、`停` 之类的话的时候,结束当前传入的命令会话(调用 `session.finish(... | zh | 0.987839 | 提供几种常用的控制器。 这些验证器通常需要提供一些参数进行一次调用,返回的结果才是真正的验证器,其中的技巧在于通过闭包使要控制的对象能够被内部函数访问。 版本: 1.3.0+ 在用户发送 `算了`、`不用了`、`取消吧`、`停` 之类的话的时候,结束当前传入的命令会话(调用 `session.finish()`),并发送配置项 `SESSION_CANCEL_EXPRESSION` 所填的内容。 如果不是上述取消指令,则将输入原样输出。 参数: session: 要控制的命令会话 # a keyword matches # no keyword matches | 2.732009 | 3 |
hnn_core/dipole.py | chenghuzi/hnn-core | 0 | 11630 | <filename>hnn_core/dipole.py
"""Class to handle the dipoles."""
# Authors: <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
import warnings
import numpy as np
from copy import deepcopy
from .viz import plot_dipole, plot_psd, plot_tfr_morlet
def simulate_dipole(net, tstop, dt=0.025, n_trials=None, record_vsoma=False,
... | <filename>hnn_core/dipole.py
"""Class to handle the dipoles."""
# Authors: <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
import warnings
import numpy as np
from copy import deepcopy
from .viz import plot_dipole, plot_psd, plot_tfr_morlet
def simulate_dipole(net, tstop, dt=0.025, n_trials=None, record_vsoma=False,
... | en | 0.716611 | Class to handle the dipoles. # Authors: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> Simulate a dipole given the experiment parameters. Parameters ---------- net : Network object The Network object specifying how cells are connected. tstop : float The simulation stop time (ms). ... | 2.501906 | 3 |
openstates/openstates-master/openstates/ga/bills.py | Jgorsick/Advocacy_Angular | 0 | 11631 | <reponame>Jgorsick/Advocacy_Angular
from billy.scrape.bills import BillScraper, Bill
from billy.scrape.votes import Vote
from collections import defaultdict
from .util import get_client, get_url, backoff
# Methods (7):
# GetLegislationDetail(xs:int LegislationId, )
#
# GetLegislationDetai... | from billy.scrape.bills import BillScraper, Bill
from billy.scrape.votes import Vote
from collections import defaultdict
from .util import get_client, get_url, backoff
# Methods (7):
# GetLegislationDetail(xs:int LegislationId, )
#
# GetLegislationDetailByDescription(ns2:DocumentType Docu... | en | 0.447976 | # Methods (7): # GetLegislationDetail(xs:int LegislationId, ) # # GetLegislationDetailByDescription(ns2:DocumentType DocumentType, # xs:int Number, xs:int SessionId) # # GetLegislationForSession(xs:int SessionId, ) # # GetL... | 2.412317 | 2 |
data/external/repositories_2to3/267667/kaggle-heart-master/generate_roi_pkl.py | Keesiu/meta-kaggle | 0 | 11632 | import argparse
import numpy as np
import glob
import re
from log import print_to_file
from scipy.fftpack import fftn, ifftn
from skimage.feature import peak_local_max, canny
from skimage.transform import hough_circle
import pickle as pickle
from paths import TRAIN_DATA_PATH, LOGS_PATH, PKL_TRAIN_DATA_PATH, PK... | import argparse
import numpy as np
import glob
import re
from log import print_to_file
from scipy.fftpack import fftn, ifftn
from skimage.feature import peak_local_max, canny
from skimage.transform import hough_circle
import pickle as pickle
from paths import TRAIN_DATA_PATH, LOGS_PATH, PKL_TRAIN_DATA_PATH, PK... | en | 0.553115 | # percentual coordinate as well #joni # 20 #ira Returns center and radii of ROI region in (i,j) format # radius of the smallest and largest circles in mm estimated from the train set # convert to pixel counts # find hough circles and detect two radii # For each radius, extract num_peaks circles # Keep the most prominen... | 1.920463 | 2 |
scrapers/scrapsfbos.py | ndd365/showup | 48 | 11633 | <gh_stars>10-100
import feedparser
from bs4 import BeautifulSoup
from dateutil.parser import parse
from datetime import timedelta
import pytz
from apiclient.discovery import build
from httplib2 import Http
from oauth2client import file, client, tools
from oauth2client.service_account import ServiceAccountCredentials
... | import feedparser
from bs4 import BeautifulSoup
from dateutil.parser import parse
from datetime import timedelta
import pytz
from apiclient.discovery import build
from httplib2 import Http
from oauth2client import file, client, tools
from oauth2client.service_account import ServiceAccountCredentials
scopes = 'https:... | en | 0.450622 | # PDT/MST/GMT-7 # {'email': '<EMAIL>'}, # {'email': '<EMAIL>'}, | 2.938402 | 3 |
app/api/v2/models/product.py | danuluma/dannstore | 0 | 11634 | <reponame>danuluma/dannstore<gh_stars>0
import os
import sys
LOCALPATH = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, LOCALPATH + '/../../../../')
from app.api.v2.db import Db
def format_book(book):
"""Formats the results to a dictionary"""
book = {
"id": book[0],
"title": ... | import os
import sys
LOCALPATH = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, LOCALPATH + '/../../../../')
from app.api.v2.db import Db
def format_book(book):
"""Formats the results to a dictionary"""
book = {
"id": book[0],
"title": book[1],
"description": book[2],... | en | 0.719604 | Formats the results to a dictionary Product Model. Books stuff here Gets all books from the db Gets a single book Adds a new book to the db INSERT INTO books (title, description, category, price, quantity, minimum, image_url, created_by) VALUES ('{book[0]}', '{book[1]}', '{book[2]}', {book[3]}, {book[4]}, {book[5... | 3.237945 | 3 |
pbq/pbq.py | amirdor/pbq | 0 | 11635 | # -*- coding: utf-8 -*-
"""Main module."""
import os
from google.cloud import bigquery
from pbq.query import Query
from google.cloud import bigquery_storage_v1beta1
from google.cloud.exceptions import NotFound
from google.api_core.exceptions import BadRequest
import pandas as pd
import datetime
class PBQ(object):
... | # -*- coding: utf-8 -*-
"""Main module."""
import os
from google.cloud import bigquery
from pbq.query import Query
from google.cloud import bigquery_storage_v1beta1
from google.cloud.exceptions import NotFound
from google.api_core.exceptions import BadRequest
import pandas as pd
import datetime
class PBQ(object):
... | en | 0.591922 | # -*- coding: utf-8 -*- Main module. bigquery driver using the google official API Attributes ------ query : str the query query_obj : Query pbq.Query object client : Client the client object for bigquery bqstorage_client : BigQueryStorageClient the google storag... | 3.314156 | 3 |
appvalidator/specprocessor.py | mstriemer/app-validator | 20 | 11636 | import re
import types
from functools import partial
LITERAL_TYPE = types.StringTypes + (int, float, long, bool, )
class Spec(object):
"""
This object, when overridden with an object that implements a file format
specification, will perform validation on a given parsed version of the
format input.
... | import re
import types
from functools import partial
LITERAL_TYPE = types.StringTypes + (int, float, long, bool, )
class Spec(object):
"""
This object, when overridden with an object that implements a file format
specification, will perform validation on a given parsed version of the
format input.
... | en | 0.805164 | This object, when overridden with an object that implements a file format specification, will perform validation on a given parsed version of the format input. SPEC Node Documentation: ======================== expected_type: A type object whose type the object should match. required_no... | 3.260508 | 3 |
head_first_v2/ch4/modules/setup.py | alex-d-bondarev/learn-python | 0 | 11637 | from setuptools import setup
setup(
name='lsearch',
version='1.0',
description='The Head First Python Search Tools', author='<NAME>', author_email='<EMAIL>',
url='headfirstlabs.com',
py_modules=['lsearch'],
)
| from setuptools import setup
setup(
name='lsearch',
version='1.0',
description='The Head First Python Search Tools', author='<NAME>', author_email='<EMAIL>',
url='headfirstlabs.com',
py_modules=['lsearch'],
)
| none | 1 | 1.050518 | 1 | |
desktop_local_tests/windows/test_windows_public_ip_disrupt_reorder_adapters.py | UAEKondaya1/expressvpn_leak_testing | 219 | 11638 | <filename>desktop_local_tests/windows/test_windows_public_ip_disrupt_reorder_adapters.py
from desktop_local_tests.public_ip_during_disruption import PublicIPDuringDisruptionTestCase
from desktop_local_tests.windows.windows_reorder_adapters_disrupter import WindowsReorderAdaptersDisrupter
class TestWindowsPublicIPDisru... | <filename>desktop_local_tests/windows/test_windows_public_ip_disrupt_reorder_adapters.py
from desktop_local_tests.public_ip_during_disruption import PublicIPDuringDisruptionTestCase
from desktop_local_tests.windows.windows_reorder_adapters_disrupter import WindowsReorderAdaptersDisrupter
class TestWindowsPublicIPDisru... | en | 0.928589 | Summary: Tests whether traffic leaving the user's device has the public IP hidden when the adapter order is changed. Details: This test will connect to VPN then swap the priority of the primary and secondary network adapters. The test then queries a webpage to detect it's public IP. Discussi... | 2.50098 | 3 |
rotkehlchen/api/server.py | rotkehlchenio/rotkehlchen | 137 | 11639 | import json
import logging
from http import HTTPStatus
from typing import Any, Dict, List, Optional, Tuple, Type, Union
import werkzeug
from flask import Blueprint, Flask, Response, abort, jsonify
from flask.views import MethodView
from flask_cors import CORS
from gevent.pywsgi import WSGIServer
from geventwebsocket i... | import json
import logging
from http import HTTPStatus
from typing import Any, Dict, List, Optional, Tuple, Type, Union
import werkzeug
from flask import Blueprint, Flask, Response, abort, jsonify
from flask.views import MethodView
from flask_cors import CORS
from gevent.pywsgi import WSGIServer
from geventwebsocket i... | en | 0.821956 | # type: ignore # type: ignore # The isinstance check is because I am not sure if `e` is always going to # be a "NotFound" error here # type: ignore # pylint: disable=unused-argument # pylint: disable=unused-argument This handles request parsing errors generated for example by schema field validation failing. # firs... | 1.387359 | 1 |
stability/stairs_contacts.py | haudren/stability-polygon | 0 | 11640 | import numpy as np
pos = []
normals = []
p = [[-0.4722227, -0.24517583, -0.6370031]]
n = [[2.02215104e-04, -3.23903880e-05, 9.99999979e-01]]
pos.append(p)
normals.append(n)
p = [[-0.2549828, -0.24587737, -0.63704705]]
n = [[2.02215104e-04, -3.23903880e-05, 9.99999979e-01]]
pos.append(p)
normals.append(n)
p = [[-0.2... | import numpy as np
pos = []
normals = []
p = [[-0.4722227, -0.24517583, -0.6370031]]
n = [[2.02215104e-04, -3.23903880e-05, 9.99999979e-01]]
pos.append(p)
normals.append(n)
p = [[-0.2549828, -0.24587737, -0.63704705]]
n = [[2.02215104e-04, -3.23903880e-05, 9.99999979e-01]]
pos.append(p)
normals.append(n)
p = [[-0.2... | en | 0.316953 | #Contact lgripper/handrail #Left #Right #p = [[0.36510907, 0.29419711, 0.63607441]] #p = [[0.3651077, 0.33419711, 0.63609439]] #n = [[3.44761855e-05, -9.99999874e-01, -5.00077386e-04]] #pos.append(p) #normals.append(n) #Bottom #p = [[0.34212609, 0.31418314, 0.66248165]] #n = [[-6.56636734e-01, -3.99160434e-04, 7.542068... | 1.897732 | 2 |
generator/framework/analyser/analyser.py | sinsay/ds_generator | 0 | 11641 | <reponame>sinsay/ds_generator
import inspect
import re
import types
from collections import namedtuple
from typing import List, Union, Dict
from flask_restplus import fields
from ...common import MetaData, Entry, Arg, ArgSource, RpcType,\
type_def, rpc_doc_args_key, rpc_doc_resp_key, rpc_impl_rename
from ...commo... | import inspect
import re
import types
from collections import namedtuple
from typing import List, Union, Dict
from flask_restplus import fields
from ...common import MetaData, Entry, Arg, ArgSource, RpcType,\
type_def, rpc_doc_args_key, rpc_doc_resp_key, rpc_impl_rename
from ...common.web.namespace import get_nam... | zh | 0.900615 | 解析器,解析指定的类型所绑定的 document 信息 解析 service_classes 的信息,并返回其元数据,如果该类型未添加元数据,则不将其加入元数据列表 service_impl_classes 则为对应 service 的实现器, 两者应该是一一对应的关系 need_impl 指示了是否需要为 service_class 获取其具体实现 :param service_classes: :param service_impl_classes :param need_impl: :return: # 查看是否有自定义名称 # 找... | 2.079508 | 2 |
bot/helper/mirror_utils/download_utils/telegram_downloader.py | vincreator/Eunha | 0 | 11642 | <filename>bot/helper/mirror_utils/download_utils/telegram_downloader.py
import logging
import random
from time import time
from threading import RLock, Lock, Thread
from bot import LOGGER, download_dict, download_dict_lock, app, STOP_DUPLICATE, STORAGE_THRESHOLD
from bot.helper.ext_utils.bot_utils import get_readable... | <filename>bot/helper/mirror_utils/download_utils/telegram_downloader.py
import logging
import random
from time import time
from threading import RLock, Lock, Thread
from bot import LOGGER, download_dict, download_dict_lock, app, STOP_DUPLICATE, STORAGE_THRESHOLD
from bot.helper.ext_utils.bot_utils import get_readable... | en | 0.680715 | # For avoiding locking the thread lock for long time unnecessarily | 2.163052 | 2 |
setup.py | goofmint/qualityforward-py | 0 | 11643 | import setuptools
setuptools.setup(
name="qualityforward",
version="1.1",
author="<NAME>",
author_email="<EMAIL>",
description="Python library for QualityForward API",
long_description="This is python library for QualityForward API. QualityForward is cloud based test management service.",
... | import setuptools
setuptools.setup(
name="qualityforward",
version="1.1",
author="<NAME>",
author_email="<EMAIL>",
description="Python library for QualityForward API",
long_description="This is python library for QualityForward API. QualityForward is cloud based test management service.",
... | none | 1 | 1.118634 | 1 | |
backend/trips/models.py | repeating/PoputchikiInno | 20 | 11644 | from django.db import models
from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin, AbstractUser
from django.utils import timezone
from django.utils.translation import gettext as _
from django import forms
from django.contrib.auth.hashers import make_password
from django.contrib.auth import get_user... | from django.db import models
from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin, AbstractUser
from django.utils import timezone
from django.utils.translation import gettext as _
from django import forms
from django.contrib.auth.hashers import make_password
from django.contrib.auth import get_user... | none | 1 | 2.213578 | 2 | |
jcs/jcs_main.py | orenmel/lexsub | 26 | 11645 | <reponame>orenmel/lexsub
'''
Run lexical substitution experiments
'''
import sys
import time
import argparse
import re
import numpy
from jcs.jcs_io import extract_word_weight
from jcs.data.context_instance import ContextInstance
from jcs.jcs_io import vec_to_str
from jcs.jcs_io import vec_to_str_gene... | '''
Run lexical substitution experiments
'''
import sys
import time
import argparse
import re
import numpy
from jcs.jcs_io import extract_word_weight
from jcs.data.context_instance import ContextInstance
from jcs.jcs_io import vec_to_str
from jcs.jcs_io import vec_to_str_generated
from jcs.cs_embedd... | en | 0.542862 | Run lexical substitution experiments # finally.r::eventually;ultimately # print "end %f" % time.time() # Only for Context2vecInferrer # Only for CsEmbeddingInferrer # Common | 2.464803 | 2 |
src/django_richenum/__init__.py | adepue/django-richenum | 0 | 11646 | <filename>src/django_richenum/__init__.py
__version__ = 'unknown'
try:
__version__ = __import__('pkg_resources').get_distribution('django_richenum').version
except Exception as e:
pass
| <filename>src/django_richenum/__init__.py
__version__ = 'unknown'
try:
__version__ = __import__('pkg_resources').get_distribution('django_richenum').version
except Exception as e:
pass
| none | 1 | 1.51471 | 2 | |
scripts/v.py | NatashaChopper/stage | 0 | 11647 | import numpy
with open ("dic.txt", "w", encoding="utf-8") as dic:
for x in range(5, 790, 1):
if 92 < x <= 113:
dic.write('"'+str(x)+'"'+":"+ '"'+'1'+'",')
elif 113 < x <= 133:
dic.write('"'+str(x)+'"'+":"+ '"'+'2'+'",')
elif 133 < x <= 153:
dic.w... | import numpy
with open ("dic.txt", "w", encoding="utf-8") as dic:
for x in range(5, 790, 1):
if 92 < x <= 113:
dic.write('"'+str(x)+'"'+":"+ '"'+'1'+'",')
elif 113 < x <= 133:
dic.write('"'+str(x)+'"'+":"+ '"'+'2'+'",')
elif 133 < x <= 153:
dic.w... | none | 1 | 2.708623 | 3 | |
scrim/globals.py | danbradham/scrim | 4 | 11648 | # -*- coding: utf-8 -*-
'''
=============
scrim.globals
=============
Defines variables passed into the python script via Environment Variables by
scrim scripts. If SCRIM_SHELL is None, then the python script was not executed
by a scrim script.
SHELLS (list): list of available shells
SCRIM_SHELL (str): Parent ... | # -*- coding: utf-8 -*-
'''
=============
scrim.globals
=============
Defines variables passed into the python script via Environment Variables by
scrim scripts. If SCRIM_SHELL is None, then the python script was not executed
by a scrim script.
SHELLS (list): list of available shells
SCRIM_SHELL (str): Parent ... | en | 0.754035 | # -*- coding: utf-8 -*- ============= scrim.globals ============= Defines variables passed into the python script via Environment Variables by scrim scripts. If SCRIM_SHELL is None, then the python script was not executed by a scrim script. SHELLS (list): list of available shells SCRIM_SHELL (str): Parent shel... | 2.436183 | 2 |
examples/Api/channels.py | asheshambasta/csound-expression | 0 | 11649 | import csnd6
class Control:
def __init__(self, volume, frequency):
engine = csnd6.Csound()
engine.SetOption("-odac")
engine.Compile("osc.csd")
thread = csnd6.CsoundPerformanceThread(engine)
thread.Play()
self.engine = engine
self.thread = th... | import csnd6
class Control:
def __init__(self, volume, frequency):
engine = csnd6.Csound()
engine.SetOption("-odac")
engine.Compile("osc.csd")
thread = csnd6.CsoundPerformanceThread(engine)
thread.Play()
self.engine = engine
self.thread = th... | none | 1 | 2.600893 | 3 | |
virtual/lib/python3.6/site-packages/isbnlib/_goob.py | david12-wq/PITCHE_APP | 0 | 11650 | <gh_stars>0
# -*- coding: utf-8 -*-
"""Query the Google Books (JSON API v1) service for metadata."""
import logging
from .dev import stdmeta
from .dev._bouth23 import u
from .dev._exceptions import ISBNNotConsistentError, RecordMappingError
from .dev.webquery import query as wquery
UA = 'isbnlib (gzip)'
SERVICE_URL ... | # -*- coding: utf-8 -*-
"""Query the Google Books (JSON API v1) service for metadata."""
import logging
from .dev import stdmeta
from .dev._bouth23 import u
from .dev._exceptions import ISBNNotConsistentError, RecordMappingError
from .dev.webquery import query as wquery
UA = 'isbnlib (gzip)'
SERVICE_URL = (
'htt... | en | 0.663149 | # -*- coding: utf-8 -*- Query the Google Books (JSON API v1) service for metadata. # pylint: disable=broad-except Mapp: canonical <- records. # canonical: ISBN-13, Title, Authors, Publisher, Year, Language # see issue #64 # pragma: no cover # pragma: no cover # call stdmeta for extra cleanning and validation Classify (... | 2.552011 | 3 |
gdxpds/test/conftest.py | cdgaete/gdx-pandas | 42 | 11651 | # [LICENSE]
# Copyright (c) 2020, Alliance for Sustainable Energy.
# All rights reserved.
#
# Redistribution and use in source and binary forms,
# with or without modification, are permitted provided
# that the following conditions are met:
#
# 1. Redistributions of source code must retain the above
# copyright no... | # [LICENSE]
# Copyright (c) 2020, Alliance for Sustainable Energy.
# All rights reserved.
#
# Redistribution and use in source and binary forms,
# with or without modification, are permitted provided
# that the following conditions are met:
#
# 1. Redistributions of source code must retain the above
# copyright no... | en | 0.722398 | # [LICENSE] # Copyright (c) 2020, Alliance for Sustainable Energy. # All rights reserved. # # Redistribution and use in source and binary forms, # with or without modification, are permitted provided # that the following conditions are met: # # 1. Redistributions of source code must retain the above # copyright notice,... | 1.498169 | 1 |
jinahub/indexers/storage/PostgreSQLStorage/tests/test_postgres_dbms.py | Taekyoon/executors | 29 | 11652 | <filename>jinahub/indexers/storage/PostgreSQLStorage/tests/test_postgres_dbms.py
import os
import time
from pathlib import Path
import numpy as np
import pytest
from jina import Document, DocumentArray, Executor, Flow
from jina.logging.profile import TimeContext
from jina_commons.indexers.dump import import_metas, imp... | <filename>jinahub/indexers/storage/PostgreSQLStorage/tests/test_postgres_dbms.py
import os
import time
from pathlib import Path
import numpy as np
import pytest
from jina import Document, DocumentArray, Executor, Flow
from jina.logging.profile import TimeContext
from jina_commons.indexers.dump import import_metas, imp... | en | 0.778078 | ## indexing {len(original_docs)} docs'): # assert dump contents # make sure to cleanup if the PSQL instance is kept running # indexing the documents # create a snapshot # data added the snapshot will not be part of the export # create another snapshot # docs for the delta resolving # we use total_shards=1 in order to g... | 1.842087 | 2 |
targhe/models.py | luca772005/studio | 0 | 11653 | from django.db import models
# Create your models here.
class Tipo(models.Model):
descrizione = models.CharField(blank=False, null=False, max_length=128)
def __unicode__(self):
return "{}".format(self.descrizione)
class Meta:
verbose_name_plural = 'Tipi'
class Marca(models.Model):
... | from django.db import models
# Create your models here.
class Tipo(models.Model):
descrizione = models.CharField(blank=False, null=False, max_length=128)
def __unicode__(self):
return "{}".format(self.descrizione)
class Meta:
verbose_name_plural = 'Tipi'
class Marca(models.Model):
... | en | 0.963489 | # Create your models here. | 2.228925 | 2 |
WhatSender/__init__.py | Shauryasamant/whatsender | 1 | 11654 | <filename>WhatSender/__init__.py
from WhatSender.sender import SendMessage
| <filename>WhatSender/__init__.py
from WhatSender.sender import SendMessage
| none | 1 | 1.215994 | 1 | |
scenarios/sync_sheets_and_groups.py | Ragnaruk/api_integration | 0 | 11655 | import pickle
from time import sleep
import googleapiclient.errors
from transliterate import translit
from logs.logging import get_logger
from api_google.google_api_sheets import get_sheets_service, get_multiple_ranges
from api_google.google_api_directory import get_directory_service, get_users_for_domain, \
get_... | import pickle
from time import sleep
import googleapiclient.errors
from transliterate import translit
from logs.logging import get_logger
from api_google.google_api_sheets import get_sheets_service, get_multiple_ranges
from api_google.google_api_directory import get_directory_service, get_users_for_domain, \
get_... | en | 0.555053 | # number_of_registered_users = 0 # synced_users_dictionary_creation = False # # # Getting a list of users who have already been synced # if synced_users_path.exists(): # logger.debug('Reading synced users from: %s', synced_users_path) # with open(synced_users_path, 'rb') as f: # synced_users = pickle.lo... | 2.468788 | 2 |
src/GridCal/Gui/TowerBuilder/gui.py | SanPen/GridCal | 284 | 11656 | # -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'gui.ui'
##
## Created by: Qt User Interface Compiler version 5.15.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
######################... | # -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'gui.ui'
##
## Created by: Qt User Interface Compiler version 5.15.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
######################... | de | 0.241593 | # -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file 'gui.ui' ## ## Created by: Qt User Interface Compiler version 5.15.2 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! #######################... | 1.972584 | 2 |
PythonAPI/util/check_lidar_bb.py | inverted-ai/carla | 0 | 11657 | #!/usr/bin/env python
# Copyright (c) 2020 Computer Vision Center (CVC) at the Universitat Autonoma de
# Barcelona (UAB).
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Lidar/BB check for CARLA
This script obtains the LiDAR's point cloud cor... | #!/usr/bin/env python
# Copyright (c) 2020 Computer Vision Center (CVC) at the Universitat Autonoma de
# Barcelona (UAB).
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Lidar/BB check for CARLA
This script obtains the LiDAR's point cloud cor... | en | 0.867064 | #!/usr/bin/env python # Copyright (c) 2020 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. Lidar/BB check for CARLA This script obtains the LiDAR's point cloud correspond... | 2.634641 | 3 |
claim.py | bukovyn/claim | 0 | 11658 | <gh_stars>0
#!/usr/bin/env python3
""" Text files created on DOS/Windows machines have different line endings than
files created on Unix/Linux. DOS uses carriage return and new line ("\r\n")
as a line ending, while Unix uses just new line ("\n"). The purpose of this
script is to have a quick, on the go, sh... | #!/usr/bin/env python3
""" Text files created on DOS/Windows machines have different line endings than
files created on Unix/Linux. DOS uses carriage return and new line ("\r\n")
as a line ending, while Unix uses just new line ("\n"). The purpose of this
script is to have a quick, on the go, shell friendly... | en | 0.79117 | #!/usr/bin/env python3 Text files created on DOS/Windows machines have different line endings than files created on Unix/Linux. DOS uses carriage return and new line ("\r\n") as a line ending, while Unix uses just new line ("\n"). The purpose of this script is to have a quick, on the go, shell friendly solu... | 3.64887 | 4 |
reference/Python/media/moviepy/audio/extract_audio.py | steadylearner/code | 4 | 11659 | import sys
from moviepy.editor import *
clip = VideoFileClip(sys.argv[1])
audioclip = clip.audio
audioclip.write_audiofile(sys.argv[2])
| import sys
from moviepy.editor import *
clip = VideoFileClip(sys.argv[1])
audioclip = clip.audio
audioclip.write_audiofile(sys.argv[2])
| none | 1 | 2.375882 | 2 | |
objettoqt/mixins.py | brunonicko/objettoqt | 0 | 11660 | # -*- coding: utf-8 -*-
"""Mix-in classes for `Qt` types."""
from ._mixins import (
OQAbstractItemModelMixin,
OQAbstractItemViewMixin,
OQObjectMixin,
OQWidgetMixin,
)
from ._views import OQListViewMixin
__all__ = [
"OQObjectMixin",
"OQWidgetMixin",
"OQAbstractItemModelMixin",
"OQAbstra... | # -*- coding: utf-8 -*-
"""Mix-in classes for `Qt` types."""
from ._mixins import (
OQAbstractItemModelMixin,
OQAbstractItemViewMixin,
OQObjectMixin,
OQWidgetMixin,
)
from ._views import OQListViewMixin
__all__ = [
"OQObjectMixin",
"OQWidgetMixin",
"OQAbstractItemModelMixin",
"OQAbstra... | en | 0.773066 | # -*- coding: utf-8 -*- Mix-in classes for `Qt` types. | 1.152725 | 1 |
util/mccLog.py | ccchooko/webControlClient | 0 | 11661 | <gh_stars>0
#-*-coding:utf8-*-
import logging
from datetime import datetime
class mccLog(object):
def __init__(self):
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(levelname)s %(message)s',
datefmt='%Y-%m-%d %H:%M:%S',
filename= datetime.now(... | #-*-coding:utf8-*-
import logging
from datetime import datetime
class mccLog(object):
def __init__(self):
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(levelname)s %(message)s',
datefmt='%Y-%m-%d %H:%M:%S',
filename= datetime.now().strftime("... | en | 0.171973 | #-*-coding:utf8-*- | 2.846723 | 3 |
Learning-Python/Jumble-Solver/jumble_solver.py | oliverkeen/Sandbox | 0 | 11662 | # <NAME>
# Software Engineering 001
# jumble_solver.py
# 2/17/2021
# Assignment:
# Consider the game "Jumble"
# https://www.sandiegouniontribune.com/sd-jumble-daily-htmlstory.html
# Create a Python program to find the individual words in Jumble puzzles such
# that INJURE prints after entering the following: solve("JNU... | # <NAME>
# Software Engineering 001
# jumble_solver.py
# 2/17/2021
# Assignment:
# Consider the game "Jumble"
# https://www.sandiegouniontribune.com/sd-jumble-daily-htmlstory.html
# Create a Python program to find the individual words in Jumble puzzles such
# that INJURE prints after entering the following: solve("JNU... | en | 0.72866 | # <NAME> # Software Engineering 001 # jumble_solver.py # 2/17/2021 # Assignment: # Consider the game "Jumble" # https://www.sandiegouniontribune.com/sd-jumble-daily-htmlstory.html # Create a Python program to find the individual words in Jumble puzzles such # that INJURE prints after entering the following: solve("JNUI... | 4.165899 | 4 |
msm/skill_entry.py | luca-vercelli/mycroft-skills-manager | 0 | 11663 | # Copyright (c) 2018 <NAME>, Inc.
#
# This file is part of Mycroft Skills Manager
# (see https://github.com/MycroftAI/mycroft-skills-manager).
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional informa... | # Copyright (c) 2018 <NAME>, Inc.
#
# This file is part of Mycroft Skills Manager
# (see https://github.com/MycroftAI/mycroft-skills-manager).
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional informa... | en | 0.834537 | # Copyright (c) 2018 <NAME>, Inc. # # This file is part of Mycroft Skills Manager # (see https://github.com/MycroftAI/mycroft-skills-manager). # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional informa... | 1.483514 | 1 |
sleekxmpp/plugins/xep_0027/stanza.py | elrond79/SleekXMPP | 3 | 11664 | <gh_stars>1-10
"""
SleekXMPP: The Sleek XMPP Library
Copyright (C) 2012 <NAME>, <NAME>
This file is part of SleekXMPP.
See the file LICENSE for copying permission.
"""
from sleekxmpp.xmlstream import ElementBase
class Signed(ElementBase):
name = 'x'
namespace = 'jabber:x:signed'
plugin_a... | """
SleekXMPP: The Sleek XMPP Library
Copyright (C) 2012 <NAME>, <NAME>
This file is part of SleekXMPP.
See the file LICENSE for copying permission.
"""
from sleekxmpp.xmlstream import ElementBase
class Signed(ElementBase):
name = 'x'
namespace = 'jabber:x:signed'
plugin_attrib = 'signed... | en | 0.803132 | SleekXMPP: The Sleek XMPP Library Copyright (C) 2012 <NAME>, <NAME> This file is part of SleekXMPP. See the file LICENSE for copying permission. | 2.224541 | 2 |
tcptofpc.py | catenacyber/fuzzpcap | 6 | 11665 | #tshark -r input.pcap -qz "follow,tcp,raw,0"
import struct
import sys
import binascii
import subprocess
result = subprocess.Popen( ["tshark", "-r", sys.argv[1], "-qz", "follow,tcp,raw,0"],
stdout=subprocess.PIPE)
sys.stdout.buffer.write(b"FPC\x80")
for i in range(4):
result.stdout.rea... | #tshark -r input.pcap -qz "follow,tcp,raw,0"
import struct
import sys
import binascii
import subprocess
result = subprocess.Popen( ["tshark", "-r", sys.argv[1], "-qz", "follow,tcp,raw,0"],
stdout=subprocess.PIPE)
sys.stdout.buffer.write(b"FPC\x80")
for i in range(4):
result.stdout.rea... | en | 0.312445 | #tshark -r input.pcap -qz "follow,tcp,raw,0" | 2.249253 | 2 |
AIJ Filter Collection/AIJ_Night_Filters.py | kjkoeller/BSU-Code | 1 | 11666 | """
Created: November 11, 2020
Author: <NAME>
Python Version 3.9
This program is meant to make the process of collecting the different filters from AIJ excel spreadsheets faster.
The user enters however many nights they have and the program goes through and checks those text files for the
different columns for,HJD, Am... | """
Created: November 11, 2020
Author: <NAME>
Python Version 3.9
This program is meant to make the process of collecting the different filters from AIJ excel spreadsheets faster.
The user enters however many nights they have and the program goes through and checks those text files for the
different columns for,HJD, Am... | en | 0.85506 | Created: November 11, 2020 Author: <NAME> Python Version 3.9 This program is meant to make the process of collecting the different filters from AIJ excel spreadsheets faster. The user enters however many nights they have and the program goes through and checks those text files for the different columns for,HJD, Amag, ... | 4.004324 | 4 |
backend/songwriter/migrations/0006_auto_20170902_0723.py | giliam/turbo-songwriter | 0 | 11667 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-09-02 05:23
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('songwriter', '0005_auto_20170824_1726'),
]
operations = [
migrations.AlterModelOpti... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-09-02 05:23
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('songwriter', '0005_auto_20170824_1726'),
]
operations = [
migrations.AlterModelOpti... | en | 0.801751 | # -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-09-02 05:23 | 1.528016 | 2 |
util/textbox_utils.py | yannl35133/sslib | 0 | 11668 | CHARACTERS_PER_LINE = 39
def break_lines(text):
chars_in_line = 1
final_text = ''
skip = False
for char in text:
if chars_in_line >= CHARACTERS_PER_LINE:
if char == ' ':
# we happen to be on a space, se we can just break here
final_text += '\n'
... | CHARACTERS_PER_LINE = 39
def break_lines(text):
chars_in_line = 1
final_text = ''
skip = False
for char in text:
if chars_in_line >= CHARACTERS_PER_LINE:
if char == ' ':
# we happen to be on a space, se we can just break here
final_text += '\n'
... | en | 0.86236 | # we happen to be on a space, se we can just break here # work backwards to find the space to break on | 3.757979 | 4 |
tools/isolate/data/isolate/with_flag.py | Scopetta197/chromium | 212 | 11669 | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import sys
def main():
print 'with_flag: Verify the test data files were mapped properly'
assert len(sys.argv) == 2... | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import sys
def main():
print 'with_flag: Verify the test data files were mapped properly'
assert len(sys.argv) == 2... | en | 0.872306 | #!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Ignore .svn directory which happens to be there with --mode=trace # from a svn checkout. The file shouldn't be there when --mode=r... | 2.15927 | 2 |
tensorflow/load_mnist.py | stone-zeng/ising | 1 | 11670 | """Loading MNIST dataset.
"""
import struct
import numpy as np
class MNIST:
"""
Loading MNIST dataset.
In the directory of MNIST dataset, there should be the following files:
- Training set:
- train-images-idx3-ubyte
- train-labels-idx1-ubyte
- Test set:
... | """Loading MNIST dataset.
"""
import struct
import numpy as np
class MNIST:
"""
Loading MNIST dataset.
In the directory of MNIST dataset, there should be the following files:
- Training set:
- train-images-idx3-ubyte
- train-labels-idx1-ubyte
- Test set:
... | en | 0.570364 | Loading MNIST dataset. Loading MNIST dataset. In the directory of MNIST dataset, there should be the following files: - Training set: - train-images-idx3-ubyte - train-labels-idx1-ubyte - Test set: - t10k-images-idx3-ubyte - t10k-labels-idx1-ubyte Fu... | 3.803923 | 4 |
sarnet_td3/common/gpu_multithread.py | JingdiC/SARNet | 16 | 11671 | import threading, queue, time, os, pickle
# from queue import Queue
import numpy as np
import tensorflow as tf
import sarnet_td3.common.tf_util as U
from tensorflow.python.keras.backend import set_session
lock = threading.Lock()
class MultiTrainTD3(threading.Thread):
def __init__(self, input_queue, output_queue, ... | import threading, queue, time, os, pickle
# from queue import Queue
import numpy as np
import tensorflow as tf
import sarnet_td3.common.tf_util as U
from tensorflow.python.keras.backend import set_session
lock = threading.Lock()
class MultiTrainTD3(threading.Thread):
def __init__(self, input_queue, output_queue, ... | en | 0.719298 | # from queue import Queue # self.agent_info = [[[[]]] for _ in range(self.num_env)] # Shape: (batch, #) sum of rewards for training curve # agent rewards for training curve # print(threading.currentThread().getName(), self.receive_messages) # Freeze graph to avoid memory leaks # self.sess.graph.finalize() # If you send... | 1.996435 | 2 |
Scripts/Miscellaneous/Fake_news_web/app.py | valterm/Python_and_the_Web | 1 | 11672 | from flask import Flask, request, render_template
from sklearn.externals import joblib
from feature import *
pipeline = joblib.load('pipeline.sav')
app = Flask(__name__)
@app.route('/')
def home():
return render_template('index.html')
@app.route('/api',methods=['POST'])
def get_delay():
result=request.fo... | from flask import Flask, request, render_template
from sklearn.externals import joblib
from feature import *
pipeline = joblib.load('pipeline.sav')
app = Flask(__name__)
@app.route('/')
def home():
return render_template('index.html')
@app.route('/api',methods=['POST'])
def get_delay():
result=request.fo... | en | 0.095568 | ##user_input = {'query':query} | 2.544661 | 3 |
1019.next-greater-node-in-linked-list.py | elfgzp/leetCode | 3 | 11673 | # Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution:
def nextLargerNodes(self, head: ListNode) -> List[int]:
nums = []
while head:
nums.append(head.val)
head = head.next
... | # Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution:
def nextLargerNodes(self, head: ListNode) -> List[int]:
nums = []
while head:
nums.append(head.val)
head = head.next
... | en | 0.60389 | # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None | 3.712429 | 4 |
WXApi/WXApi/__init__.py | KEDYY/pyweipi | 1 | 11674 | <gh_stars>1-10
# -*- coding: utf-8 -*-
"""
Create: 2014/5/20
Update: 2017/11/22
"""
from .WXError import *
from .WXMenu import *
from .WXUtils import *
from .event import *
from .request import MPCenter
__date__ = '2017/3/12'
__version__ = '1.0.1'
__license__ = 'The MIT License'
| # -*- coding: utf-8 -*-
"""
Create: 2014/5/20
Update: 2017/11/22
"""
from .WXError import *
from .WXMenu import *
from .WXUtils import *
from .event import *
from .request import MPCenter
__date__ = '2017/3/12'
__version__ = '1.0.1'
__license__ = 'The MIT License' | en | 0.662421 | # -*- coding: utf-8 -*- Create: 2014/5/20 Update: 2017/11/22 | 1.145041 | 1 |
evaluator_package/Parsing_tools.py | MONICA-Project/GOST-tools | 0 | 11675 | def is_field(token):
"""Checks if the token is a valid ogc type field
"""
return token in ["name", "description", "encodingType", "location", "properties", "metadata",
"definition", "phenomenonTime", "resultTime", "observedArea", "result", "id", "@iot.id",
"resultQ... | def is_field(token):
"""Checks if the token is a valid ogc type field
"""
return token in ["name", "description", "encodingType", "location", "properties", "metadata",
"definition", "phenomenonTime", "resultTime", "observedArea", "result", "id", "@iot.id",
"resultQ... | en | 0.366817 | Checks if the token is a valid ogc type field Finds non parsed parentheses in tokens (ex.: ['x(y']['z)'] -> ['x']['(']['y']['z'][')'] :param tokens: a list of tokens :return: the list with unchecked parenteses tokenized | 3.538921 | 4 |
salt/runners/mine.py | byteskeptical/salt | 12 | 11676 | <gh_stars>10-100
# -*- coding: utf-8 -*-
'''
A runner to access data from the salt mine
'''
from __future__ import absolute_import, print_function, unicode_literals
# Import Python Libs
import logging
# Import salt libs
import salt.utils.minions
log = logging.getLevelName(__name__)
def get(tgt, fun, tgt_type='glob... | # -*- coding: utf-8 -*-
'''
A runner to access data from the salt mine
'''
from __future__ import absolute_import, print_function, unicode_literals
# Import Python Libs
import logging
# Import salt libs
import salt.utils.minions
log = logging.getLevelName(__name__)
def get(tgt, fun, tgt_type='glob'):
'''
G... | en | 0.591138 | # -*- coding: utf-8 -*- A runner to access data from the salt mine # Import Python Libs # Import salt libs Gathers the data from the specified minions' mine, pass in the target, function to look up and the target type CLI Example: .. code-block:: bash salt-run mine.get '*' network.interfaces .. v... | 2.288011 | 2 |
app.py | rhedgeco/test_plaid_webapp | 0 | 11677 | from plaid import Client
from backend.link_token import LinkToken
from general_falcon_webserver import WebApp
client = Client(client_id='5e2e3527dd6924001167e8e8', secret='<KEY>', environment='sandbox')
app = WebApp()
app.add_route('link', LinkToken(client))
app.launch_webserver()
| from plaid import Client
from backend.link_token import LinkToken
from general_falcon_webserver import WebApp
client = Client(client_id='5e2e3527dd6924001167e8e8', secret='<KEY>', environment='sandbox')
app = WebApp()
app.add_route('link', LinkToken(client))
app.launch_webserver()
| none | 1 | 1.976386 | 2 | |
examples/circuitplayground_light_plotter.py | sommersoft/Adafruit_CircuitPython_CircuitPlayground | 0 | 11678 | <reponame>sommersoft/Adafruit_CircuitPython_CircuitPlayground
"""If you're using Mu, this example will plot the light levels from the light sensor (located next
to the eye) on your Circuit Playground. Try shining a flashlight on your Circuit Playground, or
covering the light sensor to see the plot increase and decrease... | """If you're using Mu, this example will plot the light levels from the light sensor (located next
to the eye) on your Circuit Playground. Try shining a flashlight on your Circuit Playground, or
covering the light sensor to see the plot increase and decrease."""
import time
from adafruit_circuitplayground import cp
wh... | en | 0.876565 | If you're using Mu, this example will plot the light levels from the light sensor (located next to the eye) on your Circuit Playground. Try shining a flashlight on your Circuit Playground, or covering the light sensor to see the plot increase and decrease. | 2.910838 | 3 |
kickeststats/exceptions.py | antimaLinux/kickscarper | 0 | 11679 | <filename>kickeststats/exceptions.py<gh_stars>0
"""Exception utilities."""
class ParsingException(Exception):
pass
class EnvVariableNotSet(Exception):
def __init__(self, varname: str) -> None:
super(EnvVariableNotSet, self).__init__(f"Env variable [{varname}] not set.")
class InvalidLineUp(Excepti... | <filename>kickeststats/exceptions.py<gh_stars>0
"""Exception utilities."""
class ParsingException(Exception):
pass
class EnvVariableNotSet(Exception):
def __init__(self, varname: str) -> None:
super(EnvVariableNotSet, self).__init__(f"Env variable [{varname}] not set.")
class InvalidLineUp(Excepti... | en | 0.694248 | Exception utilities. | 2.395715 | 2 |
helpers/HurstEstimationNumerics.py | Baozhen-Li/SurfaceTopography | 0 | 11680 | #
# Copyright 2018, 2020 <NAME>
# 2019-2020 <NAME>
# 2015-2016 <NAME>
#
# ### MIT license
#
# 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 ... | #
# Copyright 2018, 2020 <NAME>
# 2019-2020 <NAME>
# 2015-2016 <NAME>
#
# ### MIT license
#
# 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 ... | en | 0.709129 | # # Copyright 2018, 2020 <NAME> # 2019-2020 <NAME> # 2015-2016 <NAME> # # ### MIT license # # 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 ... | 1.904703 | 2 |
test/serverless_mock_test.py | zhangyuan/serverless-mock-python | 5 | 11681 | import threading
import requests
import json
import os
from nose.tools import *
from server import Httpd
app_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "app")
class TestServerlessMock(object):
def test_ok(self):
ok_(True)
def setUp(self):
self.httpd = Httpd(app_path, 0)... | import threading
import requests
import json
import os
from nose.tools import *
from server import Httpd
app_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "app")
class TestServerlessMock(object):
def test_ok(self):
ok_(True)
def setUp(self):
self.httpd = Httpd(app_path, 0)... | none | 1 | 2.375288 | 2 | |
setup.py | holoyan/python-data-validation | 3 | 11682 | <reponame>holoyan/python-data-validation
from setuptools import setup, find_packages
# read the contents of your README file
from os import path
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
na... | from setuptools import setup, find_packages
# read the contents of your README file
from os import path
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='pyva',
packages=find_packages(),
... | en | 0.937923 | # read the contents of your README file # I get to this in a second | 1.343173 | 1 |
bus_system/apps/trip/migrations/0007_auto_20210624_1812.py | pygabo/bus_system | 0 | 11683 | # Generated by Django 3.1.12 on 2021-06-24 18:12
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('trip', '0006_remove_travelmodel_driver'),
]
operations = [
migrations.AddField(
model_name='tr... | # Generated by Django 3.1.12 on 2021-06-24 18:12
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('trip', '0006_remove_travelmodel_driver'),
]
operations = [
migrations.AddField(
model_name='tr... | en | 0.809614 | # Generated by Django 3.1.12 on 2021-06-24 18:12 | 1.614971 | 2 |
geoscilabs/dcip/DCWidgetPlate2_5D.py | lheagy/geosci-labs | 1 | 11684 | <filename>geoscilabs/dcip/DCWidgetPlate2_5D.py
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
import numpy as np
from scipy.constants import epsilon_0
from scipy.ndimage.measurements import center_of_mass
from ipywidgets import IntSlider, FloatSli... | <filename>geoscilabs/dcip/DCWidgetPlate2_5D.py
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
import numpy as np
from scipy.constants import epsilon_0
from scipy.ndimage.measurements import center_of_mass
from ipywidgets import IntSlider, FloatSli... | en | 0.35454 | # Mesh, mapping can be globals global # Create halfspace model # Create true model with plate # Form rotation matix # use matplotlib paths to find CC inside of polygon # left, top # right, top # right, bottom # left, bottom # left, top (closes polygon) # Check selected cell centers by plotting # print insideInd # fig =... | 1.715415 | 2 |
retratodefases/phase_diagrams/__init__.py | Loracio/retrato-de-fases | 3 | 11685 | <gh_stars>1-10
try:
__PHASE_DIAGRAMS_IMPORTED__
except NameError:
__PHASE_DIAGRAMS_IMPORTED__= False
if not __PHASE_DIAGRAMS_IMPORTED__:
from .phase_portrait import PhasePortrait
from .funcion1D import Funcion1D
from .nullclines import Nullcline2D
__PHASE_DIAGRAMS_IMPORTED__ = True | try:
__PHASE_DIAGRAMS_IMPORTED__
except NameError:
__PHASE_DIAGRAMS_IMPORTED__= False
if not __PHASE_DIAGRAMS_IMPORTED__:
from .phase_portrait import PhasePortrait
from .funcion1D import Funcion1D
from .nullclines import Nullcline2D
__PHASE_DIAGRAMS_IMPORTED__ = True | none | 1 | 1.187977 | 1 | |
P13pt/spectrumfitter/spectrumfitter.py | green-mercury/P13pt | 3 | 11686 | #!/usr/bin/python
import sys
import os
import shutil
from glob import glob
from PyQt5.QtCore import (Qt, qInstallMessageHandler, QtInfoMsg, QtCriticalMsg, QtDebugMsg,
QtWarningMsg, QtFatalMsg, QSettings, pyqtSlot, QStandardPaths, QUrl)
from PyQt5.QtGui import QIcon, QDesktopServices
from PyQt... | #!/usr/bin/python
import sys
import os
import shutil
from glob import glob
from PyQt5.QtCore import (Qt, qInstallMessageHandler, QtInfoMsg, QtCriticalMsg, QtDebugMsg,
QtWarningMsg, QtFatalMsg, QSettings, pyqtSlot, QStandardPaths, QUrl)
from PyQt5.QtGui import QIcon, QDesktopServices
from PyQt... | en | 0.745048 | #!/usr/bin/python # set up data loading area # set up data navigator # set up plotter # set up fitter # set up the dock positions # set up menus # make connections # set up fitted parameter (this has to be done after making connections, so that fitter and plotter sync) # default value # create new session # show window... | 1.841905 | 2 |
subversion/tests/cmdline/lock_tests.py | centic9/subversion-ppa | 0 | 11687 | <gh_stars>0
#!/usr/bin/env python
# encoding=utf-8
#
# lock_tests.py: testing versioned properties
#
# Subversion is a tool for revision control.
# See http://subversion.apache.org for more information.
#
# ====================================================================
# Licensed to the Apache Software Fou... | #!/usr/bin/env python
# encoding=utf-8
#
# lock_tests.py: testing versioned properties
#
# Subversion is a tool for revision control.
# See http://subversion.apache.org for more information.
#
# ====================================================================
# Licensed to the Apache Software Foundation (ASF... | en | 0.801084 | #!/usr/bin/env python # encoding=utf-8 # # lock_tests.py: testing versioned properties # # Subversion is a tool for revision control. # See http://subversion.apache.org for more information. # # ==================================================================== # Licensed to the Apache Software Foundation (ASF... | 1.726772 | 2 |
tests/testresourcemap.py | rayvnekieron/regionator | 0 | 11688 | <reponame>rayvnekieron/regionator
#!/usr/bin/env python
"""
Copyright (C) 2006 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 r... | #!/usr/bin/env python
"""
Copyright (C) 2006 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 agree... | en | 0.816504 | #!/usr/bin/env python Copyright (C) 2006 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 ... | 2.299481 | 2 |
pycket/base.py | krono/pycket | 0 | 11689 | from pycket.error import SchemeException
from rpython.tool.pairtype import extendabletype
from rpython.rlib import jit, objectmodel
class W_ProtoObject(object):
""" abstract base class of both actual values (W_Objects) and multiple
return values (Values)"""
_attrs_ = []
_settled_ = True
... | from pycket.error import SchemeException
from rpython.tool.pairtype import extendabletype
from rpython.rlib import jit, objectmodel
class W_ProtoObject(object):
""" abstract base class of both actual values (W_Objects) and multiple
return values (Values)"""
_attrs_ = []
_settled_ = True
... | en | 0.692916 | abstract base class of both actual values (W_Objects) and multiple return values (Values) # need to override in callables that are based on an AST # an arity is a pair of a list of numbers and either -1 or a non-negative integer # default implementation # default implementation # default implementation # for expose | 2.51366 | 3 |
src/teacher/flake_approx/teacher_env.py | jainraj/CISR_NeurIPS20 | 16 | 11690 | import numpy as np
from stable_baselines import PPO2
from stable_baselines.common.policies import CnnPolicy
from stable_baselines.a2c.utils import conv, linear, conv_to_fc
from src.envs import CMDP, FrozenLakeEnvCustomMap
from src.envs.frozen_lake.frozen_maps import MAPS
from src.students import LagrangianStudent, i... | import numpy as np
from stable_baselines import PPO2
from stable_baselines.common.policies import CnnPolicy
from stable_baselines.a2c.utils import conv, linear, conv_to_fc
from src.envs import CMDP, FrozenLakeEnvCustomMap
from src.envs.frozen_lake.frozen_maps import MAPS
from src.students import LagrangianStudent, i... | en | 0.672507 | # Base MDP # Base CMDP # Base MDP # # 2 interventions # dist = [1, 1] # tau = [0.1, 0] # buff_size = [1, 0] # avg_constraint = [True, True] # 3 Interventions ############################## TEACHER ENV ################################### # Student definition # Define online kwargs # Teacher interventions # To preserve t... | 1.601552 | 2 |
scanapi/__init__.py | rajarshig/scanapi | 1 | 11691 | name = "scanapi"
import click
import logging
from scanapi.tree.api_tree import APITree
from scanapi.reporter import Reporter
from scanapi.requests_maker import RequestsMaker
from scanapi.settings import SETTINGS
from scanapi.yaml_loader import load_yaml
@click.command()
@click.option(
"-s",
"--spec-path",
... | name = "scanapi"
import click
import logging
from scanapi.tree.api_tree import APITree
from scanapi.reporter import Reporter
from scanapi.requests_maker import RequestsMaker
from scanapi.settings import SETTINGS
from scanapi.yaml_loader import load_yaml
@click.command()
@click.option(
"-s",
"--spec-path",
... | en | 0.82818 | Automated Testing and Documentation for your REST API. # custom templates to be implemented later | 2.156885 | 2 |
breadth first search/level order successor.py | JoanWu5/Grokking-the-coding-interview | 0 | 11692 | <reponame>JoanWu5/Grokking-the-coding-interview<filename>breadth first search/level order successor.py
# Given a binary tree and a node, find the level order successor of the given node in the tree.
# The level order successor is the node that appears right after the given node in the level order traversal.
from coll... | first search/level order successor.py
# Given a binary tree and a node, find the level order successor of the given node in the tree.
# The level order successor is the node that appears right after the given node in the level order traversal.
from collections import deque
class TreeNode:
def __init__(self, valu... | en | 0.89362 | # Given a binary tree and a node, find the level order successor of the given node in the tree. # The level order successor is the node that appears right after the given node in the level order traversal. | 4.005198 | 4 |
npbench/benchmarks/cavity_flow/cavity_flow_legate.py | frahlg/npbench | 27 | 11693 | <reponame>frahlg/npbench
# Barba, <NAME>., and Forsyth, <NAME>. (2018).
# CFD Python: the 12 steps to Navier-Stokes equations.
# Journal of Open Source Education, 1(9), 21,
# https://doi.org/10.21105/jose.00021
# TODO: License
# (c) 2017 <NAME>, <NAME>.
# All content is under Creative Commons Attribution CC-BY 4.0,
# a... | # Barba, <NAME>., and Forsyth, <NAME>. (2018).
# CFD Python: the 12 steps to Navier-Stokes equations.
# Journal of Open Source Education, 1(9), 21,
# https://doi.org/10.21105/jose.00021
# TODO: License
# (c) 2017 <NAME>, <NAME>.
# All content is under Creative Commons Attribution CC-BY 4.0,
# and all code is under BSD-... | en | 0.837411 | # Barba, <NAME>., and Forsyth, <NAME>. (2018). # CFD Python: the 12 steps to Navier-Stokes equations. # Journal of Open Source Education, 1(9), 21, # https://doi.org/10.21105/jose.00021 # TODO: License # (c) 2017 <NAME>, <NAME>. # All content is under Creative Commons Attribution CC-BY 4.0, # and all code is under BSD-... | 2.894907 | 3 |
Lib/gds/burp/config.py | mwielgoszewski/jython-burp-api | 134 | 11694 | <reponame>mwielgoszewski/jython-burp-api
# -*- coding: utf-8 -*-
#
# Copyright (C) 2005-2009 Edgewall Software
# Copyright (C) 2005-2007 <NAME> <<EMAIL>>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are ... | # -*- coding: utf-8 -*-
#
# Copyright (C) 2005-2009 Edgewall Software
# Copyright (C) 2005-2007 <NAME> <<EMAIL>>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://trac.edgewall.or... | en | 0.668226 | # -*- coding: utf-8 -*- # # Copyright (C) 2005-2009 Edgewall Software # Copyright (C) 2005-2007 <NAME> <<EMAIL>> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.or... | 2.302607 | 2 |
src/Application/PythonScriptModule/pymodules_old/apitest/rotate.py | antont/tundra | 0 | 11695 | <reponame>antont/tundra
import circuits
from PythonQt.QtGui import QQuaternion as Quat
from PythonQt.QtGui import QVector3D as Vec
import naali
COMPNAME = "rotation"
class RotationHandler(circuits.BaseComponent):
def __init__(self, entity=None, comp=None, changetype=None):
circuits.BaseComponent.__init__(... | import circuits
from PythonQt.QtGui import QQuaternion as Quat
from PythonQt.QtGui import QVector3D as Vec
import naali
COMPNAME = "rotation"
class RotationHandler(circuits.BaseComponent):
def __init__(self, entity=None, comp=None, changetype=None):
circuits.BaseComponent.__init__(self)
self.entit... | en | 0.354785 | #normal run, check for nonEC run now # Todo: OnChanged() is deprecated #print self.rot, y # else: #testing without EC, as a autoloaded module # entid = 2088826547 # try: # self.entity = naali.getEntity(entid) # except: # pass #not there (yet) # else: # self.entity.createComponent... | 2.594527 | 3 |
pyqubo/package_info.py | caja-matematica/pyqubo | 1 | 11696 | <gh_stars>1-10
# (major, minor, patch, prerelease)
VERSION = (0, 0, 6, "")
__shortversion__ = '.'.join(map(str, VERSION[:3]))
__version__ = '.'.join(map(str, VERSION[:3])) + "".join(VERSION[3:])
__package_name__ = 'pyqubo'
__contact_names__ = 'Recruit Communications Co., Ltd.'
__contact_emails__ = '<EMAIL>'
__homepag... | # (major, minor, patch, prerelease)
VERSION = (0, 0, 6, "")
__shortversion__ = '.'.join(map(str, VERSION[:3]))
__version__ = '.'.join(map(str, VERSION[:3])) + "".join(VERSION[3:])
__package_name__ = 'pyqubo'
__contact_names__ = 'Recruit Communications Co., Ltd.'
__contact_emails__ = '<EMAIL>'
__homepage__ = 'https://... | en | 0.921888 | # (major, minor, patch, prerelease) | 1.741616 | 2 |
bin/DBImportOperation/etl_operations.py | karlam123/DBImport | 0 | 11697 | # 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... | # 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... | en | 0.85623 | # 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... | 1.791885 | 2 |
grvx/nodes/ieeg/read.py | UMCU-RIBS/grvx | 1 | 11698 | <reponame>UMCU-RIBS/grvx
from logging import getLogger
from numpy import mean, std
from pickle import dump
from wonambi import Dataset
from wonambi.trans import math, concatenate
from bidso import Task, Electrodes
lg = getLogger(__name__)
def read_ieeg_block(filename, electrode_file, conditions, minimalduration, out... | from logging import getLogger
from numpy import mean, std
from pickle import dump
from wonambi import Dataset
from wonambi.trans import math, concatenate
from bidso import Task, Electrodes
lg = getLogger(__name__)
def read_ieeg_block(filename, electrode_file, conditions, minimalduration, output_dir):
d = Dataset... | en | 0.902864 | # exclude elec location that have no corresponding channel | 2.081169 | 2 |
bin/analysis/ipa/constraints/split.py | ncbray/pystream | 6 | 11699 | # Copyright 2011 <NAME>
#
# 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, softw... | # Copyright 2011 <NAME>
#
# 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, softw... | en | 0.842638 | # Copyright 2011 <NAME> # # 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, softw... | 2.228755 | 2 |