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
util/version.py
DevEliran/news-aggregator
0
6621551
""" Current Fuse version """ VERSION = "1.0.1"
""" Current Fuse version """ VERSION = "1.0.1"
en
0.797927
Current Fuse version
1.052147
1
variants/gan-weightnorm/model.py
Robin-ML/gan
2
6621552
import torch import torch.nn as nn import torch.nn.functional as F import modules class Discriminator(nn.Module): def __init__(self, w_in, h_in, num_features, num_blocks): super(Discriminator, self).__init__() f_prev = 3 w = w_in h = h_in self.net = nn.Sequential() for i in range(len(num_features)): ...
import torch import torch.nn as nn import torch.nn.functional as F import modules class Discriminator(nn.Module): def __init__(self, w_in, h_in, num_features, num_blocks): super(Discriminator, self).__init__() f_prev = 3 w = w_in h = h_in self.net = nn.Sequential() for i in range(len(num_features)): ...
none
1
2.409473
2
containerd/types/descriptor_pb2.py
neuro-inc/platform-container-runtime
0
6621553
<gh_stars>0 # Generated by the protocol buffer compiler. DO NOT EDIT! # source: containerd/types/descriptor.proto """Generated protocol buffer code.""" from google.protobuf import ( descriptor as _descriptor, message as _message, reflection as _reflection, symbol_database as _symbol_database, ) # @@pr...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: containerd/types/descriptor.proto """Generated protocol buffer code.""" from google.protobuf import ( descriptor as _descriptor, message as _message, reflection as _reflection, symbol_database as _symbol_database, ) # @@protoc_inserti...
en
0.379362
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: containerd/types/descriptor.proto Generated protocol buffer code. # @@protoc_insertion_point(imports) # @@protoc_insertion_point(class_scope:containerd.types.Descriptor.AnnotationsEntry) # @@protoc_insertion_point(class_scope:containerd.types.Descript...
1.134596
1
ror/slope_constraints.py
jakub-tomczak/ror
0
6621554
import logging from ror.Relation import Relation from ror.Dataset import Dataset from typing import List, Tuple from ror.Constraint import Constraint, ConstraintVariable, ConstraintVariablesSet, ValueConstraintVariable import numpy as np # difference of 2 values greater than DIFF_EPS indicates that they are different...
import logging from ror.Relation import Relation from ror.Dataset import Dataset from typing import List, Tuple from ror.Constraint import Constraint, ConstraintVariable, ConstraintVariablesSet, ValueConstraintVariable import numpy as np # difference of 2 values greater than DIFF_EPS indicates that they are different...
en
0.855065
# difference of 2 values greater than DIFF_EPS indicates that they are different Returns slope constraint or None if there would be division by 0 (in case when g_i(l) == g_i(l-1) or g_i(l-1) == g_i(l-2)) Slope constraint is meeting the requirement | z - w | <= rho This constraint minimizes the differences betwe...
2.570142
3
src/main.py
westernmagic/outer_ear
0
6621555
#!/usr/bin/env python ''' Outer ear simulator Author: <NAME> <<EMAIL>> Version: 1.0.0 Data: 2019-09-09 ''' from typing import Tuple import numpy as np import scipy.io.wavfile as wav import scipy.signal as ss from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter from pysofaconventions import SOFAFile def...
#!/usr/bin/env python ''' Outer ear simulator Author: <NAME> <<EMAIL>> Version: 1.0.0 Data: 2019-09-09 ''' from typing import Tuple import numpy as np import scipy.io.wavfile as wav import scipy.signal as ss from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter from pysofaconventions import SOFAFile def...
en
0.775138
#!/usr/bin/env python Outer ear simulator Author: <NAME> <<EMAIL>> Version: 1.0.0 Data: 2019-09-09 Apply effects of the head (HRTF) # find closest position to requested azimuth and elevation # TODO: consider normalizing position units to eg. degrees Apply effects of the ear canal Modeled as a bandpass filter, as ...
2.487645
2
main.py
ProfessorBeekums/mtg-deck-stats
0
6621556
import json import random import sys import time import deck_stats.deck as deck def analyze(deck_json): my_deck = deck.Deck(deck_json) # don't show dozens/hundreds of hands with less than 1% chance of occuring num_hands_to_print = 9000 total_runs = 10000 opening_hand_mana = {} for step in range(0, total_runs)...
import json import random import sys import time import deck_stats.deck as deck def analyze(deck_json): my_deck = deck.Deck(deck_json) # don't show dozens/hundreds of hands with less than 1% chance of occuring num_hands_to_print = 9000 total_runs = 10000 opening_hand_mana = {} for step in range(0, total_runs)...
en
0.884228
# don't show dozens/hundreds of hands with less than 1% chance of occuring # TODO do we want to clone? shuffle modifies original # TODO do we need true randomness? Does this match Magic Arena's algorithm for randomness? # use shuffle instead of sample so we can see what next turns will look like # count mana in opening...
3.299881
3
src/reminder/models.py
arnulfojr/sanic-persistance-patterns
0
6621557
class MixinModel(dict): __tablename__ = 'mixin_model' @classmethod def schema(cls): raise NotImplemented class Reminder(MixinModel): """Reminder object.""" __tablename__ = 'reminders' @classmethod def schema(cls): return { 'TableName': cls.__tablename__, ...
class MixinModel(dict): __tablename__ = 'mixin_model' @classmethod def schema(cls): raise NotImplemented class Reminder(MixinModel): """Reminder object.""" __tablename__ = 'reminders' @classmethod def schema(cls): return { 'TableName': cls.__tablename__, ...
en
0.653751
Reminder object.
2.456501
2
memory_reader/stat_mappings.py
sparkie3/MF_run_counter
43
6621558
<filename>memory_reader/stat_mappings.py import csv from init import media_path def load_stat_map(): with open(media_path + 'stat_map.csv', 'r') as fo: out = {int(row['ID']): row for row in csv.DictReader(fo)} return out SKILLTABS = { 0: 'Bow Skills (Ama)', 1: 'PM Skills (Ama)', 2: 'Java...
<filename>memory_reader/stat_mappings.py import csv from init import media_path def load_stat_map(): with open(media_path + 'stat_map.csv', 'r') as fo: out = {int(row['ID']): row for row in csv.DictReader(fo)} return out SKILLTABS = { 0: 'Bow Skills (Ama)', 1: 'PM Skills (Ama)', 2: 'Java...
none
1
3.230723
3
server/tank.py
jacobrec/little-tanks
0
6621559
<reponame>jacobrec/little-tanks import json class Tank: def __init__(self, conn, pos, angle): self.conn = conn self.pos = pos self.angle = angle def send_update(self): self.conn.write_message(self) def __str__(self): return json.dumps({ "pos": self.pos...
import json class Tank: def __init__(self, conn, pos, angle): self.conn = conn self.pos = pos self.angle = angle def send_update(self): self.conn.write_message(self) def __str__(self): return json.dumps({ "pos": self.pos, "angle": self.angl...
none
1
2.952393
3
prcdns/__init__.py
Kiterepo/prc-dns
52
6621560
from . import index, white_domain
from . import index, white_domain
none
1
1.038747
1
history_generator/plan.py
ReedOei/History-Generator
19
6621561
<gh_stars>10-100 class Plan: def __init__(self, parent, nation): self.parent = parent self.nation = nation def build_plan(self): return
class Plan: def __init__(self, parent, nation): self.parent = parent self.nation = nation def build_plan(self): return
none
1
2.648461
3
lcm/workflows/graphflow/task/lcm_sync_rest_task.py
onap/vfc-nfvo-lcm
4
6621562
# Copyright 2018 ZTE Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
# Copyright 2018 ZTE Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
en
0.857076
# Copyright 2018 ZTE Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
1.851094
2
mytest004.py
ShuailingZhao/mccnn
0
6621563
<reponame>ShuailingZhao/mccnn<gh_stars>0 #!/usr/bin/python def printme( str ): print str; return;
#!/usr/bin/python def printme( str ): print str; return;
ru
0.258958
#!/usr/bin/python
1.720785
2
Level25.py
z-Wind/Python_Challenge
0
6621564
<gh_stars>0 #!/usr/bin/env python # -*- coding: utf-8 -*- """http://www.pythonchallenge.com/pc/hex/lake.html""" __author__ = "子風" __copyright__ = "Copyright 2015, Sun All rights reserved" __version__ = "1.0.0" import get_challenge import wave wavs = [wave.open(get_challenge.download('butter', 'fly', 'http...
#!/usr/bin/env python # -*- coding: utf-8 -*- """http://www.pythonchallenge.com/pc/hex/lake.html""" __author__ = "子風" __copyright__ = "Copyright 2015, Sun All rights reserved" __version__ = "1.0.0" import get_challenge import wave wavs = [wave.open(get_challenge.download('butter', 'fly', 'http://www.pytho...
en
0.309463
#!/usr/bin/env python # -*- coding: utf-8 -*- http://www.pythonchallenge.com/pc/hex/lake.html
2.568923
3
cart/views.py
saptarsi96/FreshExpress
0
6621565
<filename>cart/views.py from django.http.response import HttpResponse from django.shortcuts import render, get_object_or_404, redirect from cart.cart import Cart from store.models import Product from django.contrib import messages from django.contrib.auth.decorators import login_required from django.views.decorators.ht...
<filename>cart/views.py from django.http.response import HttpResponse from django.shortcuts import render, get_object_or_404, redirect from cart.cart import Cart from store.models import Product from django.contrib import messages from django.contrib.auth.decorators import login_required from django.views.decorators.ht...
en
0.968116
# Create your views here.
2.118001
2
kubuculum/statistics/stats_splitter/stats_splitter.py
manojtpillai/kubuculum
3
6621566
import logging import os import kubuculum.statistics.util_functions from kubuculum import util_functions logger = logging.getLogger (__name__) class stats_splitter: def __init__ (self, run_dir, params_dict, globals): # get directory pathname for module self.dirpath = os.path.dirname (os.path.ab...
import logging import os import kubuculum.statistics.util_functions from kubuculum import util_functions logger = logging.getLogger (__name__) class stats_splitter: def __init__ (self, run_dir, params_dict, globals): # get directory pathname for module self.dirpath = os.path.dirname (os.path.ab...
en
0.272233
# get directory pathname for module # update params # stats_dict is of the form: stats_module: {dict_of_params}
2.297344
2
fem/base_app/gui/main_window/base_beta_menu.py
mjredmond/FEMApp
1
6621567
<reponame>mjredmond/FEMApp from __future__ import print_function, absolute_import import sys import os.path from qtpy import QtGui, QtCore, QtWidgets from fem.base_app.configuration import BaseConfiguration from fem.utilities import BaseObject class BaseBetaMenu(BaseObject): BaseConfiguration = BaseConfigurati...
from __future__ import print_function, absolute_import import sys import os.path from qtpy import QtGui, QtCore, QtWidgets from fem.base_app.configuration import BaseConfiguration from fem.utilities import BaseObject class BaseBetaMenu(BaseObject): BaseConfiguration = BaseConfiguration def __init__(self, ...
en
0.202157
:type: QtWidgets.QMenuBar
2.169497
2
Tools/Scenarios/strip_code_tex.py
ErQing/Nova
212
6621568
#!/usr/bin/env python3 import re from luaparser import astnodes from nova_script_parser import (get_node_name, normalize_dialogue, parse_chapters, walk_functions) in_filename = 'scenario.txt' out_filename = 'scenario_no_code.tex' translate_data = [ ('room', '房间'), ] translate_dat...
#!/usr/bin/env python3 import re from luaparser import astnodes from nova_script_parser import (get_node_name, normalize_dialogue, parse_chapters, walk_functions) in_filename = 'scenario.txt' out_filename = 'scenario_no_code.tex' translate_data = [ ('room', '房间'), ] translate_dat...
en
0.137602
#!/usr/bin/env python3 #_{}': \documentclass{article} \usepackage[a4paper,left=1in,right=1in,top=1in,bottom=1in]{geometry} \usepackage[hidelinks]{hyperref} \usepackage{xcolor} \usepackage{xeCJK} \setlength{\parindent}{0pt} \setlength{\parskip}{1ex}
2.811481
3
src/import_mat.py
JVini98/Synthetic_ECG
0
6621569
import scipy from scipy import signal from scipy.io import loadmat import pandas as pd import os import shutil import matplotlib.pyplot as plt import numpy as np out_dir = "/home/jvini/PycharmProjects/TFG_ECG/formated_data_AF_filtered" os.makedirs(out_dir, exist_ok=True) df = pd.read_csv(r'/home/jvini/PycharmProject...
import scipy from scipy import signal from scipy.io import loadmat import pandas as pd import os import shutil import matplotlib.pyplot as plt import numpy as np out_dir = "/home/jvini/PycharmProjects/TFG_ECG/formated_data_AF_filtered" os.makedirs(out_dir, exist_ok=True) df = pd.read_csv(r'/home/jvini/PycharmProject...
sr
0.203548
shutil.copy(f'{out_dir}/{10001 + af_files_counter * 10}.asc', f'{out_dir}/{10002 + af_files_counter * 10}.asc') shutil.copy(f'{out_dir}/{10001 + af_files_counter * 10}.asc', f'{out_dir}/{10003 + af_files_counter * 10}.asc') shutil.copy(f'{out_dir}/...
2.309929
2
tasks/func/_tree.py
AntonObersteiner/python-lessons
0
6621570
import turtle turtle.speed(0) turtle.delay(0) turtle.tracer(0, 0) angle = 20 length = 50 inner = .9 * length shrink = .8 leaf_width = 5 def segment(depth = 0, max_depth = 5): if depth == max_depth: turtle.fillcolor(0, depth / max_depth, 0) turtle.begin_fill() turtle.right(30) tur...
import turtle turtle.speed(0) turtle.delay(0) turtle.tracer(0, 0) angle = 20 length = 50 inner = .9 * length shrink = .8 leaf_width = 5 def segment(depth = 0, max_depth = 5): if depth == max_depth: turtle.fillcolor(0, depth / max_depth, 0) turtle.begin_fill() turtle.right(30) tur...
none
1
3.660294
4
2018/05/alchemical_reduction.py
GeoffRiley/AdventOfCode
2
6621571
<filename>2018/05/alchemical_reduction.py def react_all(new_str): done = False while not done: done = True old_str = new_str last_char = old_str[0] new_str = '' skip = 0 for char in old_str[1:]: if skip > 0: skip -= 1 la...
<filename>2018/05/alchemical_reduction.py def react_all(new_str): done = False while not done: done = True old_str = new_str last_char = old_str[0] new_str = '' skip = 0 for char in old_str[1:]: if skip > 0: skip -= 1 la...
en
0.435693
# Day 5, part 1: 11540 # Day 5, part 2: 6918
3.304758
3
sdk/python/pulumi_scaleway/vpc_private_network.py
stack72/pulumi-scaleway
6
6621572
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import ...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import ...
en
0.744905
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** The set of arguments for constructing a VpcPrivateNetwork resource. :param pulumi.Input[str] name: The name of the private netwo...
2.343566
2
problems/daily_challenge/2021_03_03_missing_number/py/submissions/set_sol.py
phunc20/leetcode
0
6621573
<reponame>phunc20/leetcode class Solution: def missingNumber(self, nums: List[int]) -> int: n = len(nums) return (set(range(n+1)) - set(nums)).pop()
class Solution: def missingNumber(self, nums: List[int]) -> int: n = len(nums) return (set(range(n+1)) - set(nums)).pop()
none
1
3.07829
3
helloworld.py
mamonu/gh_Actions_CI
0
6621574
<reponame>mamonu/gh_Actions_CI<filename>helloworld.py def add(a,b): c = a + b #duh! return c
def add(a,b): c = a + b #duh! return c
none
1
2.392347
2
api.py
macgyvercsehdev/api_gerencianet
0
6621575
<filename>api.py from requests.auth import HTTPBasicAuth from requests import request, post from dotenv import load_dotenv from os import getenv load_dotenv('.env') def _token(): response = post( url='%s/oauth/token' % getenv('URL_PROD'), auth=HTTPBasicAuth( getenv('CLIENT_ID_PROD'), ...
<filename>api.py from requests.auth import HTTPBasicAuth from requests import request, post from dotenv import load_dotenv from os import getenv load_dotenv('.env') def _token(): response = post( url='%s/oauth/token' % getenv('URL_PROD'), auth=HTTPBasicAuth( getenv('CLIENT_ID_PROD'), ...
none
1
2.650244
3
app/services/nomics/rest_api_to_db/currencies/controller.py
Tinitto/crypto-exchange
0
6621576
<reponame>Tinitto/crypto-exchange<filename>app/services/nomics/rest_api_to_db/currencies/controller.py """ Controller for getting all currencies supported by Nomics https://nomics.com/docs/#operation/getCurrencies """ from typing import Type, List from judah.destinations.database.model import DatabaseBaseModel from ju...
""" Controller for getting all currencies supported by Nomics https://nomics.com/docs/#operation/getCurrencies """ from typing import Type, List from judah.destinations.database.model import DatabaseBaseModel from judah.transformers.base import BaseTransformer from .destination.model import Currencies from .source im...
en
0.857901
Controller for getting all currencies supported by Nomics https://nomics.com/docs/#operation/getCurrencies The controller for getting all supported currencies from Nomics # 1 day
2.063257
2
app/ui/main_ui_page.py
leepan1991/onvif_device_manager_python
3
6621577
<filename>app/ui/main_ui_page.py #! /usr/bin/env python # -*- coding: utf-8 -*- import sys import device_manager_setup from app.http.http_utils import update_ip, update_device_time, get_default_gateway_ip import ipaddress try: import Tkinter as tk except ImportError: import tkinter as tk import tkinter....
<filename>app/ui/main_ui_page.py #! /usr/bin/env python # -*- coding: utf-8 -*- import sys import device_manager_setup from app.http.http_utils import update_ip, update_device_time, get_default_gateway_ip import ipaddress try: import Tkinter as tk except ImportError: import tkinter as tk import tkinter....
en
0.666746
#! /usr/bin/env python # -*- coding: utf-8 -*- Starting point when module is the main routine. Starting point when module is imported by another module. Correct form of call: 'create_Toplevel1(root, *args, **kwargs)' . # rt = root This class configures and populates the toplevel window. top is the to...
2.450505
2
reason/metrics/_accuracy.py
alisoltanirad/Reason
1
6621578
<gh_stars>1-10 def accuracy(y_true, y_pred): """Accuracy score function. Easy-to-use word tokenize function. Example: >>> from reason.metrics import accuracy >>> accuracy(y_true, y_pred) 0.9358 Args: y_true (list): Real labels. y_pred (list): Predicted labels r...
def accuracy(y_true, y_pred): """Accuracy score function. Easy-to-use word tokenize function. Example: >>> from reason.metrics import accuracy >>> accuracy(y_true, y_pred) 0.9358 Args: y_true (list): Real labels. y_pred (list): Predicted labels returned by clas...
en
0.670671
Accuracy score function. Easy-to-use word tokenize function. Example: >>> from reason.metrics import accuracy >>> accuracy(y_true, y_pred) 0.9358 Args: y_true (list): Real labels. y_pred (list): Predicted labels returned by classifier. Returns: float: ...
3.391712
3
day10-11/code/threads.py
liuchunhuicanfly/learning-python
4
6621579
# encoding: utf-8 from threading import currentThread, Thread, Lock from time import time, sleep from random import randint # def download_task(filename): # print('线程 %s 开始下载%s...' % (currentThread().name, filename)) # time_to_download = randint(5, 10) # sleep(time_to_download) # print('线程 %s 下载完成! 耗费了%d秒' % (cur...
# encoding: utf-8 from threading import currentThread, Thread, Lock from time import time, sleep from random import randint # def download_task(filename): # print('线程 %s 开始下载%s...' % (currentThread().name, filename)) # time_to_download = randint(5, 10) # sleep(time_to_download) # print('线程 %s 下载完成! 耗费了%d秒' % (cur...
en
0.293581
# encoding: utf-8 # def download_task(filename): # print('线程 %s 开始下载%s...' % (currentThread().name, filename)) # time_to_download = randint(5, 10) # sleep(time_to_download) # print('线程 %s 下载完成! 耗费了%d秒' % (currentThread().name, time_to_download)) # 单线程 # def main(): # start_time = time() # print('线程 %s is running....
3.582916
4
modules/sr/robot/vision/__init__.py
13ros27/competition-simulator
0
6621580
from .api import tokens_from_objects from .polar import PolarCoord, polar_from_cartesian from .tokens import Face, Orientation from .vectors import Vector __all__ = ( 'Face', 'Vector', 'PolarCoord', 'Orientation', 'tokens_from_objects', 'polar_from_cartesian', )
from .api import tokens_from_objects from .polar import PolarCoord, polar_from_cartesian from .tokens import Face, Orientation from .vectors import Vector __all__ = ( 'Face', 'Vector', 'PolarCoord', 'Orientation', 'tokens_from_objects', 'polar_from_cartesian', )
none
1
1.411338
1
os_v4_hek/defs/tag_.py
holy-crust/reclaimer
0
6621581
<reponame>holy-crust/reclaimer from ...os_v3_hek.defs.tag_ import *
from ...os_v3_hek.defs.tag_ import *
none
1
1.197808
1
project/views/user.py
DanielGrams/gsevp
1
6621582
<gh_stars>1-10 from flask import render_template from flask_security import auth_required from project import app from project.models import AdminUnitInvitation from project.views.utils import get_invitation_access_result @app.route("/profile") @auth_required() def profile(): return render_template("profile.html...
from flask import render_template from flask_security import auth_required from project import app from project.models import AdminUnitInvitation from project.views.utils import get_invitation_access_result @app.route("/profile") @auth_required() def profile(): return render_template("profile.html") @app.route...
none
1
2.075438
2
tests.py
oneassure-tech/onepipepy
0
6621583
import unittest from src.onepipepy import * #from models import * from config import Config from datetime import datetime class PDTest(unittest.TestCase): api = API(Config.PD_API_KEY) vars = dict() def test_search_person(self): self.assertIsInstance( self.api.search.search_items( ...
import unittest from src.onepipepy import * #from models import * from config import Config from datetime import datetime class PDTest(unittest.TestCase): api = API(Config.PD_API_KEY) vars = dict() def test_search_person(self): self.assertIsInstance( self.api.search.search_items( ...
en
0.506495
#from models import *
2.812447
3
static_setup.py
kongwf5813/ANARCI
0
6621584
<filename>static_setup.py<gh_stars>0 #!/usr/bin/env python3 import shutil, os if os.path.isdir("build"): shutil.rmtree("build/") from distutils.core import setup setup(name='anarci', version='1.3', description='Antibody Numbering and Receptor ClassIfication', author='<NAME>', author_email...
<filename>static_setup.py<gh_stars>0 #!/usr/bin/env python3 import shutil, os if os.path.isdir("build"): shutil.rmtree("build/") from distutils.core import setup setup(name='anarci', version='1.3', description='Antibody Numbering and Receptor ClassIfication', author='<NAME>', author_email...
fr
0.221828
#!/usr/bin/env python3
1.459869
1
stage1/rubberdecode.py
fishilico/sstic-2015
0
6621585
<filename>stage1/rubberdecode.py #!/usr/bin/env python3 """Decode the Rubber Ducky inject.bin compiled script""" import struct import sys # Build a (opcode, modifier)-to-char dictonary OM2C = { (0x1e, 0): '1', (0x1e, 2): '!', (0x1f, 0): '2', (0x1f, 2): '@', (0x20, 0): '3', (0x20, 2): '#', (0x21, 0): '4...
<filename>stage1/rubberdecode.py #!/usr/bin/env python3 """Decode the Rubber Ducky inject.bin compiled script""" import struct import sys # Build a (opcode, modifier)-to-char dictonary OM2C = { (0x1e, 0): '1', (0x1e, 2): '!', (0x1f, 0): '2', (0x1f, 2): '@', (0x20, 0): '3', (0x20, 2): '#', (0x21, 0): '4...
en
0.69451
#!/usr/bin/env python3 Decode the Rubber Ducky inject.bin compiled script # Build a (opcode, modifier)-to-char dictonary # Alphabet # "DELAY" is encoded with successive opcode-0 commands # WIN key + letter is encoded with modifier 8
2.820625
3
algorithms/BeamLstmWrapper.py
keith-leung/cis667-secretary-problem
0
6621586
<gh_stars>0 import random import numpy as np import torch as tr import math import pickle # Define a small LSTM recurrent neural network with linear hidden-to-output layer class BeamLstmWrapper(): def __init__(self, modelname='', word_path='', dictionary_path = '', net_path= ''): self._name = modelname ...
import random import numpy as np import torch as tr import math import pickle # Define a small LSTM recurrent neural network with linear hidden-to-output layer class BeamLstmWrapper(): def __init__(self, modelname='', word_path='', dictionary_path = '', net_path= ''): self._name = modelname self._...
en
0.854151
# Define a small LSTM recurrent neural network with linear hidden-to-output layer # like_people is a list with data # like_people is a list with data ## return true or false , selected index # real prediction # ['3', '5', '7', '4', '3', '2'] # print(current_sentence) # keep the final(last word) prediction # ignore sing...
2.992014
3
test/conftest.py
zli117/Evolution
4
6621587
<reponame>zli117/Evolution from typing import Tuple import pytest from evolution.encoding.base import IdentityOperation from evolution.encoding.base import MaxPool2D from evolution.encoding.base import PointConv2D from evolution.encoding.base import Vertex from evolution.encoding.mutable_edge import MutableEdge @py...
from typing import Tuple import pytest from evolution.encoding.base import IdentityOperation from evolution.encoding.base import MaxPool2D from evolution.encoding.base import PointConv2D from evolution.encoding.base import Vertex from evolution.encoding.mutable_edge import MutableEdge @pytest.fixture() def basic_gr...
none
1
2.188356
2
tests/GenPro/genetic_algorithm/individuals/test_basic.py
Hispar/procedural_generation
0
6621588
<filename>tests/GenPro/genetic_algorithm/individuals/test_basic.py # -*- coding: utf-8 -*- # Python imports # 3rd Party imports import pytest # App imports from src.GenPro.genetic_algorithm.individuals.basic import BasicIndividual def test_individual_basic_fitness(): individual = BasicIndividual() with pyte...
<filename>tests/GenPro/genetic_algorithm/individuals/test_basic.py # -*- coding: utf-8 -*- # Python imports # 3rd Party imports import pytest # App imports from src.GenPro.genetic_algorithm.individuals.basic import BasicIndividual def test_individual_basic_fitness(): individual = BasicIndividual() with pyte...
en
0.750028
# -*- coding: utf-8 -*- # Python imports # 3rd Party imports # App imports
2.390129
2
tests/blessclient/awsmfautils_test.py
mwpeterson/python-blessclient
115
6621589
import blessclient.awsmfautils as awsmfautils import os import datetime def test_unset_token(): os.environ['AWS_ACCESS_KEY_ID'] = 'foo' os.environ['AWS_SESSION_TOKEN'] = 'foo' os.environ['AWS_SECURITY_TOKEN'] = 'foo' awsmfautils.unset_token() assert 'AWS_ACCESS_KEY_ID' not in os.environ assert...
import blessclient.awsmfautils as awsmfautils import os import datetime def test_unset_token(): os.environ['AWS_ACCESS_KEY_ID'] = 'foo' os.environ['AWS_SESSION_TOKEN'] = 'foo' os.environ['AWS_SECURITY_TOKEN'] = 'foo' awsmfautils.unset_token() assert 'AWS_ACCESS_KEY_ID' not in os.environ assert...
none
1
2.064958
2
jsb/plugs/common/remind.py
NURDspace/jsonbot
1
6621590
# jsb/plugs/common/remind.py # # """ remind people .. say txt when somebody gets active """ ## jsb imports from jsb.utils.generic import getwho from jsb.lib.commands import cmnds from jsb.lib.examples import examples from jsb.lib.callbacks import callbacks from jsb.lib.persist import PlugPersist ## basic imports i...
# jsb/plugs/common/remind.py # # """ remind people .. say txt when somebody gets active """ ## jsb imports from jsb.utils.generic import getwho from jsb.lib.commands import cmnds from jsb.lib.examples import examples from jsb.lib.callbacks import callbacks from jsb.lib.persist import PlugPersist ## basic imports i...
en
0.648243
# jsb/plugs/common/remind.py # # remind people .. say txt when somebody gets active ## jsb imports ## basic imports ## Remind-class remind object add a remind txt check if there is a remind for userhost send a user all registered reminds ## defines ## callbacks remind precondition remind callbacks ## remind command arg...
2.470037
2
django/backend/nt_search/migrations/0004_remove_response_alignments.py
joeytab/ginkgo-project
0
6621591
# Generated by Django 3.2.7 on 2021-11-30 02:53 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('nt_search', '0003_alter_response_alignments'), ] operations = [ migrations.RemoveField( model_name='response', name='alignme...
# Generated by Django 3.2.7 on 2021-11-30 02:53 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('nt_search', '0003_alter_response_alignments'), ] operations = [ migrations.RemoveField( model_name='response', name='alignme...
en
0.870599
# Generated by Django 3.2.7 on 2021-11-30 02:53
1.350754
1
isaac-run-selector.py
gaizkadc/isaac-run-selector
0
6621592
#!/usr/bin/python # -*- coding: utf-8 -*- # Imports import random # Mode selector def select_mode (): mode = { 1: "Normal Run", 2: "Challenge" } mode_key = random.randint(1,2) print mode[mode_key] return mode_key # Character selector def select_character (): character = { ...
#!/usr/bin/python # -*- coding: utf-8 -*- # Imports import random # Mode selector def select_mode (): mode = { 1: "Normal Run", 2: "Challenge" } mode_key = random.randint(1,2) print mode[mode_key] return mode_key # Character selector def select_character (): character = { ...
en
0.651361
#!/usr/bin/python # -*- coding: utf-8 -*- # Imports # Mode selector # Character selector # Difficulty selector # Select challenge # Main
3.454755
3
iconservice/iconscore/icx.py
bayeshack2016/icon-service
52
6621593
<filename>iconservice/iconscore/icx.py # -*- coding: utf-8 -*- # Copyright 2018 ICON Foundation # # 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...
<filename>iconservice/iconscore/icx.py # -*- coding: utf-8 -*- # Copyright 2018 ICON Foundation # # 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...
en
0.827194
# -*- coding: utf-8 -*- # Copyright 2018 ICON Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
2.277047
2
view_real_results.py
crislmfroes/Parallel-Manipulation-DRL
2
6621594
from matplotlib import pyplot as plt import matplotlib.image as mpimg import numpy as np import pickle import os path = os.path.dirname(os.path.abspath(__file__)) list_dir = os.listdir(path + '/real_results/') threshold_x = 10 threshold_y = 30 threshold = 10 STAGE = 4 c = 7 def antispike(old_list_x, old_list_y): ...
from matplotlib import pyplot as plt import matplotlib.image as mpimg import numpy as np import pickle import os path = os.path.dirname(os.path.abspath(__file__)) list_dir = os.listdir(path + '/real_results/') threshold_x = 10 threshold_y = 30 threshold = 10 STAGE = 4 c = 7 def antispike(old_list_x, old_list_y): ...
en
0.156207
#x, y = antispike(x, y)
2.403385
2
Curso_Python_3_UDEMY/banco_dados/sqllite.py
DanilooSilva/Cursos_de_Python
0
6621595
<reponame>DanilooSilva/Cursos_de_Python<gh_stars>0 from sqlite3 import connect, ProgrammingError, Row tabela_grupo = '''CREATE TABLE IF NOT EXISTS GRUPOS( ID INTEGER PRIMARY KEY AUTOINCREMENT, DESCRICAO VARCHAR(30) )''' tabela_contatos = """ CREATE TABLE IF NOT EXISTS CONTATOS ( ID INTEGER PRIMAR...
from sqlite3 import connect, ProgrammingError, Row tabela_grupo = '''CREATE TABLE IF NOT EXISTS GRUPOS( ID INTEGER PRIMARY KEY AUTOINCREMENT, DESCRICAO VARCHAR(30) )''' tabela_contatos = """ CREATE TABLE IF NOT EXISTS CONTATOS ( ID INTEGER PRIMARY KEY AUTOINCREMENT, NOME VARCHAR(50), ...
en
0.257806
CREATE TABLE IF NOT EXISTS GRUPOS( ID INTEGER PRIMARY KEY AUTOINCREMENT, DESCRICAO VARCHAR(30) ) CREATE TABLE IF NOT EXISTS CONTATOS ( ID INTEGER PRIMARY KEY AUTOINCREMENT, NOME VARCHAR(50), TEL VARCHAR(40), IDGRUPO INTEGER, FOREIGN KEY (IDGRUPO) REFERENCES GRUPOS (ID) ...
3.697391
4
kyu_6/unique_in_order/unique_in_order.py
pedrocodacyorg2/codewars
1
6621596
<filename>kyu_6/unique_in_order/unique_in_order.py # Created by <NAME>. # GitHub: https://github.com/ikostan # LinkedIn: https://www.linkedin.com/in/egor-kostan/ from typing import Iterable, List def unique_in_order(iterable: Iterable) -> list: """ Takes as argument a sequence and returns a list of it...
<filename>kyu_6/unique_in_order/unique_in_order.py # Created by <NAME>. # GitHub: https://github.com/ikostan # LinkedIn: https://www.linkedin.com/in/egor-kostan/ from typing import Iterable, List def unique_in_order(iterable: Iterable) -> list: """ Takes as argument a sequence and returns a list of it...
en
0.720248
# Created by <NAME>. # GitHub: https://github.com/ikostan # LinkedIn: https://www.linkedin.com/in/egor-kostan/ Takes as argument a sequence and returns a list of items without any elements with the same value next to each other and preserving the original order of elements. :param iterable: :retu...
4.007282
4
backend/api/geoutils.py
hrbonz/wechat_hackathon_AQ
2
6621597
# -*- coding: utf-8 -*- from geopy.distance import vincenty import Geohash def hash2tag(geohash): return Geohash.decode(geohash.rstrip("0")) def get_city(geotag): # FIXME(stefan.berder): get to use baidu backend to resolve city # g = geocoder.baidu() # return g.city return "shanghai" def get_clo...
# -*- coding: utf-8 -*- from geopy.distance import vincenty import Geohash def hash2tag(geohash): return Geohash.decode(geohash.rstrip("0")) def get_city(geotag): # FIXME(stefan.berder): get to use baidu backend to resolve city # g = geocoder.baidu() # return g.city return "shanghai" def get_clo...
en
0.598972
# -*- coding: utf-8 -*- # FIXME(stefan.berder): get to use baidu backend to resolve city # g = geocoder.baidu() # return g.city
3.122829
3
Exercise05/5-35.py
ywyz/IntroducingToProgrammingUsingPython
0
6621598
<gh_stars>0 ''' @Date: 2019-11-06 19:34:16 @Author: ywyz @LastModifiedBy: ywyz @Github: https://github.com/ywyz @LastEditors: ywyz @LastEditTime: 2019-11-06 19:35:11 ''' for i in range(1, 10001): k = 0 for j in range(1, i): if (i % j == 0): k += j if k == i: print(k)
''' @Date: 2019-11-06 19:34:16 @Author: ywyz @LastModifiedBy: ywyz @Github: https://github.com/ywyz @LastEditors: ywyz @LastEditTime: 2019-11-06 19:35:11 ''' for i in range(1, 10001): k = 0 for j in range(1, i): if (i % j == 0): k += j if k == i: print(k)
en
0.364006
@Date: 2019-11-06 19:34:16 @Author: ywyz @LastModifiedBy: ywyz @Github: https://github.com/ywyz @LastEditors: ywyz @LastEditTime: 2019-11-06 19:35:11
3.079033
3
streamlit_app.py
pipegalera/BasketballReference-Webscraper
0
6621599
from functions_app import * st.markdown(" # :basketball: NBA Data Scraper :basketball:") st.subheader('Web App by [Pipe Galera](https://www.pipegalera.com/)') ########################### Lists and Dictionaries ########################### current_season = int(start_of_the_season_indicator()[5:]) seasons...
from functions_app import * st.markdown(" # :basketball: NBA Data Scraper :basketball:") st.subheader('Web App by [Pipe Galera](https://www.pipegalera.com/)') ########################### Lists and Dictionaries ########################### current_season = int(start_of_the_season_indicator()[5:]) seasons...
de
0.645552
# :basketball: NBA Data Scraper :basketball:") ########################### Lists and Dictionaries ########################### ########################### Data Scraper ###############################
3.355426
3
fcrepo_verify/constants.py
awoods/fcrepo-import-export-verify
5
6621600
<reponame>awoods/fcrepo-import-export-verify __author__ = 'dbernstein' EXT_MAP = {"application/ld+json": ".json", "application/n-triples": ".nt", "application/rdf+xml": ".xml", "text/n3": ".n3", "text/rdf+n3": ".n3", "text/plain": ...
__author__ = 'dbernstein' EXT_MAP = {"application/ld+json": ".json", "application/n-triples": ".nt", "application/rdf+xml": ".xml", "text/n3": ".n3", "text/rdf+n3": ".n3", "text/plain": ".txt", "text/turtle": ...
en
0.236299
#NonRDFSource" #contains" #hasVersion" #hasVersions"
1.570847
2
Problems/Study Plans/Algorithm/Algorithm I/20_merge_two_sorted_lists.py
andor2718/LeetCode
1
6621601
<gh_stars>1-10 # https://leetcode.com/problems/merge-two-sorted-lists/ from typing import Optional # Definition for singly-linked list. class ListNode: def __init__(self, val=0, next=None): self.val = val self.next = next def __repr__(self): return f'{self.val}->{self.next}' class ...
# https://leetcode.com/problems/merge-two-sorted-lists/ from typing import Optional # Definition for singly-linked list. class ListNode: def __init__(self, val=0, next=None): self.val = val self.next = next def __repr__(self): return f'{self.val}->{self.next}' class Solution: d...
en
0.798306
# https://leetcode.com/problems/merge-two-sorted-lists/ # Definition for singly-linked list.
3.93327
4
sunpy/net/tests/test_hek.py
drewleonard42/sunpy
0
6621602
<gh_stars>0 # -*- coding: utf-8 -*- # Author: <NAME> <<EMAIL>> #pylint: disable=W0613 import pytest from sunpy.net import hek from sunpy.net import attr @pytest.fixture def foostrwrap(request): return hek.attrs._StringParamAttrWrapper("foo") def test_eventtype_collide(): with pytest.raises(TypeError): ...
# -*- coding: utf-8 -*- # Author: <NAME> <<EMAIL>> #pylint: disable=W0613 import pytest from sunpy.net import hek from sunpy.net import attr @pytest.fixture def foostrwrap(request): return hek.attrs._StringParamAttrWrapper("foo") def test_eventtype_collide(): with pytest.raises(TypeError): hek.at...
en
0.329143
# -*- coding: utf-8 -*- # Author: <NAME> <<EMAIL>> #pylint: disable=W0613
2.11247
2
airflow/contrib/operators/postgres_to_csv_operator.py
katerinekhh/airflow
0
6621603
import csv import sqlparse from airflow.models import BaseOperator from airflow.hooks.postgres_hook import PostgresHook from airflow.utils.decorators import apply_defaults class PostgresToCsvOperator(BaseOperator): """ Executes sql code in a specific Postgres database and creates a .csv file with s...
import csv import sqlparse from airflow.models import BaseOperator from airflow.hooks.postgres_hook import PostgresHook from airflow.utils.decorators import apply_defaults class PostgresToCsvOperator(BaseOperator): """ Executes sql code in a specific Postgres database and creates a .csv file with s...
en
0.479902
Executes sql code in a specific Postgres database and creates a .csv file with selected data. CSV headers will match column names from sql select statement by default. Or can be passed as a parameter. :param sql: the sql code to be executed. (templated) :type sql: Can receive a str represen...
2.916676
3
common/data/split.py
alainjungo/reliability-challenges-uncertainty
56
6621604
<gh_stars>10-100 import json import operator import numpy as np import sklearn.model_selection as model_selection import common.utils.filehelper as fh def split_subjects(subjects: list, sizes: tuple) -> tuple: nb_total = len(subjects) counts = _normalize_sizes(sizes, nb_total) nb_train, nb_valid = coun...
import json import operator import numpy as np import sklearn.model_selection as model_selection import common.utils.filehelper as fh def split_subjects(subjects: list, sizes: tuple) -> tuple: nb_total = len(subjects) counts = _normalize_sizes(sizes, nb_total) nb_train, nb_valid = counts[0], counts[1] ...
en
0.866307
# note: folds may not be of same size
2.921885
3
Scripts/core/assertions.py
velocist/TS4CheatsInfo
0
6621605
<filename>Scripts/core/assertions.py # uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Core\assertions.py # Compiled at: 2015-02-04 23:14:34 # Size of source...
<filename>Scripts/core/assertions.py # uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Core\assertions.py # Compiled at: 2015-02-04 23:14:34 # Size of source...
en
0.519486
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Core\assertions.py # Compiled at: 2015-02-04 23:14:34 # Size of source mod 2**32: 4799 bytes
1.679607
2
src/Chap14_Problem.py
falconlee236/CodingTheMatrix-Answer
0
6621606
<reponame>falconlee236/CodingTheMatrix-Answer from mat import Mat from vec import Vec from solver import solve print("# Probem 14.16.2") # Probem 14.16.2 def find_move_helper(A, r): return solve(A, Vec(A.D[0], {r: 1})) A = Mat(({1, 2, 3}, {1, 2, 3}), {(1, 1): 1, (1, 2): 1, (2, 2): 1, (2, 3): 1, (3, 1): 1, (3,...
from mat import Mat from vec import Vec from solver import solve print("# Probem 14.16.2") # Probem 14.16.2 def find_move_helper(A, r): return solve(A, Vec(A.D[0], {r: 1})) A = Mat(({1, 2, 3}, {1, 2, 3}), {(1, 1): 1, (1, 2): 1, (2, 2): 1, (2, 3): 1, (3, 1): 1, (3, 3): 1}) print("# Problem 14.16.3") # Proble...
en
0.490311
# Probem 14.16.2 # Problem 14.16.3 # Problem 14.16.4
3.037705
3
shin/apps.py
Hasun-Shin/Hasun-Shin.github.io
0
6621607
from django.apps import AppConfig class ShinConfig(AppConfig): name = 'shin'
from django.apps import AppConfig class ShinConfig(AppConfig): name = 'shin'
none
1
1.036423
1
anyway/database.py
AlonMaor14/anyway
1
6621608
from anyway.app_and_db import db Base = db.Model
from anyway.app_and_db import db Base = db.Model
none
1
1.168609
1
decred/tests/unit/dcr/test_vsp_unit.py
JoeGruffins/tinydecred
0
6621609
""" Copyright (c) 2020, the Decred developers See LICENSE for details """ import time import pytest from decred import DecredError from decred.dcr import vsp from decred.dcr.nets import mainnet from decred.util import encode def test_result_is_success(): # (res, isSuccess) tests = [ (dict(status="s...
""" Copyright (c) 2020, the Decred developers See LICENSE for details """ import time import pytest from decred import DecredError from decred.dcr import vsp from decred.dcr.nets import mainnet from decred.util import encode def test_result_is_success(): # (res, isSuccess) tests = [ (dict(status="s...
en
0.783004
Copyright (c) 2020, the Decred developers See LICENSE for details # (res, isSuccess) # bad version # too long # bad version # too long # correct address # valid but wrong address # invalid address # no address # ok # address not submitted # other error # wrong address # ok # error # updated # not updated # within the u...
2.292958
2
line_counter.py
CedricFauth/LineCounter
0
6621610
import sys import pathlib def arg_help(): print("Wrong input format: " + str(sys.argv[1:]) + "\n") print("Please use something like: python3 line_counter.py [PATH] [FILENAME]") print("I.e. python3 line_counter.py /home/user/javaproject *.java") def main(): p = pathlib.Path(sys.argv[1]).glob('**/' + sy...
import sys import pathlib def arg_help(): print("Wrong input format: " + str(sys.argv[1:]) + "\n") print("Please use something like: python3 line_counter.py [PATH] [FILENAME]") print("I.e. python3 line_counter.py /home/user/javaproject *.java") def main(): p = pathlib.Path(sys.argv[1]).glob('**/' + sy...
en
0.3905
#print("\nFiles: " + str(files) + "\n") #print("Line: " + line)
3.342638
3
code/python/archive/c0200_chart_patents.py
jesnyder/allogenic
1
6621611
import os import matplotlib import matplotlib.pyplot as plt import numpy as np import pandas as pd from c0101_retrieve_clinical import retrieve_clinical from c0201_query_patents import query_patents def chart_patents(): """ """ query_patents() # clinical_gov_url = 'https://clinicalt...
import os import matplotlib import matplotlib.pyplot as plt import numpy as np import pandas as pd from c0101_retrieve_clinical import retrieve_clinical from c0201_query_patents import query_patents def chart_patents(): """ """ query_patents() # clinical_gov_url = 'https://clinicalt...
en
0.456956
# clinical_gov_url = 'https://clinicaltrials.gov/ct2/results?cond=&term=&type=&rslt=&age_v=&gndr=&intr=allogenic+AND+msc&titles=&outc=&spons=&lead=&id=&cntry=&state=&city=&dist=&locn=&rsub=&strd_s=&strd_e=&prcd_s=&prcd_e=&sfpd_s=&sfpd_e=&rfpd_s=&rfpd_e=&lupd_s=&lupd_e=&sort=' # retrieve_clinical(clinical_gov_url) # pri...
2.545362
3
test/sam_quest_tests.py
roryj/samquest
3
6621612
import unittest from src.sam_quest import handle_game_state from src.models import RequestType from test_resources import get_game_state_table, MockTwitterApi from moto import mock_dynamodb2 @mock_dynamodb2 class TestSAMQuest(unittest.TestCase): def test_tweet_processing(self): print('Im here!') t...
import unittest from src.sam_quest import handle_game_state from src.models import RequestType from test_resources import get_game_state_table, MockTwitterApi from moto import mock_dynamodb2 @mock_dynamodb2 class TestSAMQuest(unittest.TestCase): def test_tweet_processing(self): print('Im here!') t...
none
1
2.402904
2
cli.py
asmodehn/crypy
2
6621613
<filename>cli.py import cmd import os import random import sys class StackableCmd(cmd.Cmd): def __init__(self, prompt, completekey='tab', stdin=None, stdout=None): self.prompt = prompt + ">" super().__init__(completekey=completekey, stdin=stdin, stdout=stdout) def precmd(self, line): ...
<filename>cli.py import cmd import os import random import sys class StackableCmd(cmd.Cmd): def __init__(self, prompt, completekey='tab', stdin=None, stdout=None): self.prompt = prompt + ">" super().__init__(completekey=completekey, stdin=stdin, stdout=stdout) def precmd(self, line): ...
en
0.541559
# BROKEN : Closes stdin # TODO : fixit # prototype of command user interface
2.969778
3
hic/test_hic.py
zelhar/mg21
0
6621614
<reponame>zelhar/mg21 import straw import numpy as np from scipy.sparse import coo_matrix import scipy.sparse as sparse import matplotlib.pyplot as plt import seaborn as sns from matplotlib import cm #https://colab.research.google.com/drive/1548GgZe7ndeZseaIQ1YQxnB5rMZWSsSj straw.straw? res = 100000*5 spmat =...
import straw import numpy as np from scipy.sparse import coo_matrix import scipy.sparse as sparse import matplotlib.pyplot as plt import seaborn as sns from matplotlib import cm #https://colab.research.google.com/drive/1548GgZe7ndeZseaIQ1YQxnB5rMZWSsSj straw.straw? res = 100000*5 spmat = straw.straw( "KR"...
en
0.224252
#https://colab.research.google.com/drive/1548GgZe7ndeZseaIQ1YQxnB5rMZWSsSj #x = coo_matrix((spmat[2], (spmat[1], spmat[0])), shape=(n+1,n+1)) #M = sparse.coo_matrix((V,(I,J)),shape=(sz,sz)).tocsr() #marks = np.tri(sz, sz, -1)*500 #plt.matshow(np.log(marks)) #plt.imshow(25500*np.log(x)) #plt.imshow(x) #sns.heatmap(np.lo...
2.076137
2
sentence-reading/question_frame.py
michalovsky/knowlegde-based-ai-mini-projects
0
6621615
<reponame>michalovsky/knowlegde-based-ai-mini-projects<gh_stars>0 class QuestionFrame: def __init__(self, question_words: list, subjects: list, noun: str): self.question_words = question_words self.subjects = subjects self.noun = noun def __str__(self): return f"question words: ...
class QuestionFrame: def __init__(self, question_words: list, subjects: list, noun: str): self.question_words = question_words self.subjects = subjects self.noun = noun def __str__(self): return f"question words: {self.question_words}, subjects: {self.subjects}, noun: {self.noun...
none
1
3.270805
3
torchmeta/transforms/target_transforms.py
brando90/pytorch-meta
1,704
6621616
from torchvision.transforms import Compose, Resize, ToTensor import PIL class SegmentationPairTransform(object): def __init__(self, target_size): self.image_transform = Compose([Resize((target_size, target_size)), ToTensor()]) self.mask_transform = Compose([Resize((target_size, target_size), ...
from torchvision.transforms import Compose, Resize, ToTensor import PIL class SegmentationPairTransform(object): def __init__(self, target_size): self.image_transform = Compose([Resize((target_size, target_size)), ToTensor()]) self.mask_transform = Compose([Resize((target_size, target_size), ...
none
1
2.737738
3
app.py
webclinic017/alpha-2
2
6621617
# ----------------------------------------------------------------------------# # Imports # ----------------------------------------------------------------------------# # Flask stuffs from flask import Flask, render_template, request, redirect, flash, url_for, session # from flask_debugtoolbar import DebugToolbarExte...
# ----------------------------------------------------------------------------# # Imports # ----------------------------------------------------------------------------# # Flask stuffs from flask import Flask, render_template, request, redirect, flash, url_for, session # from flask_debugtoolbar import DebugToolbarExte...
en
0.569561
# ----------------------------------------------------------------------------# # Imports # ----------------------------------------------------------------------------# # Flask stuffs # from flask_debugtoolbar import DebugToolbarExtension # SQL stuffs # from sqlalchemy.ext.declarative import declarative_base # Logging...
1.82119
2
process_history.py
LulutasoAI/Extract_portfolio_info
0
6621618
import pickle_around from matplotlib import pyplot as plt import datetime import matplotlib if __name__ == "__main__": data_loaded = pickle_around.load_object() historical_assets_JPY = [] Data_date = [] for date in data_loaded: print("The data of ",date) extracted = data_loaded...
import pickle_around from matplotlib import pyplot as plt import datetime import matplotlib if __name__ == "__main__": data_loaded = pickle_around.load_object() historical_assets_JPY = [] Data_date = [] for date in data_loaded: print("The data of ",date) extracted = data_loaded...
en
0.242665
#print(type(extracted[0])) #print(type(Data_date))
3.146996
3
food_ke/entailment/train.py
IBPA/FoodAtlas
1
6621619
# -*- coding: utf-8 -*- """Model training methods. Authors: <NAME> - <EMAIL> <NAME> - <EMAIL> Todo: * Docstring * Batch size for predictions arg. * move early stopping code block as a callable function. * scalable approach for setting class distribution. we can add a additional column ...
# -*- coding: utf-8 -*- """Model training methods. Authors: <NAME> - <EMAIL> <NAME> - <EMAIL> Todo: * Docstring * Batch size for predictions arg. * move early stopping code block as a callable function. * scalable approach for setting class distribution. we can add a additional column ...
en
0.58877
# -*- coding: utf-8 -*- Model training methods. Authors: <NAME> - <EMAIL> <NAME> - <EMAIL> Todo: * Docstring * Batch size for predictions arg. * move early stopping code block as a callable function. * scalable approach for setting class distribution. we can add a additional column to ...
2.426257
2
6homework.py
Dendzz/Hilel
0
6621620
txt_first = "Hi" big = txt_first.capitalize() print(type(big)) print(big) txt_second = "HeLLo, AnD WeLcome To My World! 123 " low = txt_second.casefold() print(low) txt_third = "banana" centre = txt_third.center(20) print(centre) txt_fourth = "I love apples, apple are my favorite fruit,аррle" count = txt_four...
txt_first = "Hi" big = txt_first.capitalize() print(type(big)) print(big) txt_second = "HeLLo, AnD WeLcome To My World! 123 " low = txt_second.casefold() print(low) txt_third = "banana" centre = txt_third.center(20) print(centre) txt_fourth = "I love apples, apple are my favorite fruit,аррle" count = txt_four...
en
0.526464
#1аыва.ю.э=-0фыё~!@?"
3.373992
3
Python/06 - Itertools/itertools.permutations().py
sohammanjrekar/HackerRank
0
6621621
""" Problem: https://www.hackerrank.com/challenges/itertools-permutations/problem Author: <NAME> """ import itertools S = list(map(str, input().split())) string1 = sorted(S[0]) number = int(S[1]) print(*list(map("".join, itertools.permutations(string1,number))), sep="\n")
""" Problem: https://www.hackerrank.com/challenges/itertools-permutations/problem Author: <NAME> """ import itertools S = list(map(str, input().split())) string1 = sorted(S[0]) number = int(S[1]) print(*list(map("".join, itertools.permutations(string1,number))), sep="\n")
en
0.671099
Problem: https://www.hackerrank.com/challenges/itertools-permutations/problem Author: <NAME>
3.703074
4
legacy_python/raw_svg/render_cairo.py
smrfeld/convolution-calculator
0
6621622
from typing import List, Dict from .path import * def render_cairo(context, ids_to_paths: Dict[str,List[Path]]): # Draw paths for paths in ids_to_paths.values(): for path in paths: # Draw context.move_to(path.pts[0][0], path.pts[0][1]) for ipt in range(1,len(path.pt...
from typing import List, Dict from .path import * def render_cairo(context, ids_to_paths: Dict[str,List[Path]]): # Draw paths for paths in ids_to_paths.values(): for path in paths: # Draw context.move_to(path.pts[0][0], path.pts[0][1]) for ipt in range(1,len(path.pt...
en
0.826408
# Draw paths # Draw # Stroke and fill
2.550251
3
Scripts/generate_grid.py
Analytics-for-a-Better-World/GPBP_Analytics_Tools
1
6621623
<gh_stars>1-10 def generate_grid_in_polygon(spacing, polygon): import numpy as np from shapely.geometry import Point,Polygon from shapely.ops import cascaded_union import geopandas as gpd ''' This Function generates evenly spaced points within the given GeoDataFrame. The parameter 'spacing' ...
def generate_grid_in_polygon(spacing, polygon): import numpy as np from shapely.geometry import Point,Polygon from shapely.ops import cascaded_union import geopandas as gpd ''' This Function generates evenly spaced points within the given GeoDataFrame. The parameter 'spacing' defines the dis...
en
0.702639
This Function generates evenly spaced points within the given GeoDataFrame. The parameter 'spacing' defines the distance between the points in coordinate units. # Convert the GeoDataFrame to a single polygon # Get the bounds of the polygon # Square around the country with the min, max polygon bounds # Now gener...
3.324155
3
XdaPy/api/google.py
CyboLabs/XdaPy
2
6621624
<filename>XdaPy/api/google.py # Copyright 2015 cybojenix <<EMAIL>> # # 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 app...
<filename>XdaPy/api/google.py # Copyright 2015 cybojenix <<EMAIL>> # # 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 app...
en
0.790426
# Copyright 2015 cybojenix <<EMAIL>> # # 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 wr...
2.80469
3
Python/URI 1012.py
carvalhopedro22/Programacao-URI-Online-Judge
0
6621625
<filename>Python/URI 1012.py linha = input().split(" ") A,B,C = linha # ou A,B,C = [float(x) for x in input().split()] tret = (float(A) * float(C))/2.0 circ = 3.14159 * (float(C) * float(C)) trap = ((float(A) + float(B)) * float(C))/2.0 quad = float(B) * float(B) ret = float(A) * float(B) print("TRIANGULO: {:.3f}"....
<filename>Python/URI 1012.py linha = input().split(" ") A,B,C = linha # ou A,B,C = [float(x) for x in input().split()] tret = (float(A) * float(C))/2.0 circ = 3.14159 * (float(C) * float(C)) trap = ((float(A) + float(B)) * float(C))/2.0 quad = float(B) * float(B) ret = float(A) * float(B) print("TRIANGULO: {:.3f}"....
en
0.379734
# ou A,B,C = [float(x) for x in input().split()]
3.713243
4
cochlear/__init__.py
bburan/cochlear
0
6621626
import logging.config # Set up a verbose debugger level for tracing TRACE_LEVEL_NUM = 5 logging.addLevelName(TRACE_LEVEL_NUM, "TRACE") def trace(self, message, *args, **kws): # Yes, logger takes its '*args' as 'args'. if self.isEnabledFor(TRACE_LEVEL_NUM): self._log(TRACE_LEVEL_NUM, message, args, **k...
import logging.config # Set up a verbose debugger level for tracing TRACE_LEVEL_NUM = 5 logging.addLevelName(TRACE_LEVEL_NUM, "TRACE") def trace(self, message, *args, **kws): # Yes, logger takes its '*args' as 'args'. if self.isEnabledFor(TRACE_LEVEL_NUM): self._log(TRACE_LEVEL_NUM, message, args, **k...
en
0.935583
# Set up a verbose debugger level for tracing # Yes, logger takes its '*args' as 'args'. # This is what gets printed out to the console
2.764943
3
ismo/submit/defaults/commands.py
kjetil-lye/iterative_surrogate_optimization
6
6621627
<gh_stars>1-10 from ismo.submit import Command class Commands(object): """ This class is meant to be inherited from and then you can override whatever methods you want """ def __init__(self, *, training_parameter_config_file, optimize_target_file, ...
from ismo.submit import Command class Commands(object): """ This class is meant to be inherited from and then you can override whatever methods you want """ def __init__(self, *, training_parameter_config_file, optimize_target_file, ...
en
0.95686
This class is meant to be inherited from and then you can override whatever methods you want # evaluate the objective
2.807742
3
rtl/alu.py
bonfireprocessor/bonfire-core
0
6621628
""" RISC-V ALU (c) 2019 The Bonfire Project License: See LICENSE """ from myhdl import * from rtl.barrel_shifter import shift_pipelined from rtl.instructions import ArithmeticFunct3 as f3 class AluBundle: def __init__(self,xlen=32): # ALU Inputs self.funct3_i = Signal(modbv(0)[3:]) sel...
""" RISC-V ALU (c) 2019 The Bonfire Project License: See LICENSE """ from myhdl import * from rtl.barrel_shifter import shift_pipelined from rtl.instructions import ArithmeticFunct3 as f3 class AluBundle: def __init__(self,xlen=32): # ALU Inputs self.funct3_i = Signal(modbv(0)[3:]) sel...
en
0.571613
RISC-V ALU (c) 2019 The Bonfire Project License: See LICENSE # ALU Inputs # ALU Outputs # Only valid when ALU is subtracting : op1>=op2 (signed) # Only valid when when ALU is subtracting : op1>=op2 (unsigned) # op1==op2 # Control Signals # Constants subrtact_i : bool do subtract result_o : modbv[32:] add/su...
2.392525
2
FunctionCheck.py
StefanTitusGlover/IA-Flood-warning-System-Group-25
0
6621629
<filename>FunctionCheck.py from floodsystem.geo import station_history from floodsystem.Plot import plot_water_levels from floodsystem.stationdata import build_station_list, update_water_levels from floodsystem.flood import stations_highest_rel_level from floodsystem.datafetcher import fetch_measure_levels from floodsy...
<filename>FunctionCheck.py from floodsystem.geo import station_history from floodsystem.Plot import plot_water_levels from floodsystem.stationdata import build_station_list, update_water_levels from floodsystem.flood import stations_highest_rel_level from floodsystem.datafetcher import fetch_measure_levels from floodsy...
none
1
2.703089
3
src/tengi/command/param.py
luckybots/tengi
2
6621630
<gh_stars>1-10 from typing import Any import argparse class CommandParam: def __init__(self, name: str, help_str: str, param_type: Any, nargs=None): assert name.startswith('--') self.name = name self.help_str = help_str self.param_type = param_type self.nargs = nargs ...
from typing import Any import argparse class CommandParam: def __init__(self, name: str, help_str: str, param_type: Any, nargs=None): assert name.startswith('--') self.name = name self.help_str = help_str self.param_type = param_type self.nargs = nargs def add_to_pars...
none
1
2.961925
3
src/Argument_Parser_Template.py
Nirlov24/kushs-utils-tool
0
6621631
<reponame>Nirlov24/kushs-utils-tool """ Argument parser template """ import argparse parser = argparse.ArgumentParser(description='Your application description') # simple argument (mandatory) parser.add_argument('a', help='some description') # cast positional argument to int parser.add_argument('b', type=in...
""" Argument parser template """ import argparse parser = argparse.ArgumentParser(description='Your application description') # simple argument (mandatory) parser.add_argument('a', help='some description') # cast positional argument to int parser.add_argument('b', type=int, help='some description') # optio...
en
0.216656
Argument parser template # simple argument (mandatory) # cast positional argument to int # option (optional) # set silent=True if this option available # parse arguments/options to an object args # call the arguments/options
3.611272
4
convert_to_jpeg.py
marmig0404/StyleGAN2-Tensorflow-2.0
0
6621632
<reponame>marmig0404/StyleGAN2-Tensorflow-2.0 """ convert_to_jpeg.py directory Used to convert a directory of images to jpg format <NAME> (marmig0404) 2021 """ import os import sys import PIL.Image as Image source_dir = sys.argv[1] for (dirpath, dirnames, filenames) in os.walk(os.path.abspath(source_dir)): pri...
""" convert_to_jpeg.py directory Used to convert a directory of images to jpg format <NAME> (marmig0404) 2021 """ import os import sys import PIL.Image as Image source_dir = sys.argv[1] for (dirpath, dirnames, filenames) in os.walk(os.path.abspath(source_dir)): print(filenames) for file in filenames: ...
en
0.303089
convert_to_jpeg.py directory Used to convert a directory of images to jpg format <NAME> (marmig0404) 2021
3.50763
4
Modulo_1/semana2/Estructura-de-Datos/set/conjunto-clear.py
rubens233/cocid_python
0
6621633
s = {1, 2, 3, 4} s.clear() print(s)
s = {1, 2, 3, 4} s.clear() print(s)
none
1
2.192397
2
gmconfig/utils/basicimporter.py
GeekMasher/GMConfig
0
6621634
from gmconfig.configuration import Configuration from gmconfig.loaders.load import loadFile from gmconfig.utils.litemerge import liteMerge def basicImporter(obj: dict) -> dict: """ This is a slow but effective way of importing content """ return _import(obj) def _import(obj: dict) -> dict: new_obj ...
from gmconfig.configuration import Configuration from gmconfig.loaders.load import loadFile from gmconfig.utils.litemerge import liteMerge def basicImporter(obj: dict) -> dict: """ This is a slow but effective way of importing content """ return _import(obj) def _import(obj: dict) -> dict: new_obj ...
en
0.901356
This is a slow but effective way of importing content
2.378735
2
src/slack_delete_channel_history.py
x-blood/slack-delete-channel-history
1
6621635
import urllib.request import urllib.parse import datetime import json import time import os from datetime import timedelta def lambda_handler(event, context): print('Start lambda_handler') token = os.environ['SLACK_DELETE_CHANNEL_HISTORY_APP_TOKEN'] print('env token : %s', token) channel = event['TAR...
import urllib.request import urllib.parse import datetime import json import time import os from datetime import timedelta def lambda_handler(event, context): print('Start lambda_handler') token = os.environ['SLACK_DELETE_CHANNEL_HISTORY_APP_TOKEN'] print('env token : %s', token) channel = event['TAR...
none
1
2.52485
3
run-pollination.py
fossabot/natcap-invest-docker
0
6621636
<reponame>fossabot/natcap-invest-docker # coding=UTF-8 # hardcoded demo runner script for the pollination model import time import sys import os import logging import natcap.invest.pollination logging.basicConfig(stream=sys.stdout, level=logging.WARN) def now(): return int(time.time() * 1000.0) start_ms = now() ...
# coding=UTF-8 # hardcoded demo runner script for the pollination model import time import sys import os import logging import natcap.invest.pollination logging.basicConfig(stream=sys.stdout, level=logging.WARN) def now(): return int(time.time() * 1000.0) start_ms = now() print('[INFO] starting up') args = { ...
en
0.685762
# coding=UTF-8 # hardcoded demo runner script for the pollination model # somewhat following https://vinta.ws/code/remotely-debug-a-python-app-inside-a-docker-container-in-visual-studio-code.html
1.986831
2
mara_app/views.py
alexeyegorov/mara-app
15
6621637
<filename>mara_app/views.py """Mara admin views""" import copy import functools import html import sys import types import typing import flask from mara_app import monkey_patch from mara_page import acl, navigation, response, _, bootstrap, xml blueprint = flask.Blueprint('mara_app', __name__, url_prefix='/mara-app',...
<filename>mara_app/views.py """Mara admin views""" import copy import functools import html import sys import types import typing import flask from mara_app import monkey_patch from mara_page import acl, navigation, response, _, bootstrap, xml blueprint = flask.Blueprint('mara_app', __name__, url_prefix='/mara-app',...
en
0.81992
Mara admin views Gathers all configuration modules and their functions # gather all config functions by package # The navigation sidebar is loaded asynchronously for better rendering experience
2.149203
2
tests/base/__init__.py
reitermarkus/proxmoxer
0
6621638
__author__ = "<NAME>" __copyright__ = "(c) <NAME> 2013-2017" __license__ = "MIT"
__author__ = "<NAME>" __copyright__ = "(c) <NAME> 2013-2017" __license__ = "MIT"
none
1
0.971415
1
Python3/718.py
rakhi2001/ecom7
854
6621639
__________________________________________________________________________________________________ sample 180 ms submission class Solution: def findLength(self, A: List[int], B: List[int]) -> int: # dp """ m, n = len(A), len(B) # dp[i][j]: max common prefix length of A[:(i + 1)]...
__________________________________________________________________________________________________ sample 180 ms submission class Solution: def findLength(self, A: List[int], B: List[int]) -> int: # dp """ m, n = len(A), len(B) # dp[i][j]: max common prefix length of A[:(i + 1)]...
en
0.425622
# dp m, n = len(A), len(B) # dp[i][j]: max common prefix length of A[:(i + 1)], B[:(j + 1)] dp = [ [0] * n for _ in range(m) ] max_len = 0 for j in range(n): dp[0][j] = int(A[0] == B[j]) max_len = max(max_len, dp[0][j]) ...
3.391951
3
eva_storage/jvc/jvc.py
jaehobang/cs7643_project
0
6621640
<filename>eva_storage/jvc/jvc.py """ In this file, we implement a wrapper around the whole process """ from eva_storage.jvc.encoder import Encoder from eva_storage.jvc.decoder import Decoder from eva_storage.jvc.preprocessor import Preprocessor from loaders.seattle_loader import SeattleLoader import os """ Not...
<filename>eva_storage/jvc/jvc.py """ In this file, we implement a wrapper around the whole process """ from eva_storage.jvc.encoder import Encoder from eva_storage.jvc.decoder import Decoder from eva_storage.jvc.preprocessor import Preprocessor from loaders.seattle_loader import SeattleLoader import os """ Not...
en
0.518865
In this file, we implement a wrapper around the whole process Notes: Preprocessor: self.hierarchy_save_dir = os.path.join('/nethome/jbang36/eva_jaeho/data/frame_hierarchy', video_type, video_name + '.npy') ...
2.303981
2
durak.py
arteum33/HW_Lesson_9_full_version
0
6621641
<reponame>arteum33/HW_Lesson_9_full_version<gh_stars>0 import random # масти SPADES = '♠' HEARTS = '♥' DIAMS = '♦' CLUBS = '♣' # достоинтсва карт NOMINALS = ['6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A'] # поиск индекса по достоинству NAME_TO_VALUE = {n: i for i, n in enumerate(NOMINALS)} # карт в руке при раздаче ...
import random # масти SPADES = '♠' HEARTS = '♥' DIAMS = '♦' CLUBS = '♣' # достоинтсва карт NOMINALS = ['6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A'] # поиск индекса по достоинству NAME_TO_VALUE = {n: i for i, n in enumerate(NOMINALS)} # карт в руке при раздаче CARDS_IN_HAND_MAX = 6 N_PLAYERS = 2 # эталонная колод...
ru
0.944878
# масти # достоинтсва карт # поиск индекса по достоинству # карт в руке при раздаче # эталонная колода (каждая масть по каждому номиналу) - 36 карт # atack card: defend card
3.42408
3
src/riski/_raster.py
GFDRR/RISKi
0
6621642
from typing import Dict, List from types import MethodType import os import re import inspect import psycopg2 as pg import riski as ri from riski._utils import load_settings, generate_config def _test(): pass
from typing import Dict, List from types import MethodType import os import re import inspect import psycopg2 as pg import riski as ri from riski._utils import load_settings, generate_config def _test(): pass
none
1
1.498357
1
xfer/utils.py
0xflotus/xfer
244
6621643
# Copyright 2018 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://www.apache.org/licenses/LICENSE-2.0 # # or in th...
# Copyright 2018 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://www.apache.org/licenses/LICENSE-2.0 # # or in th...
en
0.768433
# Copyright 2018 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://www.apache.org/licenses/LICENSE-2.0 # # or in th...
2.176381
2
eliza/Eliza.py
arsatis/nlp-eliza
0
6621644
from eliza.controller.commands.CommandParser import CommandParser from eliza.controller.util.PorterStemmer import PorterStemmer class Eliza: __name = 'Eliza' __responsePrefix = __name + ': ' __inputPrefix = 'You: ' def __init__(self): print(self.__responsePrefix + "Hello! I'm " + self.__name +...
from eliza.controller.commands.CommandParser import CommandParser from eliza.controller.util.PorterStemmer import PorterStemmer class Eliza: __name = 'Eliza' __responsePrefix = __name + ': ' __inputPrefix = 'You: ' def __init__(self): print(self.__responsePrefix + "Hello! I'm " + self.__name +...
en
0.924358
# user input as a string, after stemming #
3.187156
3
tests/conftest.py
shushpanov/async-jaeger
0
6621645
<gh_stars>0 import mock import pytest from async_jaeger import ConstSampler, Tracer @pytest.fixture(scope='function') def tracer(): reporter = mock.MagicMock() sampler = ConstSampler(True) return Tracer( service_name='test_service_1', reporter=reporter, sampler=sampler )
import mock import pytest from async_jaeger import ConstSampler, Tracer @pytest.fixture(scope='function') def tracer(): reporter = mock.MagicMock() sampler = ConstSampler(True) return Tracer( service_name='test_service_1', reporter=reporter, sampler=sampler )
none
1
2.046048
2
__main__.py
David-Lor/FastAPI-Pydantic-SQLAlchemy-PetShelter-API
1
6621646
<filename>__main__.py from pet_shelter_api import run run()
<filename>__main__.py from pet_shelter_api import run run()
none
1
0.828807
1
data/train/python/4128e2da4777bbc0e5da663a212927a855d29ff1main.py
harshp8l/deep-learning-lang-detection
84
6621647
<filename>data/train/python/4128e2da4777bbc0e5da663a212927a855d29ff1main.py from Tests import runTest from Controller import * from Domain import * from Repository import * from Repository.file_repository import client_file from Repository.file_repository import movie_file from Repository.file_repository import rent_fi...
<filename>data/train/python/4128e2da4777bbc0e5da663a212927a855d29ff1main.py from Tests import runTest from Controller import * from Domain import * from Repository import * from Repository.file_repository import client_file from Repository.file_repository import movie_file from Repository.file_repository import rent_fi...
none
1
2.100312
2
buildbulk.py
x-squared/chem-mov
0
6621648
from ase import * from ase.build import bulk from ase.visualize import view a1 = bulk('Al', 'fcc', a=3.567) view(a1)
from ase import * from ase.build import bulk from ase.visualize import view a1 = bulk('Al', 'fcc', a=3.567) view(a1)
none
1
1.555819
2
scripts/fig_param.py
jennhsiao/ideotype
2
6621649
"""Fig. Param.""" import os import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from sklearn import preprocessing from palettable.colorbrewer.sequential import YlGnBu_8 df_params = pd.read_csv( '/home/disk/eos8/ach315/upscale/params/param_fixpd.csv') outpath = '/home/disk/eos8/ach315/upscal...
"""Fig. Param.""" import os import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from sklearn import preprocessing from palettable.colorbrewer.sequential import YlGnBu_8 df_params = pd.read_csv( '/home/disk/eos8/ach315/upscale/params/param_fixpd.csv') outpath = '/home/disk/eos8/ach315/upscal...
en
0.214496
Fig. Param. # All params # Small params fig
2.235598
2
LollypopCatToy.py
bytedreamer/LollypopCatToy
1
6621650
<reponame>bytedreamer/LollypopCatToy<gh_stars>1-10 from flask import render_template, make_response from flask.ext.recaptcha import ReCaptcha from uuid import uuid4, UUID from application import create_app, add_to_queue, socketio, activate_cat_toy __author__ = '<NAME>' app = create_app() reCaptcha = ReCaptcha(app) ...
from flask import render_template, make_response from flask.ext.recaptcha import ReCaptcha from uuid import uuid4, UUID from application import create_app, add_to_queue, socketio, activate_cat_toy __author__ = '<NAME>' app = create_app() reCaptcha = ReCaptcha(app) @app.route('/') def index(): return render_temp...
none
1
2.45917
2