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
vitrage/evaluator/template_data.py
HoonMinJeongUm/Hunmin-vitrage
0
5100
<reponame>HoonMinJeongUm/Hunmin-vitrage<filename>vitrage/evaluator/template_data.py # Copyright 2016 - Nokia # # 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/lic...
# Copyright 2016 - Nokia # # 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, sof...
en
0.82651
# Copyright 2016 - Nokia # # 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, sof...
1.74198
2
scripts/summarize-kmer-counts.py
rpetit3/anthrax-metagenome-study
0
5101
#! /usr/bin/env python3 """Parse through the simulated sequencing group specific kmer counts.""" import argparse as ap from collections import OrderedDict import glob import gzip import os import sys import time import numpy as np import multiprocessing as mp SAMPLES = OrderedDict() KMERS = {} HAMMING = OrderedDict() ...
#! /usr/bin/env python3 """Parse through the simulated sequencing group specific kmer counts.""" import argparse as ap from collections import OrderedDict import glob import gzip import os import sys import time import numpy as np import multiprocessing as mp SAMPLES = OrderedDict() KMERS = {} HAMMING = OrderedDict() ...
en
0.763907
#! /usr/bin/env python3 Parse through the simulated sequencing group specific kmer counts. Return if a sample is within a group or not. # lef Return summary stats of a set of coverages. Reverse complement a DNA sequence. Parse kmer counts. Parse Summary file. # Column Names: # accession, gi, is_bcg, is_ba, species, gen...
2.185159
2
movies/exceptions.py
te0dor/netguru-movies
0
5102
<filename>movies/exceptions.py from marshmallow.exceptions import ValidationError class ObjectDoesNotExist(Exception): """Exception if not found results""" pass class CommunicationError(Exception): """Exception for diferents problem with communications.""" pass __all__ = ('ValidationError', 'Objec...
<filename>movies/exceptions.py from marshmallow.exceptions import ValidationError class ObjectDoesNotExist(Exception): """Exception if not found results""" pass class CommunicationError(Exception): """Exception for diferents problem with communications.""" pass __all__ = ('ValidationError', 'Objec...
en
0.804408
Exception if not found results Exception for diferents problem with communications.
2.311486
2
music_api/apps/music_app/admin.py
fejiroofficial/Simple_music
0
5103
from django.contrib import admin from .models import Songs admin.site.register(Songs) # Register your models here.
from django.contrib import admin from .models import Songs admin.site.register(Songs) # Register your models here.
en
0.968259
# Register your models here.
1.384474
1
scripts/generate_image_series.py
JIC-Image-Analysis/senescence-in-field
0
5104
# Draw image time series for one or more plots from jicbioimage.core.image import Image import dtoolcore import click from translate_labels import rack_plot_to_image_plot from image_utils import join_horizontally, join_vertically def identifiers_where_match_is_true(dataset, match_function): return [i for i i...
# Draw image time series for one or more plots from jicbioimage.core.image import Image import dtoolcore import click from translate_labels import rack_plot_to_image_plot from image_utils import join_horizontally, join_vertically def identifiers_where_match_is_true(dataset, match_function): return [i for i i...
en
0.859612
# Draw image time series for one or more plots # n_image, n_plot = 55, 24 # Early leaf senescence # generate_image_series_for_plot(3, 16) # generate_image_series_for_plot(7, 9) # generate_image_series_for_plot(9, 1) # Late leaf senescence
2.386175
2
pytpp/properties/response_objects/system_status.py
Venafi/pytpp
4
5105
<gh_stars>1-10 from pytpp.properties.response_objects.dataclasses import system_status from pytpp.tools.helpers.date_converter import from_date_string class SystemStatus: @staticmethod def Engine(response_object: dict): if not isinstance(response_object, dict): response_object = {} ...
from pytpp.properties.response_objects.dataclasses import system_status from pytpp.tools.helpers.date_converter import from_date_string class SystemStatus: @staticmethod def Engine(response_object: dict): if not isinstance(response_object, dict): response_object = {} return system_...
none
1
2.320561
2
src/data/dataModule.py
mikkelfo/Title-prediction-from-abstract
0
5106
<gh_stars>0 from typing import Optional import pytorch_lightning as pl import torch from omegaconf import OmegaConf from torch.utils.data import DataLoader, random_split from transformers import T5Tokenizer from src.data.PaperDataset import PaperDataset class ArvixDataModule(pl.LightningDataModule): def __init_...
from typing import Optional import pytorch_lightning as pl import torch from omegaconf import OmegaConf from torch.utils.data import DataLoader, random_split from transformers import T5Tokenizer from src.data.PaperDataset import PaperDataset class ArvixDataModule(pl.LightningDataModule): def __init__(self, conf...
en
0.369841
# Add tokenizing #titles, abstracts = torch.load("data/processed/data.pt").T
2.220123
2
shs/gui/RootFrame.py
ansobolev/shs
1
5107
# -*- coding: utf-8 -*- import os import sys import time import subprocess import wx import ConfigParser from wx.lib.mixins.listctrl import getListCtrlSelection from wx.lib.pubsub import pub from gui.RootGUI import RootGUI from StepsDialog import StepsDialog from PlotFrame import PlotFuncFrame, PlotCorrFrame import i...
# -*- coding: utf-8 -*- import os import sys import time import subprocess import wx import ConfigParser from wx.lib.mixins.listctrl import getListCtrlSelection from wx.lib.pubsub import pub from gui.RootGUI import RootGUI from StepsDialog import StepsDialog from PlotFrame import PlotFuncFrame, PlotCorrFrame import i...
en
0.709956
# -*- coding: utf-8 -*- # set root # initialize choices # initialize calc tree # initialize calc list Sets root directory fr GUI based on config file :return: Root directory # check the file and create one if it's not there # if config exists and has needed option # make config Adds a new root element and then ...
2.125221
2
saleor/order/migrations/0015_auto_20170206_0407.py
acabezasg/urpi-master
6
5108
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-06 10:07 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django_prices.models class Migration(migrations.Migration): dependencies = [ ...
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-06 10:07 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django_prices.models class Migration(migrations.Migration): dependencies = [ ...
en
0.754975
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-06 10:07
1.522598
2
testrail_client/api/configurations.py
tonybearpan/testrail-lib
0
5109
<reponame>tonybearpan/testrail-lib #!/usr/bin/env python # -*- coding: utf-8 -*- from .base import TestRailAPIBase class Config(TestRailAPIBase): """ Use the follow...
#!/usr/bin/env python # -*- coding: utf-8 -*- from .base import TestRailAPIBase class Config(TestRailAPIBase): """ Use the following API methods to request details ...
en
0.626163
#!/usr/bin/env python # -*- coding: utf-8 -*- Use the following API methods to request details about configurations and to create or modify configurations. Returns a list of available configurations, grouped by configuration groups (requires TestRail 3.1 or later). :param project_id: The ID of the ...
2.39723
2
tests/asserts_wrapper.py
QARancher/k8s_client
0
5110
def assert_not_none(actual_result, message=""): if not message: message = f"{actual_result} resulted with None" assert actual_result, message def assert_equal(actual_result, expected_result, message=""): if not message: message = f"{actual_result} is not equal to expected " \ ...
def assert_not_none(actual_result, message=""): if not message: message = f"{actual_result} resulted with None" assert actual_result, message def assert_equal(actual_result, expected_result, message=""): if not message: message = f"{actual_result} is not equal to expected " \ ...
none
1
3.25079
3
srl/simulation_test.py
google/simple-reinforcement-learning
60
5111
<gh_stars>10-100 # Copyright 2017 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...
# Copyright 2017 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, ...
en
0.842982
# Copyright 2017 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, ...
2.527316
3
src/xmltollvm.py
Tejvinder/thesis-ghidra
101
5112
from llvmlite import ir import xml.etree.ElementTree as et int32 = ir.IntType(32) int64 = ir.IntType(64) int1 = ir.IntType(1) void_type = ir.VoidType() function_names = [] registers, functions, uniques, extracts = {}, {}, {}, {} internal_functions = {} memory = {} flags = ["ZF", "CF", "OF", "SF"] pointers = ["RSP", "R...
from llvmlite import ir import xml.etree.ElementTree as et int32 = ir.IntType(32) int64 = ir.IntType(64) int1 = ir.IntType(1) void_type = ir.VoidType() function_names = [] registers, functions, uniques, extracts = {}, {}, {}, {} internal_functions = {} memory = {} flags = ["ZF", "CF", "OF", "SF"] pointers = ["RSP", "R...
en
0.853907
# noinspection DuplicatedCode # This is incorrect. This is treating it as a copy, should load the memory address in the input 1 # target # source # weird jump into some label in another function # might be solved with callbr instruction? # target = pcode.find("input_0").text[2:-2] # For integer comparison operations. W...
2.29968
2
modules/WPSeku/modules/discovery/generic/wplisting.py
Farz7/Darkness
18
5113
#/usr/bin/env python # -*- Coding: UTF-8 -*- # # WPSeku: Wordpress Security Scanner # # @url: https://github.com/m4ll0k/WPSeku # @author: <NAME> (M4ll0k) import re from lib import wphttp from lib import wpprint class wplisting: chk = wphttp.UCheck() out = wpprint.wpprint() def __init__(self,agent,proxy,redir...
#/usr/bin/env python # -*- Coding: UTF-8 -*- # # WPSeku: Wordpress Security Scanner # # @url: https://github.com/m4ll0k/WPSeku # @author: <NAME> (M4ll0k) import re from lib import wphttp from lib import wpprint class wplisting: chk = wphttp.UCheck() out = wpprint.wpprint() def __init__(self,agent,proxy,redir...
en
0.288414
#/usr/bin/env python # -*- Coding: UTF-8 -*- # # WPSeku: Wordpress Security Scanner # # @url: https://github.com/m4ll0k/WPSeku # @author: <NAME> (M4ll0k)
2.022248
2
tw2/jit/widgets/__init__.py
toscawidgets/tw2.jit
1
5114
<gh_stars>1-10 from tw2.jit.widgets.chart import (AreaChart, BarChart, PieChart) from tw2.jit.widgets.graph import (ForceDirectedGraph, RadialGraph) from tw2.jit.widgets.tree import (SpaceTree, HyperTree, Sunburst, Icicle, TreeMap) from tw2.jit.widgets.ajax import AjaxRadialGraph from...
from tw2.jit.widgets.chart import (AreaChart, BarChart, PieChart) from tw2.jit.widgets.graph import (ForceDirectedGraph, RadialGraph) from tw2.jit.widgets.tree import (SpaceTree, HyperTree, Sunburst, Icicle, TreeMap) from tw2.jit.widgets.ajax import AjaxRadialGraph from tw2.jit.widgets...
none
1
1.263711
1
bot.py
tiianprb/TikTok-Downloader-Bot
0
5115
<filename>bot.py import json, requests, os, shlex, asyncio, uuid, shutil from typing import Tuple from pyrogram import Client, filters from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, CallbackQuery # Configs API_HASH = os.environ['API_HASH'] APP_ID = int(os.environ['APP_ID']) BOT_TOKEN = ...
<filename>bot.py import json, requests, os, shlex, asyncio, uuid, shutil from typing import Tuple from pyrogram import Client, filters from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, CallbackQuery # Configs API_HASH = os.environ['API_HASH'] APP_ID = int(os.environ['APP_ID']) BOT_TOKEN = ...
en
0.496278
# Configs #Button # Running bot # Helpers # Thanks to FridayUB # Start # Downloader for tiktok # Callbacks
2.420108
2
frontend-gui/rpanel.py
skyu0221/660-iot
0
5116
import wx import wx.adv import random import util import config import time import datetime import threading import requests import json from functools import partial class ReqeusterThread(threading.Thread): # https://www.oreilly.com/library/view/python-cookbook/0596001673/ch06s03.html def __init__(self, ...
import wx import wx.adv import random import util import config import time import datetime import threading import requests import json from functools import partial class ReqeusterThread(threading.Thread): # https://www.oreilly.com/library/view/python-cookbook/0596001673/ch06s03.html def __init__(self, ...
en
0.453174
# https://www.oreilly.com/library/view/python-cookbook/0596001673/ch06s03.html # print(self.parent_panel.info_widget_dict) # print(self.parent_panel.info) # chnage to real time # add question label # add drop down menu # "4. Which room has someone visited?", # add result label # st2 = wx.StaticText(self, label='Result'...
2.282031
2
webapp/search.py
henchan/memfinity
0
5117
<gh_stars>0 """High-level search API. This module implements application-specific search semantics on top of App Engine's search API. There are two chief operations: querying for entities, and managing entities in the search facility. Add and remove Card entities in the search facility: insert_cards([models.Card])...
"""High-level search API. This module implements application-specific search semantics on top of App Engine's search API. There are two chief operations: querying for entities, and managing entities in the search facility. Add and remove Card entities in the search facility: insert_cards([models.Card]) delete_ca...
en
0.842873
High-level search API. This module implements application-specific search semantics on top of App Engine's search API. There are two chief operations: querying for entities, and managing entities in the search facility. Add and remove Card entities in the search facility: insert_cards([models.Card]) delete_cards...
3.143945
3
Bot/Bot/board.py
Baidi96/AI-Agent-for-Light-Rider
1
5118
import copy import sys PLAYER1, PLAYER2, EMPTY, BLOCKED = [0, 1, 2, 3] S_PLAYER1, S_PLAYER2, S_EMPTY, S_BLOCKED, = ['0', '1', '.', 'x'] CHARTABLE = [(PLAYER1, S_PLAYER1), (PLAYER2, S_PLAYER2), (EMPTY, S_EMPTY), (BLOCKED, S_BLOCKED)] DIRS = [ ((-1, 0), "up"), ((1, 0), "down"), ((0, 1), "right"), ((0, ...
import copy import sys PLAYER1, PLAYER2, EMPTY, BLOCKED = [0, 1, 2, 3] S_PLAYER1, S_PLAYER2, S_EMPTY, S_BLOCKED, = ['0', '1', '.', 'x'] CHARTABLE = [(PLAYER1, S_PLAYER1), (PLAYER2, S_PLAYER2), (EMPTY, S_EMPTY), (BLOCKED, S_BLOCKED)] DIRS = [ ((-1, 0), "up"), ((1, 0), "down"), ((0, 1), "right"), ((0, ...
en
0.777064
#the information of the whole grid
2.935794
3
baekjoon/1012.py
wonnerky/coteMaster
0
5119
import sys sys.setrecursionlimit(10000) def dfs(r, c): global visit visit[r][c] = True mov = [(-1, 0), (0, -1), (1, 0), (0, 1)] for i in range(4): dr, dc = mov[i] nr, nc = r + dr, c + dc if 0 <= nr < N and 0 <= nc < M and visit[nr][nc] == False and board[nr][nc] == 1: ...
import sys sys.setrecursionlimit(10000) def dfs(r, c): global visit visit[r][c] = True mov = [(-1, 0), (0, -1), (1, 0), (0, 1)] for i in range(4): dr, dc = mov[i] nr, nc = r + dr, c + dc if 0 <= nr < N and 0 <= nc < M and visit[nr][nc] == False and board[nr][nc] == 1: ...
none
1
2.716055
3
collection/cp/algorithms-master/python/binary_tree.py
daemonslayer/Notebook
1
5120
<reponame>daemonslayer/Notebook """ Binary Tree and basic properties 1. In-Order Traversal 2. Pre-Order Traversal 3. Post-Order Traversal 4. Level-Order Traversal """ from collections import deque class BinaryTree(object): """ Representation of a general binary tree data: value of element left: Left s...
""" Binary Tree and basic properties 1. In-Order Traversal 2. Pre-Order Traversal 3. Post-Order Traversal 4. Level-Order Traversal """ from collections import deque class BinaryTree(object): """ Representation of a general binary tree data: value of element left: Left subtree right: Right subtree ...
en
0.773634
Binary Tree and basic properties 1. In-Order Traversal 2. Pre-Order Traversal 3. Post-Order Traversal 4. Level-Order Traversal Representation of a general binary tree data: value of element left: Left subtree right: Right subtree Return list of node data as inorder traversal. If write is True then print as ...
4.100454
4
custom_components/vaddio_conferenceshot/const.py
rohankapoorcom/vaddio_conferenceshot
0
5121
import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_PATH, CONF_USERNAME DOMAIN = "vaddio_conferenceshot" DATA_SCHEMA = vol.Schema( { vol.Required(CONF_HOST): cv.string, vol.Required(CONF_USERNAME): cv.string,...
import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_PATH, CONF_USERNAME DOMAIN = "vaddio_conferenceshot" DATA_SCHEMA = vol.Schema( { vol.Required(CONF_HOST): cv.string, vol.Required(CONF_USERNAME): cv.string,...
none
1
1.851299
2
lightonml/opu.py
lightonai/lightonml
27
5122
<gh_stars>10-100 # Copyright (c) 2020 LightOn, All Rights Reserved. # This file is subject to the terms and conditions defined in # file 'LICENSE.txt', which is part of this source code package. """ This module contains the OPU class """ import time from math import sqrt import pkg_resources from lightonml.encoding.b...
# Copyright (c) 2020 LightOn, All Rights Reserved. # This file is subject to the terms and conditions defined in # file 'LICENSE.txt', which is part of this source code package. """ This module contains the OPU class """ import time from math import sqrt import pkg_resources from lightonml.encoding.base import NoEnco...
en
0.734502
# Copyright (c) 2020 LightOn, All Rights Reserved. # This file is subject to the terms and conditions defined in # file 'LICENSE.txt', which is part of this source code package. This module contains the OPU class # Import lightonopu only for typechecking, as it's an optional module and may not be present # noinspection...
1.788738
2
example/shovel/bar.py
demiurgestudios/shovel
202
5123
from shovel import task @task def hello(name='Foo'): '''Prints "Hello, " followed by the provided name. Examples: shovel bar.hello shovel bar.hello --name=Erin http://localhost:3000/bar.hello?Erin''' print('Hello, %s' % name) @task def args(*args): '''Echos back all the ar...
from shovel import task @task def hello(name='Foo'): '''Prints "Hello, " followed by the provided name. Examples: shovel bar.hello shovel bar.hello --name=Erin http://localhost:3000/bar.hello?Erin''' print('Hello, %s' % name) @task def args(*args): '''Echos back all the ar...
en
0.635025
Prints "Hello, " followed by the provided name. Examples: shovel bar.hello shovel bar.hello --name=Erin http://localhost:3000/bar.hello?Erin Echos back all the args you give it. This exists mostly to demonstrate the fact that shovel is compatible with variable argument func...
4.018295
4
scripts/external_libs/scapy-2.4.3/scapy/config.py
timgates42/trex-core
956
5124
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) <NAME> <<EMAIL>> # This program is published under a GPLv2 license """ Implementation of the configuration object. """ from __future__ import absolute_import from __future__ import print_function import functo...
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) <NAME> <<EMAIL>> # This program is published under a GPLv2 license """ Implementation of the configuration object. """ from __future__ import absolute_import from __future__ import print_function import functo...
en
0.788419
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) <NAME> <<EMAIL>> # This program is published under a GPLv2 license Implementation of the configuration object. ############ # Config # ############ # noqa: E501 #6x %s %-20s (%s)" % (num, dir, layer.__name__, ...
2.060967
2
tests/base/test_server.py
Prodigy123/rasa_nlu_zh
4
5125
<filename>tests/base/test_server.py # -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import import tempfile import pytest import time from treq.testing import StubTreq from rasa_nlu.config import Ras...
<filename>tests/base/test_server.py # -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import import tempfile import pytest import time from treq.testing import StubTreq from rasa_nlu.config import Ras...
en
0.768652
# -*- coding: utf-8 -*- This fixture makes use of the IResource interface of the Klein application to mock Rasa HTTP server. :param component_builder: :return: # unused in test app
2.165414
2
bugsnag/configuration.py
ForroKulcs/bugsnag-python
0
5126
<filename>bugsnag/configuration.py<gh_stars>0 import os import platform import socket import sysconfig from typing import List, Any, Tuple, Union import warnings from bugsnag.sessiontracker import SessionMiddleware from bugsnag.middleware import DefaultMiddleware, MiddlewareStack from bugsnag.utils import (fully_quali...
<filename>bugsnag/configuration.py<gh_stars>0 import os import platform import socket import sysconfig from typing import List, Any, Tuple, Union import warnings from bugsnag.sessiontracker import SessionMiddleware from bugsnag.middleware import DefaultMiddleware, MiddlewareStack from bugsnag.utils import (fully_quali...
en
0.794195
# type: ignore # type: ignore # noqa: E501 Global app-level Bugsnag configuration settings. Validate and set configuration options. Will warn if an option is of an incorrect type. Get a single configuration option Unique application identifier # type: ignore Category for the current application or task # type:...
1.941143
2
secret_injector/secret.py
failk8s/failk8s-operator
0
5127
import kopf from .functions import global_logger, reconcile_secret @kopf.on.event("", "v1", "secrets") def injector_secret_event(type, event, logger, **_): obj = event["object"] namespace = obj["metadata"]["namespace"] name = obj["metadata"]["name"] # If secret already exists, indicated by type bein...
import kopf from .functions import global_logger, reconcile_secret @kopf.on.event("", "v1", "secrets") def injector_secret_event(type, event, logger, **_): obj = event["object"] namespace = obj["metadata"]["namespace"] name = obj["metadata"]["name"] # If secret already exists, indicated by type bein...
en
0.900744
# If secret already exists, indicated by type being None, the # secret is added or modified later, do a full reconcilation to # ensure that if now match will inject the secret.
2.10121
2
src/py/gee/utils.py
openforis/collectearthonline
0
5128
<filename>src/py/gee/utils.py import datetime import os import ee import math import sys import json from ee.ee_exception import EEException from gee.inputs import getLandsat, getS1 ########## Helper functions ########## def initialize(ee_account='', ee_key_path=''): try: if ee_account an...
<filename>src/py/gee/utils.py import datetime import os import ee import math import sys import json from ee.ee_exception import EEException from gee.inputs import getLandsat, getS1 ########## Helper functions ########## def initialize(ee_account='', ee_key_path=''): try: if ee_account an...
en
0.66709
########## Helper functions ########## ########## Helper routes ########## ########## ee.Image ########## # TODO, just return URL so the routes are easier to deduce whats being returned. ########## ee.ImageCollection ########## # TODO, should we allow user to select first cloud free image again? ########## ee.FeatureCo...
2.06743
2
userManagement/management/urls.py
shubhamguptaorg/user_managementl
0
5129
from django.contrib import admin from django.urls import path,include from django.views.generic import TemplateView from .views import Index,SignUp,UserDashboard,AdminDashboard,logout,showAdminData,deleteuser,activeUser,deactiveUser,UserDetailEdit,uploadImage # from .views import Index,UserDashboard,SignUp,AdminDashboa...
from django.contrib import admin from django.urls import path,include from django.views.generic import TemplateView from .views import Index,SignUp,UserDashboard,AdminDashboard,logout,showAdminData,deleteuser,activeUser,deactiveUser,UserDetailEdit,uploadImage # from .views import Index,UserDashboard,SignUp,AdminDashboa...
en
0.368365
# from .views import Index,UserDashboard,SignUp,AdminDashboard # path('',homepage,name="index"),
1.834682
2
sickbeard/lib/hachoir_parser/container/riff.py
Branlala/docker-sickbeardfr
0
5130
<reponame>Branlala/docker-sickbeardfr # -*- coding: UTF-8 -*- """ RIFF parser, able to parse: * AVI video container * WAV audio container * CDA file Documents: - libavformat source code from ffmpeg library http://ffmpeg.mplayerhq.hu/ - Video for Windows Programmer's Guide http://www.opennet.ru/docs/forma...
# -*- coding: UTF-8 -*- """ RIFF parser, able to parse: * AVI video container * WAV audio container * CDA file Documents: - libavformat source code from ffmpeg library http://ffmpeg.mplayerhq.hu/ - Video for Windows Programmer's Guide http://www.opennet.ru/docs/formats/avi.txt - What is an animated curso...
en
0.664949
# -*- coding: UTF-8 -*- RIFF parser, able to parse: * AVI video container * WAV audio container * CDA file Documents: - libavformat source code from ffmpeg library http://ffmpeg.mplayerhq.hu/ - Video for Windows Programmer's Guide http://www.opennet.ru/docs/formats/avi.txt - What is an animated cursor? ...
2.252683
2
Utils.py
MartinEngen/NaiveBayesianClassifier
0
5131
<filename>Utils.py import os import re def get_subfolder_paths(folder_relative_path: str) -> list: """ Gets all subfolders of a given path :param folder_relative_path: Relative path of folder to find subfolders of :return: list of relative paths to any subfolders """ return [f.path for f in os...
<filename>Utils.py import os import re def get_subfolder_paths(folder_relative_path: str) -> list: """ Gets all subfolders of a given path :param folder_relative_path: Relative path of folder to find subfolders of :return: list of relative paths to any subfolders """ return [f.path for f in os...
en
0.706667
Gets all subfolders of a given path :param folder_relative_path: Relative path of folder to find subfolders of :return: list of relative paths to any subfolders # lambda x, y: x + y, a, b
3.277276
3
tools/ldbc_benchmark/neo4j/load_scripts/time_index.py
carlboudreau007/ecosys
245
5132
from datetime import datetime with open('/home/neo4j/neo4j-community-3.5.1/logs/debug.log', 'r') as log: begin = [] end = [] for line in log: if 'Index population started' in line: begin.append(line[:23]) elif 'Index creation finished' in line: end.append(line[:23]) if len(begin) == 0 or le...
from datetime import datetime with open('/home/neo4j/neo4j-community-3.5.1/logs/debug.log', 'r') as log: begin = [] end = [] for line in log: if 'Index population started' in line: begin.append(line[:23]) elif 'Index creation finished' in line: end.append(line[:23]) if len(begin) == 0 or le...
none
1
2.683163
3
zf-setup.py
Ziki2001/new-school-sdk
0
5133
<filename>zf-setup.py<gh_stars>0 # -*- coding: utf-8 -*- ''' :file: setup.py :author: -Farmer :url: https://blog.farmer233.top :date: 2021/09/20 11:11:54 ''' from os import path from setuptools import setup, find_packages basedir = path.abspath(path.dirname(__file__)) with open(path.join(basedir, "RE...
<filename>zf-setup.py<gh_stars>0 # -*- coding: utf-8 -*- ''' :file: setup.py :author: -Farmer :url: https://blog.farmer233.top :date: 2021/09/20 11:11:54 ''' from os import path from setuptools import setup, find_packages basedir = path.abspath(path.dirname(__file__)) with open(path.join(basedir, "RE...
en
0.746658
# -*- coding: utf-8 -*- :file: setup.py :author: -Farmer :url: https://blog.farmer233.top :date: 2021/09/20 11:11:54 # package_data={}, # python zf-setup.py bdist_wheel sdist # twine upload dist/*
1.576216
2
RunIt/airt/poker_cards.py
antx-code/funcode
3
5134
<gh_stars>1-10 # Square 方片 => sq => RGB蓝色(Blue) # Plum 梅花 => pl => RGB绿色(Green) # Spade 黑桃 => sp => RGB黑色(Black) # Heart 红桃 => he => RGB红色(Red) init_poker = { 'local': { 'head': [-1, -1, -1], 'mid': [-1, -1, -1, -1, -1], 'tail': [-1, -1, -1, -1, -1], ...
# Square 方片 => sq => RGB蓝色(Blue) # Plum 梅花 => pl => RGB绿色(Green) # Spade 黑桃 => sp => RGB黑色(Black) # Heart 红桃 => he => RGB红色(Red) init_poker = { 'local': { 'head': [-1, -1, -1], 'mid': [-1, -1, -1, -1, -1], 'tail': [-1, -1, -1, -1, -1], 'drop': [-1, -1...
en
0.440371
# Square 方片 => sq => RGB蓝色(Blue) # Plum 梅花 => pl => RGB绿色(Green) # Spade 黑桃 => sp => RGB黑色(Black) # Heart 红桃 => he => RGB红色(Red) # Square # Plum # Heart # Spade
2.096982
2
main.py
reflective21/iportfolio
0
5135
name = "<NAME>" print(name)
name = "<NAME>" print(name)
none
1
1.477526
1
tcex/services/api_service.py
kdeltared/tcex
0
5136
<filename>tcex/services/api_service.py """TcEx Framework API Service module.""" # standard library import json import sys import threading import traceback from io import BytesIO from typing import Any from .common_service import CommonService class ApiService(CommonService): """TcEx Framework API Service module...
<filename>tcex/services/api_service.py """TcEx Framework API Service module.""" # standard library import json import sys import threading import traceback from io import BytesIO from typing import Any from .common_service import CommonService class ApiService(CommonService): """TcEx Framework API Service module...
en
0.500487
TcEx Framework API Service module. # standard library TcEx Framework API Service module. Initialize the Class properties. Args: tcex: Instance of TcEx. # properties # config callbacks Return the command map for the current Service type. Convert name/value array to a query string. Args: ...
2.291411
2
mmpose/core/optimizer/builder.py
vsatyakumar/mmpose
1
5137
<reponame>vsatyakumar/mmpose from mmcv.runner import build_optimizer def build_optimizers(model, cfgs): """Build multiple optimizers from configs. If `cfgs` contains several dicts for optimizers, then a dict for each constructed optimizers will be returned. If `cfgs` only contains one optimizer confi...
from mmcv.runner import build_optimizer def build_optimizers(model, cfgs): """Build multiple optimizers from configs. If `cfgs` contains several dicts for optimizers, then a dict for each constructed optimizers will be returned. If `cfgs` only contains one optimizer config, the constructed optimizer ...
en
0.479244
Build multiple optimizers from configs. If `cfgs` contains several dicts for optimizers, then a dict for each constructed optimizers will be returned. If `cfgs` only contains one optimizer config, the constructed optimizer itself will be returned. For example, 1) Multiple optimizer configs: ...
2.991409
3
register/views.py
angel-vazquez25/My-Backlog-Handler
3
5138
<reponame>angel-vazquez25/My-Backlog-Handler import datetime from django.contrib.auth import logout from django.shortcuts import render, redirect from .forms import RegisterForm from django.http import HttpResponse from django.contrib.auth.forms import AuthenticationForm from django.conf import settings from django.co...
import datetime from django.contrib.auth import logout from django.shortcuts import render, redirect from .forms import RegisterForm from django.http import HttpResponse from django.contrib.auth.forms import AuthenticationForm from django.conf import settings from django.contrib.auth import authenticate, login from dj...
en
0.897322
# Create your views here. # messages.info(response, "Thanks for registering. You are now logged in.")
2.111282
2
forum/migrations/0001_initial.py
Aerodlyn/mu
1
5139
<filename>forum/migrations/0001_initial.py # Generated by Django 3.1.7 on 2021-03-26 01:27 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Community', fiel...
<filename>forum/migrations/0001_initial.py # Generated by Django 3.1.7 on 2021-03-26 01:27 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Community', fiel...
en
0.839212
# Generated by Django 3.1.7 on 2021-03-26 01:27
1.877878
2
custom_train.py
shirley-wu/text_to_table
3
5140
#!/usr/bin/env python3 -u # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Train a new model on one or across multiple GPUs. """ import collections import logging import math import os im...
#!/usr/bin/env python3 -u # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Train a new model on one or across multiple GPUs. """ import collections import logging import math import os im...
en
0.809266
#!/usr/bin/env python3 -u # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. Train a new model on one or across multiple GPUs. # only one worker should attempt to create the required dir # remov...
1.831217
2
src/ucar/unidata/idv/resources/python/griddiag.py
JessicaWiedemeier/IDV
1
5141
""" This is the doc for the Grid Diagnostics module. These functions are based on the grid diagnostics from the GEneral Meteorological PAcKage (GEMPAK). Note that the names are case sensitive and some are named slightly different from GEMPAK functions to avoid conflicts with Jython built-ins (e.g. st...
""" This is the doc for the Grid Diagnostics module. These functions are based on the grid diagnostics from the GEneral Meteorological PAcKage (GEMPAK). Note that the names are case sensitive and some are named slightly different from GEMPAK functions to avoid conflicts with Jython built-ins (e.g. st...
en
0.658645
This is the doc for the Grid Diagnostics module. These functions are based on the grid diagnostics from the GEneral Meteorological PAcKage (GEMPAK). Note that the names are case sensitive and some are named slightly different from GEMPAK functions to avoid conflicts with Jython built-ins (e.g. str). <...
3.13289
3
app.py
DevilBit/Twitter-Bot
0
5142
from selenium import webdriver #to get the browser from selenium.webdriver.common.keys import Keys #to send key to browser import getpass #to get password safely import time #to pause the program #a calss to store all twetter related objects and functions class twitter_bot: def __init__(self, username, pas...
from selenium import webdriver #to get the browser from selenium.webdriver.common.keys import Keys #to send key to browser import getpass #to get password safely import time #to pause the program #a calss to store all twetter related objects and functions class twitter_bot: def __init__(self, username, pas...
en
0.758612
#to get the browser #to send key to browser #to get password safely #to pause the program #a calss to store all twetter related objects and functions #login function #sleep to wait for the browser to get the website #get the email field #get the password field #clear the email and password field just in case of autofil...
3.174461
3
visualization.py
shyhyawJou/GradCAM-pytorch
0
5143
import torch import torch.nn as nn from torch.nn import functional as F from PIL import Image import cv2 as cv from matplotlib import cm import numpy as np class GradCAM: """ #### Args: layer_name: module name (not child name), if None, will use the last layer befor...
import torch import torch.nn as nn from torch.nn import functional as F from PIL import Image import cv2 as cv from matplotlib import cm import numpy as np class GradCAM: """ #### Args: layer_name: module name (not child name), if None, will use the last layer befor...
en
0.698585
#### Args: layer_name: module name (not child name), if None, will use the last layer before average pooling , default is None # outputs shape = 1x2 # "gradients" is a tuple with one item # w, h #self.feature_maps["input"] = x #self.gradients["input"] = x
2.595933
3
frame_2D_alg/alternative versions/intra_blob_xy.py
Mechachleopteryx/CogAlg
0
5144
<filename>frame_2D_alg/alternative versions/intra_blob_xy.py<gh_stars>0 ''' 2D version of 1st-level algorithm is a combination of frame_blobs, intra_blob, and comp_P: optional raster-to-vector conversion. intra_blob recursively evaluates each blob for two forks of extended internal cross-comparison and sub-clus...
<filename>frame_2D_alg/alternative versions/intra_blob_xy.py<gh_stars>0 ''' 2D version of 1st-level algorithm is a combination of frame_blobs, intra_blob, and comp_P: optional raster-to-vector conversion. intra_blob recursively evaluates each blob for two forks of extended internal cross-comparison and sub-clus...
en
0.819224
2D version of 1st-level algorithm is a combination of frame_blobs, intra_blob, and comp_P: optional raster-to-vector conversion. intra_blob recursively evaluates each blob for two forks of extended internal cross-comparison and sub-clustering: der+: incremental derivation cross-comp in high-variation edge ...
2.184864
2
examples/pybullet/gym/pybullet_envs/minitaur/envs/env_randomizers/minitaur_terrain_randomizer.py
felipeek/bullet3
9,136
5145
"""Generates a random terrain at Minitaur gym environment reset.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os, inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(os.path...
"""Generates a random terrain at Minitaur gym environment reset.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os, inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(os.path...
en
0.860535
Generates a random terrain at Minitaur gym environment reset. Generates 2D points using Poisson disk sampling method. Implements the algorithm described in: http://www.cs.ubc.ca/~rbridson/docs/bridson-siggraph07-poissondisk.pdf Unlike the uniform sampling method that creates small clusters of points, Poisson...
3.148963
3
polecat/db/sql/expression/values.py
furious-luke/polecat
4
5146
<reponame>furious-luke/polecat from functools import partial from polecat.db.query import query as query_module from psycopg2.sql import SQL, Placeholder from .expression import Expression class Values(Expression): def __init__(self, values, relation=None): self.values = values self.relation = r...
from functools import partial from polecat.db.query import query as query_module from psycopg2.sql import SQL, Placeholder from .expression import Expression class Values(Expression): def __init__(self, values, relation=None): self.values = values self.relation = relation self.keyword = ...
none
1
2.62725
3
python/day3p1.py
swilcox/2019adventofcode
1
5147
# 2019 advent day 3 MOVES = { 'R': (lambda x: (x[0], x[1] + 1)), 'L': (lambda x: (x[0], x[1] - 1)), 'U': (lambda x: (x[0] + 1, x[1])), 'D': (lambda x: (x[0] - 1, x[1])), } def build_route(directions: list) -> list: current_location = (0, 0) route = [] for d in directions: directio...
# 2019 advent day 3 MOVES = { 'R': (lambda x: (x[0], x[1] + 1)), 'L': (lambda x: (x[0], x[1] - 1)), 'U': (lambda x: (x[0] + 1, x[1])), 'D': (lambda x: (x[0] - 1, x[1])), } def build_route(directions: list) -> list: current_location = (0, 0) route = [] for d in directions: directio...
en
0.444088
# 2019 advent day 3 #R1 = 'R75,D30,R83,U83,L12,D49,R71,U7,L72' #R2 = 'U62,R66,U55,R34,D71,R55,D58,R83' #R1 = 'R98,U47,R26,D63,R33,U87,L62,D20,R33,U53,R51' #R2 = 'U98,R91,D20,R16,D67,R40,U7,R15,U6,R7' #route1 = build_route(R1.split(',')) #route2 = build_route(R2.split(','))
3.677109
4
examples/demo/python/catalog.py
JavDomGom/mist
1
5148
import asyncio async def searchDomains(domain, q): domains = [] proc = await asyncio.create_subprocess_shell(f"dnsrecon -d {domain} -t crt", stdout=asyncio.subprocess.PIPE) line = True while line: line = (await proc.stdout.readline()).decode('utf-8') fields = line.split() if len...
import asyncio async def searchDomains(domain, q): domains = [] proc = await asyncio.create_subprocess_shell(f"dnsrecon -d {domain} -t crt", stdout=asyncio.subprocess.PIPE) line = True while line: line = (await proc.stdout.readline()).decode('utf-8') fields = line.split() if len...
none
1
2.813782
3
tests/api/v3_1_0/test_security_groups_acls.py
CiscoISE/ciscoisesdk
36
5149
<reponame>CiscoISE/ciscoisesdk # -*- coding: utf-8 -*- """IdentityServicesEngineAPI security_groups_acls API fixtures and tests. Copyright (c) 2021 Cisco and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Softwa...
# -*- coding: utf-8 -*- """IdentityServicesEngineAPI security_groups_acls API fixtures and tests. Copyright (c) 2021 Cisco and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software w...
en
0.781232
# -*- coding: utf-8 -*- IdentityServicesEngineAPI security_groups_acls API fixtures and tests. Copyright (c) 2021 Cisco and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software with...
1.783254
2
geomstats/geometry/riemannian_metric.py
stefanheyder/geomstats
0
5150
"""Riemannian and pseudo-Riemannian metrics.""" import math import warnings import autograd import geomstats.backend as gs from geomstats.geometry.connection import Connection EPSILON = 1e-4 N_CENTERS = 10 TOLERANCE = 1e-5 N_REPETITIONS = 20 N_MAX_ITERATIONS = 50000 N_STEPS = 10 def loss(y_pred, y_true, metric):...
"""Riemannian and pseudo-Riemannian metrics.""" import math import warnings import autograd import geomstats.backend as gs from geomstats.geometry.connection import Connection EPSILON = 1e-4 N_CENTERS = 10 TOLERANCE = 1e-5 N_REPETITIONS = 20 N_MAX_ITERATIONS = 50000 N_STEPS = 10 def loss(y_pred, y_true, metric):...
en
0.669076
Riemannian and pseudo-Riemannian metrics. Compute loss function between prediction and ground truth. Loss function given by a Riemannian metric, expressed as the squared geodesic distance between the prediction and the ground truth. Parameters ---------- y_pred y_true metric Retur...
3.063303
3
app/main/pages/instrument/hrs/red/order/plots.py
hettlage/salt-data-quality-site
0
5151
import pandas as pd from bokeh.models import HoverTool from bokeh.models.formatters import DatetimeTickFormatter from bokeh.palettes import Plasma256 from bokeh.plotting import figure, ColumnDataSource from app import db from app.decorators import data_quality # creates your plot date_formatter = DatetimeTickFormatt...
import pandas as pd from bokeh.models import HoverTool from bokeh.models.formatters import DatetimeTickFormatter from bokeh.palettes import Plasma256 from bokeh.plotting import figure, ColumnDataSource from app import db from app.decorators import data_quality # creates your plot date_formatter = DatetimeTickFormatt...
en
0.456864
# creates your plot Return a <div> element with the Order plot. The plot shows the HRS order for obsmode High, low and medium over time Params: ------- start_date: date Earliest date to include in the plot. end_date: date Earliest date not to include in the plot. Return: -...
2.63611
3
p6e8.py
yannickbf-prog/python
0
5152
<reponame>yannickbf-prog/python #<NAME>6e8 Escribe un programa que te pida primero un número y luego te pida números hasta que la suma de los números introducidos coincida con el número inicial. El programa termina escribiendo la lista de números. limite = int(input("Escribe limite:")) valores = int(input("Escrib...
#<NAME>6e8 Escribe un programa que te pida primero un número y luego te pida números hasta que la suma de los números introducidos coincida con el número inicial. El programa termina escribiendo la lista de números. limite = int(input("Escribe limite:")) valores = int(input("Escribe un valor:")) listavalores =...
es
0.95424
#<NAME>6e8 Escribe un programa que te pida primero un número y luego te pida números hasta que la suma de los números introducidos coincida con el número inicial. El programa termina escribiendo la lista de números.
4.049812
4
.venv/lib/python3.8/site-packages/cleo/application.py
RivtLib/replit01
1
5153
<gh_stars>1-10 from typing import Optional from typing import Tuple from clikit.console_application import ConsoleApplication from .commands import BaseCommand from .commands.completions_command import CompletionsCommand from .config import ApplicationConfig class Application(ConsoleApplication, object): ...
from typing import Optional from typing import Tuple from clikit.console_application import ConsoleApplication from .commands import BaseCommand from .commands.completions_command import CompletionsCommand from .config import ApplicationConfig class Application(ConsoleApplication, object): """ A...
en
0.704793
An Application is the container for a collection of commands. This class is optimized for a standard CLI environment. Usage: >>> app = Application('myapp', '1.0 (stable)') >>> app.add(HelpCommand()) >>> app.run() # type: (str, str, bool, Optional[ApplicationConfig]) -> None # type: (Tuple[B...
2.860468
3
simone/person/management.py
zuhalcakir/simone
16
5154
#from django.dispatch import dispatcher #def UserProfilePostInsert(sender, instance, signal, *args, **kwargs): #""" #Inserts a blank imap server entry (if necessary) and associates it with the user #""" #user = instance #i = user.get_profile().imap_servers.create() #user.get_profile().about = '...
#from django.dispatch import dispatcher #def UserProfilePostInsert(sender, instance, signal, *args, **kwargs): #""" #Inserts a blank imap server entry (if necessary) and associates it with the user #""" #user = instance #i = user.get_profile().imap_servers.create() #user.get_profile().about = '...
en
0.526779
#from django.dispatch import dispatcher #def UserProfilePostInsert(sender, instance, signal, *args, **kwargs): #""" #Inserts a blank imap server entry (if necessary) and associates it with the user #""" #user = instance #i = user.get_profile().imap_servers.create() #user.get_profile().about = 'test' #i.save() #user.sav...
2.320628
2
watcher/fly.py
cog-isa/htm-rl
1
5155
<filename>watcher/fly.py from utils.drawer import Drawer import argparse if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument("name", help="the name of the datafile") parser.add_argument("--size", help="width,height") args = parser.parse_args() if args.size is None: ...
<filename>watcher/fly.py from utils.drawer import Drawer import argparse if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument("name", help="the name of the datafile") parser.add_argument("--size", help="width,height") args = parser.parse_args() if args.size is None: ...
en
0.807958
# the main application loop
2.987763
3
test/unit/test_structures.py
ourobouros/aws-encryption-sdk-python
0
5156
<filename>test/unit/test_structures.py # Copyright 2017 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2....
<filename>test/unit/test_structures.py # Copyright 2017 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2....
en
0.874136
# Copyright 2017 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
1.701275
2
codes/utils/mygraph.py
CristianLazoQuispe/Datathon-Interbank-2020
0
5157
import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import numpy as np path_results = '../results/images/' # this function receives a dataset with binary target and it will graph a hist of values def graph_target(data,name="target",figsize=(6,4),title_name=None,color_text="white",save=False,name...
import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import numpy as np path_results = '../results/images/' # this function receives a dataset with binary target and it will graph a hist of values def graph_target(data,name="target",figsize=(6,4),title_name=None,color_text="white",save=False,name...
en
0.728357
# this function receives a dataset with binary target and it will graph a hist of values # one person per row # for Seaborn version 0.7 and more #fontsize=10 # plot histograms of train and test to understand the differences between them #rcc_train[(rcc_train.saldo>=0.2)&(rcc_train.saldo<3)].saldo.plot.hist(title="Fraud...
3.095818
3
src/pretix/base/validators.py
td00/pretix
0
5158
from django.core.exceptions import ValidationError from django.utils.deconstruct import deconstructible from django.utils.translation import ugettext_lazy as _ class BlacklistValidator: blacklist = [] def __call__(self, value): # Validation logic if value in self.blacklist: raise...
from django.core.exceptions import ValidationError from django.utils.deconstruct import deconstructible from django.utils.translation import ugettext_lazy as _ class BlacklistValidator: blacklist = [] def __call__(self, value): # Validation logic if value in self.blacklist: raise...
en
0.562826
# Validation logic
2.224942
2
fortnitepy/ext/commands/bot.py
gfdb/fortnitepy
127
5159
<filename>fortnitepy/ext/commands/bot.py<gh_stars>100-1000 """ The MIT License (MIT) Copyright (c) 2015-present Rapptz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, includi...
<filename>fortnitepy/ext/commands/bot.py<gh_stars>100-1000 """ The MIT License (MIT) Copyright (c) 2015-present Rapptz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, includi...
en
0.742219
The MIT License (MIT) Copyright (c) 2015-present Rapptz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, p...
1.793396
2
LeetCodeSolutions/python/64_Minimum_Path_Sum.py
ChuanleiGuo/AlgorithmsPlayground
1
5160
<filename>LeetCodeSolutions/python/64_Minimum_Path_Sum.py class Solution(object): def minPathSum(self, grid): """ :type grid: List[List[int]] :rtype: int """ m, n = len(grid), len(grid[0]) dp = [[0] * n for _ in range(m)] for i in range(m): for j i...
<filename>LeetCodeSolutions/python/64_Minimum_Path_Sum.py class Solution(object): def minPathSum(self, grid): """ :type grid: List[List[int]] :rtype: int """ m, n = len(grid), len(grid[0]) dp = [[0] * n for _ in range(m)] for i in range(m): for j i...
en
0.28359
:type grid: List[List[int]] :rtype: int
3.494737
3
paths_win.py
tankbusta/rescache
15
5161
import _winreg import os def get_shared_cache_folder(): """ Look in the registry for the configured cache folder. If there is no entry, then we create one. :return: """ _winreg.aReg = _winreg.ConnectRegistry(None, _winreg.HKEY_CURRENT_USER) try: key = _winreg.OpenKey(_winreg.aReg, ...
import _winreg import os def get_shared_cache_folder(): """ Look in the registry for the configured cache folder. If there is no entry, then we create one. :return: """ _winreg.aReg = _winreg.ConnectRegistry(None, _winreg.HKEY_CURRENT_USER) try: key = _winreg.OpenKey(_winreg.aReg, ...
en
0.817845
Look in the registry for the configured cache folder. If there is no entry, then we create one. :return:
2.700696
3
venv/lib/python3.8/site-packages/dateparser/data/date_translation_data/ebu.py
yuta-komura/vishnu
1
5162
<reponame>yuta-komura/vishnu # -*- coding: utf-8 -*- info = { "name": "ebu", "date_order": "DMY", "january": [ "mweri wa mbere", "mbe" ], "february": [ "mweri wa kaĩri", "kai" ], "march": [ "mweri wa kathatũ", "kat" ], "april": [ ...
# -*- coding: utf-8 -*- info = { "name": "ebu", "date_order": "DMY", "january": [ "mweri wa mbere", "mbe" ], "february": [ "mweri wa kaĩri", "kai" ], "march": [ "mweri wa kathatũ", "kat" ], "april": [ "mweri wa kana", "k...
en
0.769321
# -*- coding: utf-8 -*-
1.618051
2
deepa2/preptrain/__init__.py
debatelab/deepa2
0
5163
"""Preprocessing DeepA2 datasets for LM training""" # flake8: noqa from deepa2.preptrain.t2tpreprocessor import T2TPreprocessor
"""Preprocessing DeepA2 datasets for LM training""" # flake8: noqa from deepa2.preptrain.t2tpreprocessor import T2TPreprocessor
en
0.655583
Preprocessing DeepA2 datasets for LM training # flake8: noqa
1.108434
1
setup.py
martinfarrow/awspk
0
5164
#!/usr/bin/env python3 from setuptools import setup, find_packages setup(name='awspk', version='0.1', description='A aws cli pen knife with loads of interested stuff', author='<NAME>', author_email='<EMAIL>', py_modules=['awspk'], license='LICENSE', )
#!/usr/bin/env python3 from setuptools import setup, find_packages setup(name='awspk', version='0.1', description='A aws cli pen knife with loads of interested stuff', author='<NAME>', author_email='<EMAIL>', py_modules=['awspk'], license='LICENSE', )
fr
0.221828
#!/usr/bin/env python3
1.150155
1
pyclicker/lib/python3.7/site-packages/Xlib/display.py
JayRovacsek/pyautoclick
1
5165
# Xlib.display -- high level display object # # Copyright (C) 2000 <NAME> <<EMAIL>> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation; either version 2.1 # of the License, or (at your o...
# Xlib.display -- high level display object # # Copyright (C) 2000 <NAME> <<EMAIL>> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation; either version 2.1 # of the License, or (at your o...
en
0.8228
# Xlib.display -- high level display object # # Copyright (C) 2000 <NAME> <<EMAIL>> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation; either version 2.1 # of the License, or (at your o...
1.716928
2
Others/qupc/qupc2014/c/main.py
KATO-Hiro/AtCoder
2
5166
<reponame>KATO-Hiro/AtCoder<filename>Others/qupc/qupc2014/c/main.py # -*- coding: utf-8 -*- def main(): from string import ascii_uppercase n, m, q_large = map(int, input().split()) s = [list(input()) for _ in range(n)] q = [input() for _ in range(q_large)] pos = [None for _ in range(26)] for...
# -*- coding: utf-8 -*- def main(): from string import ascii_uppercase n, m, q_large = map(int, input().split()) s = [list(input()) for _ in range(n)] q = [input() for _ in range(q_large)] pos = [None for _ in range(26)] for i in range(n): for j in range(m): sij = s[i][j]...
en
0.769321
# -*- coding: utf-8 -*-
3.207169
3
NetCatKS/DProtocol/api/interfaces/subscribers/__init__.py
dimddev/NetCatKS-CP
0
5167
<filename>NetCatKS/DProtocol/api/interfaces/subscribers/__init__.py<gh_stars>0 __author__ = 'dimd' from zope.interface import Interface, Attribute class IBaseResourceSubscriber(Interface): """ IBaseResourceSubscriber provides functionality for comparison of the signature on a incoming request against a...
<filename>NetCatKS/DProtocol/api/interfaces/subscribers/__init__.py<gh_stars>0 __author__ = 'dimd' from zope.interface import Interface, Attribute class IBaseResourceSubscriber(Interface): """ IBaseResourceSubscriber provides functionality for comparison of the signature on a incoming request against a...
en
0.825823
IBaseResourceSubscriber provides functionality for comparison of the signature on a incoming request against a candidate DProtocol implementation registered as IJSONResource The `adapter` is our first argument in the constructor. It's used from the adapter pattern and have to be from type IJSONResource...
2.472362
2
analysis/notebooks/helper/anova.py
dpedrosac/DBSgait
1
5168
<reponame>dpedrosac/DBSgait<gh_stars>1-10 import numpy as np import pandas as pd from scipy.stats import f_oneway from typing import Dict, Tuple, Set def extract_significant_p(df: pd.DataFrame, p_value_limit: float): """Return a df, which replaces values that are above p_value_limit with `None`""" return ( ...
import numpy as np import pandas as pd from scipy.stats import f_oneway from typing import Dict, Tuple, Set def extract_significant_p(df: pd.DataFrame, p_value_limit: float): """Return a df, which replaces values that are above p_value_limit with `None`""" return ( df.loc(axis=1)[f"p-value"] ...
en
0.66873
Return a df, which replaces values that are above p_value_limit with `None` Calculate one-way anova using each column as a different measurement. Calculat a one-way anova for a single gait test and gait parameter. Parameters ---------- dataset A dictionary, where the keys are descriptions for diffe...
3.179275
3
bux_recorder/utils.py
roaldarbol/bux
0
5169
<gh_stars>0 import os import platform import time import csv import serial import cv2 import tkinter as tk from tkinter.filedialog import askdirectory from serial.tools import list_ports # From https://raspberrypi.stackexchange.com/a/118473 def is_raspberrypi(): try: with io.open('/sys/firmware/devicetree/...
import os import platform import time import csv import serial import cv2 import tkinter as tk from tkinter.filedialog import askdirectory from serial.tools import list_ports # From https://raspberrypi.stackexchange.com/a/118473 def is_raspberrypi(): try: with io.open('/sys/firmware/devicetree/base/model',...
en
0.850038
# From https://raspberrypi.stackexchange.com/a/118473 # get screen width and height # width of the screen # height of the screen # calculate x and y coordinates for the Tk root window Test the ports and returns a tuple with the available ports and the ones that are working. # if there are more than 5 non working ports ...
3.084613
3
a2e/optimizer/hpbandster/_model_worker.py
maechler/a2e
1
5170
<filename>a2e/optimizer/hpbandster/_model_worker.py from hpbandster.core.worker import Worker from a2e.model import AbstractModel from a2e.optimizer import EvaluationResultAggregator from a2e.utility import inf_nan_to_float_max class ModelWorker(Worker): def __init__( self, model: AbstractModel, ...
<filename>a2e/optimizer/hpbandster/_model_worker.py from hpbandster.core.worker import Worker from a2e.model import AbstractModel from a2e.optimizer import EvaluationResultAggregator from a2e.utility import inf_nan_to_float_max class ModelWorker(Worker): def __init__( self, model: AbstractModel, ...
none
1
2.190275
2
xagents/__init__.py
schissmantics/xagents
37
5171
from xagents import a2c, acer, ddpg, dqn, ppo, td3, trpo from xagents.a2c.agent import A2C from xagents.acer.agent import ACER from xagents.base import OffPolicy from xagents.ddpg.agent import DDPG from xagents.dqn.agent import DQN from xagents.ppo.agent import PPO from xagents.td3.agent import TD3 from xagents.trpo.ag...
from xagents import a2c, acer, ddpg, dqn, ppo, td3, trpo from xagents.a2c.agent import A2C from xagents.acer.agent import ACER from xagents.base import OffPolicy from xagents.ddpg.agent import DDPG from xagents.dqn.agent import DQN from xagents.ppo.agent import PPO from xagents.td3.agent import TD3 from xagents.trpo.ag...
none
1
1.901102
2
IsraeliQueue/__init__.py
YonLiud/Israeli-Queue
2
5172
from .IsraeliQueue import IsraeliQueue, Item, IsraeliQueueByType
from .IsraeliQueue import IsraeliQueue, Item, IsraeliQueueByType
none
1
1.108948
1
examples/MMPT/mmpt_cli/localjob.py
Este1le/fairseq
0
5173
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import os from mmpt.utils import recursive_config class BaseJob(object): def __init__(self, yaml_file, dryrun=False): self.yaml_...
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import os from mmpt.utils import recursive_config class BaseJob(object): def __init__(self, yaml_file, dryrun=False): self.yaml_...
en
0.895115
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # append fairseq args. # a list of binary flag.
1.861921
2
tron/Nubs/deprecated/tcc25m-old.py
sdss/tron
0
5174
import os.path from tron import g, hub from tron.Hub.Command.Encoders.ASCIICmdEncoder import ASCIICmdEncoder from tron.Hub.Nub.TCCShellNub import TCCShellNub from tron.Hub.Reply.Decoders.ASCIIReplyDecoder import ASCIIReplyDecoder name = 'tcc' def start(poller): stop() initCmds = ('show version', 'show us...
import os.path from tron import g, hub from tron.Hub.Command.Encoders.ASCIICmdEncoder import ASCIICmdEncoder from tron.Hub.Nub.TCCShellNub import TCCShellNub from tron.Hub.Reply.Decoders.ASCIIReplyDecoder import ASCIIReplyDecoder name = 'tcc' def start(poller): stop() initCmds = ('show version', 'show us...
none
1
2.01171
2
src/PtDb/test.py
ptphp/PyLib
1
5175
<gh_stars>1-10 #!/usr/bin/env python # -*- coding=utf-8 -*- ''' Created on 2013-3-31 @author: Joseph ''' import PtDb if __name__ == '__main__': PtDb.config = { 'sqlite':{ 'type':'sqlite', 'dbname':"data1.db" ...
#!/usr/bin/env python # -*- coding=utf-8 -*- ''' Created on 2013-3-31 @author: Joseph ''' import PtDb if __name__ == '__main__': PtDb.config = { 'sqlite':{ 'type':'sqlite', 'dbname':"data1.db" }, ...
en
0.503079
#!/usr/bin/env python # -*- coding=utf-8 -*- Created on 2013-3-31 @author: Joseph
2.546211
3
services/object_storage/tests/integ/test_object_storage_bulk_operations.py
honzajavorek/oci-cli
0
5176
# coding: utf-8 # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. import filecmp import json import pytest import oci import services.object_storage.src.oci_cli_object_storage as oci_cli_object_storage import os import random import shutil import six import string from tests import util fr...
# coding: utf-8 # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. import filecmp import json import pytest import oci import services.object_storage.src.oci_cli_object_storage as oci_cli_object_storage import os import random import shutil import six import string from tests import util fr...
en
0.916754
# coding: utf-8 # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. # Default multipart is 128MiB # Holds the objects we create and their content so that we can verify results # Generate test data for different operations: # # Bulk Get: create a new bucket and populate it with some objects...
2.134039
2
Extras/benchmark/simple-benchmark.py
yunhaom94/redis-writeanywhere
0
5177
#!/usr/bin/python3 import random import string import time import subprocess import os import redis import threading def generate_string(string_size, size, dict): ''' https://stackoverflow.com/questions/16308989/fastest-method-to-generate-big-random-string-with-lower-latin-letters ''' for i in ran...
#!/usr/bin/python3 import random import string import time import subprocess import os import redis import threading def generate_string(string_size, size, dict): ''' https://stackoverflow.com/questions/16308989/fastest-method-to-generate-big-random-string-with-lower-latin-letters ''' for i in ran...
en
0.490024
#!/usr/bin/python3 https://stackoverflow.com/questions/16308989/fastest-method-to-generate-big-random-string-with-lower-latin-letters # convert 0..255 to 97..122 # TODO: make is an command line argument
3.122645
3
challenges/015-setintersection.py
Widdershin/CodeEval
0
5178
<reponame>Widdershin/CodeEval """ https://www.codeeval.com/browse/30/ Set Intersection Challenge Description: You are given two sorted list of numbers (ascending order). The lists themselves are comma delimited and the two lists are semicolon delimited. Print out the intersection of these two sets. Inp...
""" https://www.codeeval.com/browse/30/ Set Intersection Challenge Description: You are given two sorted list of numbers (ascending order). The lists themselves are comma delimited and the two lists are semicolon delimited. Print out the intersection of these two sets. Input Sample: File containin...
en
0.725438
https://www.codeeval.com/browse/30/ Set Intersection Challenge Description: You are given two sorted list of numbers (ascending order). The lists themselves are comma delimited and the two lists are semicolon delimited. Print out the intersection of these two sets. Input Sample: File containing tw...
4.210856
4
python/arch/api/table/session.py
GentleWang1011/eggroll
1
5179
<gh_stars>1-10 # # Copyright 2019 The FATE 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 re...
# # Copyright 2019 The FATE 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 appli...
en
0.49936
# # Copyright 2019 The FATE 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 appli...
1.798454
2
experiments/vitchyr/vaes/learn_swirl_vae.py
Asap7772/rail-rl-franka-eval
0
5180
""" VAE on the swirl task. Basically, VAEs don't work. It's probably because the prior isn't very good and/or because the learning signal is pretty weak when both the encoder and decoder change quickly. However, I tried also alternating between the two, and that didn't seem to help. """ from torch.distributions import...
""" VAE on the swirl task. Basically, VAEs don't work. It's probably because the prior isn't very good and/or because the learning signal is pretty weak when both the encoder and decoder change quickly. However, I tried also alternating between the two, and that didn't seem to help. """ from torch.distributions import...
en
0.906491
VAE on the swirl task. Basically, VAEs don't work. It's probably because the prior isn't very good and/or because the learning signal is pretty weak when both the encoder and decoder change quickly. However, I tried also alternating between the two, and that didn't seem to help. KL between a Gaussian and a standard Ga...
2.51128
3
litex/build/openfpgaloader.py
JosephBushagour/litex
0
5181
# # This file is part of LiteX. # # Copyright (c) 2020 <NAME> <<EMAIL>> # SPDX-License-Identifier: BSD-2-Clause from litex.build.tools import write_to_file from litex.build.generic_programmer import GenericProgrammer # openFPGAloader ------------------------------------------------------------------------------------...
# # This file is part of LiteX. # # Copyright (c) 2020 <NAME> <<EMAIL>> # SPDX-License-Identifier: BSD-2-Clause from litex.build.tools import write_to_file from litex.build.generic_programmer import GenericProgrammer # openFPGAloader ------------------------------------------------------------------------------------...
en
0.358886
# # This file is part of LiteX. # # Copyright (c) 2020 <NAME> <<EMAIL>> # SPDX-License-Identifier: BSD-2-Clause # openFPGAloader ------------------------------------------------------------------------------------------
2.292304
2
NutriBuddiAPIServices/ImageClassifier/NutriBuddiClassifier/Classifier/FoodClassifier.py
NutriBuddi/NutriBuddi
2
5182
class FoodClassifier: #Class Attributes: #model - the underlying keras model #labels - the labels to be associated with the activation of each output neuron. #Labels must be the same size as the output layer of the neural network. def __init__(self, modelpath, labels, min_confidence =...
class FoodClassifier: #Class Attributes: #model - the underlying keras model #labels - the labels to be associated with the activation of each output neuron. #Labels must be the same size as the output layer of the neural network. def __init__(self, modelpath, labels, min_confidence =...
en
0.823292
#Class Attributes: #model - the underlying keras model #labels - the labels to be associated with the activation of each output neuron. #Labels must be the same size as the output layer of the neural network. #its a file path #check if image is a filepath #if its a filepath, convert to PIL image #resize image #shape fr...
3.37012
3
freehackquest_libclient_py/__init__.py
freehackquest/libfhqcli-py
0
5183
<reponame>freehackquest/libfhqcli-py #!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2020-2021 FreeHackQuest Team <<EMAIL>> """This file was automatically generated by fhq-server Version: v0.2.47 Date: 2022-01-01 07:15:35 """ from freehackquest_libclient_py.freehackquest_client import FreeHackQuestClient...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2020-2021 FreeHackQuest Team <<EMAIL>> """This file was automatically generated by fhq-server Version: v0.2.47 Date: 2022-01-01 07:15:35 """ from freehackquest_libclient_py.freehackquest_client import FreeHackQuestClient
en
0.543271
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2020-2021 FreeHackQuest Team <<EMAIL>> This file was automatically generated by fhq-server Version: v0.2.47 Date: 2022-01-01 07:15:35
1.015885
1
exchange_sockets/bitstamp_websocket.py
SpiralDevelopment/crypto-hft-data
31
5184
from exchange_sockets.exchange_websocket import ExchangeWebSocket from singletones.custom_logger import MyLogger import websocket import threading from time import sleep from time import time import json import ssl logger = MyLogger() class BitstampWebsocket(ExchangeWebSocket): def __init__(self, pairs_n_stream...
from exchange_sockets.exchange_websocket import ExchangeWebSocket from singletones.custom_logger import MyLogger import websocket import threading from time import sleep from time import time import json import ssl logger = MyLogger() class BitstampWebsocket(ExchangeWebSocket): def __init__(self, pairs_n_stream...
en
0.893102
# Wait for connect before continuing
2.370698
2
src/data_loading.py
katerakelly/pytorch-maml
565
5185
<gh_stars>100-1000 import numpy as np import random import torch from torch.utils.data import DataLoader from torch.utils.data.sampler import Sampler import torchvision.transforms as transforms from dataset import Omniglot, MNIST ''' Helpers for loading class-balanced few-shot tasks from datasets ''' class ClassBal...
import numpy as np import random import torch from torch.utils.data import DataLoader from torch.utils.data.sampler import Sampler import torchvision.transforms as transforms from dataset import Omniglot, MNIST ''' Helpers for loading class-balanced few-shot tasks from datasets ''' class ClassBalancedSampler(Sample...
en
0.877521
Helpers for loading class-balanced few-shot tasks from datasets Samples class-balanced batches from 'num_cl' pools each of size 'num_inst' If 'batch_cutoff' is None, indices for iterating over batches of the entire dataset will be returned Otherwise, indices for the number of batches up to the batch_cut...
2.81635
3
DoChaP-db/UnusedScripts/main.py
Tal-Shay-Group/DoChaP
2
5186
<filename>DoChaP-db/UnusedScripts/main.py<gh_stars>1-10 #!/usr/bin/python import sys import os sys.path.append(os.getcwd()) from Director import Director from OrthologsBuilder import * from SpeciesDB import * if __name__ == "__main__": inputDict = {} for inarg in sys.argv[1:]: try: splitAr...
<filename>DoChaP-db/UnusedScripts/main.py<gh_stars>1-10 #!/usr/bin/python import sys import os sys.path.append(os.getcwd()) from Director import Director from OrthologsBuilder import * from SpeciesDB import * if __name__ == "__main__": inputDict = {} for inarg in sys.argv[1:]: try: splitAr...
ru
0.258958
#!/usr/bin/python
2.275724
2
tests/constants.py
eigenein/sqlitemap
4
5187
# See also: https://stackoverflow.com/questions/3694276/what-are-valid-table-names-in-sqlite good_table_names = [ 'foo', '123abc', '123abc.txt', '123abc-ABC.txt', 'foo""bar', '😀', '_sqlite', ] # See also: https://stackoverflow.com/questions/3694276/what-are-valid-table-names-in-sqlite bad_...
# See also: https://stackoverflow.com/questions/3694276/what-are-valid-table-names-in-sqlite good_table_names = [ 'foo', '123abc', '123abc.txt', '123abc-ABC.txt', 'foo""bar', '😀', '_sqlite', ] # See also: https://stackoverflow.com/questions/3694276/what-are-valid-table-names-in-sqlite bad_...
en
0.645837
# See also: https://stackoverflow.com/questions/3694276/what-are-valid-table-names-in-sqlite # See also: https://stackoverflow.com/questions/3694276/what-are-valid-table-names-in-sqlite
1.52876
2
TWLight/settings/base.py
amire80/TWLight
0
5188
<filename>TWLight/settings/base.py # -*- coding: utf-8 -*- """ Base settings for twlight project. This is not intended to be used as the live settings file for a project and will not work as one. You should instead use production.py, local.py, heroku.py, or another file that you write. These files should live in the s...
<filename>TWLight/settings/base.py # -*- coding: utf-8 -*- """ Base settings for twlight project. This is not intended to be used as the live settings file for a project and will not work as one. You should instead use production.py, local.py, heroku.py, or another file that you write. These files should live in the s...
en
0.591551
# -*- coding: utf-8 -*- Base settings for twlight project. This is not intended to be used as the live settings file for a project and will not work as one. You should instead use production.py, local.py, heroku.py, or another file that you write. These files should live in the settings directory; start with 'from .ba...
1.737032
2
modelator_py/util/tla/_optable.py
informalsystems/modelator-py
0
5189
<reponame>informalsystems/modelator-py """Table of operators.""" # Copyright 2020 by California Institute of Technology # Copyright (c) 2008-2013 INRIA and Microsoft Corporation # All rights reserved. Licensed under 3-clause BSD. # # This module is based on the file: # # <https://github.com/tlaplus/tlapm/blob/main/src...
"""Table of operators.""" # Copyright 2020 by California Institute of Technology # Copyright (c) 2008-2013 INRIA and Microsoft Corporation # All rights reserved. Licensed under 3-clause BSD. # # This module is based on the file: # # <https://github.com/tlaplus/tlapm/blob/main/src/optable.ml> # import pprint from .ast...
en
0.539584
Table of operators. # Copyright 2020 by California Institute of Technology # Copyright (c) 2008-2013 INRIA and Microsoft Corporation # All rights reserved. Licensed under 3-clause BSD. # # This module is based on the file: # # <https://github.com/tlaplus/tlapm/blob/main/src/optable.ml> # # open Builtin # type fixity =...
2.27708
2
DIE/UI/FunctionViewEx.py
a1ext/DIE
5
5190
<filename>DIE/UI/FunctionViewEx.py<gh_stars>1-10 import networkx as nx from awesome.context import ignored import sark import idaapi import idautils import idc from idaapi import PluginForm from sark.qt import QtGui, QtCore, QtWidgets, form_to_widget, use_qt5 if use_qt5: _QSortFilterProxyModel = QtCore...
<filename>DIE/UI/FunctionViewEx.py<gh_stars>1-10 import networkx as nx from awesome.context import ignored import sark import idaapi import idautils import idc from idaapi import PluginForm from sark.qt import QtGui, QtCore, QtWidgets, form_to_widget, use_qt5 if use_qt5: _QSortFilterProxyModel = QtCore...
en
0.380119
DIE Function View # Reset highlighted items Called when the plugin form is created # Get parent widget #self.functionTreeView.setSortingEnabled(True) # Context menus # Actions # Parameter to be passed to context menu slots # Function ContextMenu # Function ea ContextMenu # Argument value ContextMenu # Therad ComboBox #...
1.930466
2
peerbot/PeerBot.py
danerprog/PeerHostedDiscordBot
0
5191
<reponame>danerprog/PeerHostedDiscordBot from peerbot.PeerBotStateMachine import PeerBotStateMachine from utils.Logger import Logger import discord class PeerBot(discord.Client): def __init__(self, args): self.args = args self.isBotReady = False super().__init__() async d...
from peerbot.PeerBotStateMachine import PeerBotStateMachine from utils.Logger import Logger import discord class PeerBot(discord.Client): def __init__(self, args): self.args = args self.isBotReady = False super().__init__() async def on_ready(self): stringifiedUse...
none
1
2.506175
3
dags/oss_know/oss_know_dags/dags_github/dag_github_init_issues_timeline.py
ynang/airflow-jobs-1
4
5192
from datetime import datetime from airflow import DAG from airflow.operators.python import PythonOperator # v0.0.1 from oss_know.libs.base_dict.variable_key import NEED_INIT_GITHUB_ISSUES_TIMELINE_REPOS, GITHUB_TOKENS, \ OPENSEARCH_CONN_DATA, PROXY_CONFS from oss_know.libs.util.proxy import KuaiProxyService, Prox...
from datetime import datetime from airflow import DAG from airflow.operators.python import PythonOperator # v0.0.1 from oss_know.libs.base_dict.variable_key import NEED_INIT_GITHUB_ISSUES_TIMELINE_REPOS, GITHUB_TOKENS, \ OPENSEARCH_CONN_DATA, PROXY_CONFS from oss_know.libs.util.proxy import KuaiProxyService, Prox...
en
0.859786
# v0.0.1 # since = params["since"]
2.211363
2
conans/conan.py
laundry-96/conan
2
5193
<reponame>laundry-96/conan import sys from conans.client.command import main def run(): main(sys.argv[1:]) if __name__ == '__main__': run()
import sys from conans.client.command import main def run(): main(sys.argv[1:]) if __name__ == '__main__': run()
none
1
1.45495
1
tests/apps/persons/test_cms_plugins_person.py
lunika/richie
0
5194
# -*- coding: utf-8 -*- """ Unit tests for the Person plugin and its model """ from django import forms from django.conf import settings from django.test import TestCase from cms.api import add_plugin, create_page from cmsplugin_plain_text.cms_plugins import PlaintextPlugin from djangocms_picture.cms_plugins import Pi...
# -*- coding: utf-8 -*- """ Unit tests for the Person plugin and its model """ from django import forms from django.conf import settings from django.test import TestCase from cms.api import add_plugin, create_page from cmsplugin_plain_text.cms_plugins import PlaintextPlugin from djangocms_picture.cms_plugins import Pi...
en
0.807035
# -*- coding: utf-8 -*- Unit tests for the Person plugin and its model Test that PersonPlugin correctly displays a Person's page placeholders content The form to create a person plugin should only list person pages in the select box. A form for testing the choices in the select box Test that a PersonPlugin correctly re...
2.349411
2
mathics/core/subexpression.py
Mathics3/mathics-core
90
5195
# cython: language_level=3 # -*- coding: utf-8 -*- from mathics.core.expression import Expression from mathics.core.symbols import Atom, Symbol from mathics.core.atoms import Integer from mathics.builtin.base import MessageException """ This module provides some infrastructure to deal with SubExpressions. """ def...
# cython: language_level=3 # -*- coding: utf-8 -*- from mathics.core.expression import Expression from mathics.core.symbols import Atom, Symbol from mathics.core.atoms import Integer from mathics.builtin.base import MessageException """ This module provides some infrastructure to deal with SubExpressions. """ def...
en
0.763983
# cython: language_level=3 # -*- coding: utf-8 -*- This module provides some infrastructure to deal with SubExpressions. This function takes an expression and a Mathics `Span` Expression and returns a tuple with the positions of the leaves. # index 0 is undefined This class represents a reference to a leaf in a...
2.765626
3
pyopenproject/business/services/command/configuration/find.py
webu/pyopenproject
5
5196
<filename>pyopenproject/business/services/command/configuration/find.py<gh_stars>1-10 from pyopenproject.api_connection.exceptions.request_exception import RequestError from pyopenproject.api_connection.requests.get_request import GetRequest from pyopenproject.business.exception.business_error import BusinessError from...
<filename>pyopenproject/business/services/command/configuration/find.py<gh_stars>1-10 from pyopenproject.api_connection.exceptions.request_exception import RequestError from pyopenproject.api_connection.requests.get_request import GetRequest from pyopenproject.business.exception.business_error import BusinessError from...
en
0.735155
Constructor for class Find, from ConfigurationCommand. :param connection: The connection data
2.609202
3
lib/python/treadmill/tests/api/cell_test.py
vrautela/treadmill
1
5197
<gh_stars>1-10 """Cell API tests. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import unittest import mock from treadmill import admin from treadmill.api import cell class ApiCellTest(unittest.TestCase): ...
"""Cell API tests. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import unittest import mock from treadmill import admin from treadmill.api import cell class ApiCellTest(unittest.TestCase): """treadmill....
en
0.490379
Cell API tests. treadmill.api.cell tests. Dummy test for treadmill.api.cell._list() Dummy test for treadmill.api.cell.get() Dummy test for treadmill.api.cell.create()
2.587017
3
src/python_package/__init__.py
microsoft/ai-python-package
3
5198
<filename>src/python_package/__init__.py<gh_stars>1-10 # ------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See LICENSE in project root for information. # ----------------------------------------------------...
<filename>src/python_package/__init__.py<gh_stars>1-10 # ------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See LICENSE in project root for information. # ----------------------------------------------------...
en
0.466037
# ------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See LICENSE in project root for information. # ------------------------------------------------------------- Python Package Template
1.789952
2
tests/test_integration_partition.py
themoodymann/piChain
8
5199
<gh_stars>1-10 """Integration test: Test partition of piChain nodes. Note: run tests with default setting values in config.py. """ import time from tests.util import MultiNodeTest class MultiNodeTestPartition(MultiNodeTest): def test_scenario30_partition(self): self.start_processes_with_test_scenario(3...
"""Integration test: Test partition of piChain nodes. Note: run tests with default setting values in config.py. """ import time from tests.util import MultiNodeTest class MultiNodeTestPartition(MultiNodeTest): def test_scenario30_partition(self): self.start_processes_with_test_scenario(30, 5) t...
en
0.640557
Integration test: Test partition of piChain nodes. Note: run tests with default setting values in config.py.
2.629528
3