max_stars_repo_path stringlengths 4 237 | max_stars_repo_name stringlengths 6 117 | max_stars_count int64 0 95.2k | id stringlengths 1 7 | content stringlengths 12 593k | input_ids listlengths 7 549k |
|---|---|---|---|---|---|
basic/arithmetic.py | anuragarwalkar/basic-python | 0 | 118477 | <reponame>anuragarwalkar/basic-python
# Arithmetic Operators
import math
print(math.ceil(2.9)) # 3
print(math.floor(2.9)) # 2
print(10+3) # 13
print(10-3) # 7
print(10/3) # 3.3 Floating point number
print(10//3) # 3 Int
print(10%3) # 1
print(10*3) # 30
print(10**3) # 1000 10 to the power of 3
print(abs(-2.9)) # 2.9... | [
1,
529,
276,
1112,
420,
29958,
273,
332,
28641,
20919,
279,
29914,
16121,
29899,
4691,
13,
29937,
826,
18542,
6607,
4097,
13,
5215,
5844,
13,
13,
2158,
29898,
755,
29889,
27696,
29898,
29906,
29889,
29929,
876,
396,
29871,
29941,
13,
13... |
scripts/generate_ramachandran_statistics.py | leimao/Ramachandran | 2 | 131836 | <gh_stars>1-10
import ramachandran.statistics
ramachandran.statistics.count_torsion_angles_from_directory(dir_path="./pdbx_collections_resolution_1p0", save_file_path="./data/probability.npz", b_factor_threshold=30, resolution=90, num_processes=12)
ramachandran.statistics.compute_gaussian_kde_densities_from_directory... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
13472,
496,
392,
661,
29889,
6112,
6765,
13,
13,
2572,
496,
392,
661,
29889,
6112,
6765,
29889,
2798,
29918,
29873,
943,
291,
29918,
19536,
29918,
3166,
29918,
... |
calibrate.py | malcolmdimeglio/pow_alert | 0 | 183798 | <filename>calibrate.py
#! /usr/bin/env python
import os
import cv2
import numpy as np
from matplotlib import pyplot as plt
from dotenv import load_dotenv, find_dotenv
from logger import *
load_dotenv(find_dotenv())
curr_dir = os.path.dirname(os.path.realpath(__file__))
cypress_cal_img =f"{curr_dir}/templates/SnowSt... | [
1,
529,
9507,
29958,
1052,
4626,
403,
29889,
2272,
13,
29937,
29991,
847,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
5215,
2897,
13,
5215,
13850,
29906,
13,
5215,
12655,
408,
7442,
13,
3166,
22889,
1053,
11451,
5317,
408,
14770,
13,
... |
growler/middleware/responsetime.py | pyGrowler/Growler | 806 | 191468 | <reponame>pyGrowler/Growler
#
# growler/middleware/responsetime.py
#
"""
Provides middleware which adds a header indicating how long the request took to
process
"""
import time
import logging
logger = logging.getLogger(__name__)
class ResponseTime:
"""
Middleware which saves the time when initially called, ... | [
1,
529,
276,
1112,
420,
29958,
2272,
29954,
798,
1358,
29914,
29954,
798,
1358,
13,
29937,
13,
29937,
6548,
1358,
29914,
17662,
2519,
29914,
26679,
5410,
29889,
2272,
13,
29937,
13,
15945,
29908,
13,
1184,
29894,
2247,
7256,
2519,
607,
... |
test_calculator.py | Kidatoy/Advanced-Calculator | 0 | 11307 | <reponame>Kidatoy/Advanced-Calculator
import unittest # https://docs.python.org/3/library/unittest.html
from modules.calculator import Calculator as Calc
class TestCalculator(unittest.TestCase):
"""
Test Driven Development Unittest File
Module: Calculator
Updated: 12/16/2019
Author: <NAME>
"""... | [
1,
529,
276,
1112,
420,
29958,
29968,
333,
1219,
29891,
29914,
3253,
16858,
29899,
27065,
1061,
13,
5215,
443,
27958,
396,
2045,
597,
2640,
29889,
4691,
29889,
990,
29914,
29941,
29914,
5258,
29914,
348,
27958,
29889,
1420,
13,
3166,
1058... |
transform.py | ShrillP/ImageScanner | 0 | 57770 | <filename>transform.py<gh_stars>0
import numpy as np
import cv2
def order_points(points):
rectangle = np.zeros((4, 2), dtype="float32")
s = points.sum(axis=1)
rectangle[0] = points[np.argmin(s)]
rectangle[2] = points[np.argmax(s)]
difference = np.diff(points, axis=1)
rectangle[1] = points[np... | [
1,
529,
9507,
29958,
9067,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
12655,
408,
7442,
13,
5215,
13850,
29906,
13,
13,
13,
1753,
1797,
29918,
9748,
29898,
9748,
1125,
13,
1678,
16701,
353,
7442,
29889,
3298,
3... |
hello_world_cpp/launch/server.launch.py | fjnkt98/hello_world | 0 | 48931 | import launch
import launch_ros
def generate_launch_description():
server_node_container = launch_ros.actions.ComposableNodeContainer(
node_name='server_node_container',
node_namespace='',
package='rclcpp_components',
node_executable='component_container',
... | [
1,
1053,
6826,
13,
5215,
6826,
29918,
1883,
13,
13,
13,
1753,
5706,
29918,
15343,
29918,
8216,
7295,
13,
1678,
1923,
29918,
3177,
29918,
7611,
353,
6826,
29918,
1883,
29889,
7387,
29889,
1523,
1066,
519,
4247,
7895,
29898,
13,
9651,
294... |
Vigenere/decoder.py | zF4ke/Ciphr | 0 | 194004 | from operator import sub
word = str(input("Type the word to be decrypted: ")).strip().lower().replace(" ", "")
key = str(input("Type the vigenere key: ")).strip().lower().replace(" ", "")
nkey = 0
res, w, letters, srettel = "", "", " abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz ", " zyxwvutsrqponmlkjihgfedcbaz... | [
1,
515,
5455,
1053,
1014,
13,
13,
1742,
353,
851,
29898,
2080,
703,
1542,
278,
1734,
304,
367,
1602,
14740,
29901,
376,
8106,
17010,
2141,
13609,
2141,
6506,
703,
9162,
20569,
13,
1989,
353,
851,
29898,
2080,
703,
1542,
278,
325,
2101... |
Python/PythonIntro/Exercises.py | IQSS/workshops | 30 | 102942 | # ---
# jupyter:
# jupytext:
# formats: ipynb,md,py:light
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.3'
# jupytext_version: 0.8.6
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# # Introduction to Py... | [
1,
396,
11474,
13,
29937,
432,
786,
25547,
29901,
13,
29937,
259,
432,
786,
29891,
726,
29901,
13,
29937,
268,
21971,
29901,
10377,
948,
29890,
29892,
3487,
29892,
2272,
29901,
4366,
13,
29937,
268,
1426,
29918,
276,
26081,
29901,
13,
2... |
examples/fire.py | pombreda/py-lepton | 7 | 13028 | <filename>examples/fire.py
#############################################################################
#
# Copyright (c) 2008 by <NAME> and contributors
# All Rights Reserved.
#
# This software is subject to the provisions of the MIT License
# A copy of the license should accompany this distribution.
# THE SOFTWARE I... | [
1,
529,
9507,
29958,
19057,
29914,
8696,
29889,
2272,
13,
13383,
13383,
13383,
13383,
7346,
4136,
29937,
13,
29937,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29900,
29947,
491,
529,
5813,
29958,
322,
17737,
29560,
13,
... |
server/ahj_app/tests/test_misc_views.py | btansy/ahj-registry | 0 | 90490 | <filename>server/ahj_app/tests/test_misc_views.py
from django.urls import reverse
from django.conf import settings
from ahj_app.models import User, Edit, Comment
from fixtures import *
import pytest
import datetime
@pytest.mark.django_db
def test_form_validator__username_exists(generate_client_with_webpage_credentials... | [
1,
529,
9507,
29958,
2974,
29914,
801,
29926,
29918,
932,
29914,
21150,
29914,
1688,
29918,
29885,
10669,
29918,
7406,
29889,
2272,
13,
3166,
9557,
29889,
26045,
1053,
11837,
13,
3166,
9557,
29889,
5527,
1053,
6055,
13,
3166,
21023,
29926,
... |
educative/course1/graphs/ch2_dfs.py | liveroot/ambition2020 | 0 | 51603 | <gh_stars>0
import educative.course1.stacks_queues.stack as s
import educative.course1.graphs.graph as g
input_num_vertices = 5
input_edges = {0: [1, 2], 1: [3, 4]}
expected_output = "02143 or 02134 or 01432 or 01342"
# this code implements Depth First Traversal in a graph. Each element in the graph's adjacency list... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
6320,
1230,
29889,
15775,
29896,
29889,
1429,
29879,
29918,
802,
1041,
29889,
1429,
408,
269,
13,
5215,
6320,
1230,
29889,
15775,
29896,
29889,
4262,
29879,
29889,
4262,
408,
330,
1... |
hexun/hexun/items.py | judypol/pytonStudy | 0 | 1612353 | <filename>hexun/hexun/items.py
# -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
import scrapy
from scrapy import Field
class HexunItem(scrapy.Item):
# define the fields for your item here like:
product=Field... | [
1,
529,
9507,
29958,
20970,
348,
29914,
20970,
348,
29914,
7076,
29889,
2272,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
29937,
22402,
1244,
278,
4733,
363,
596,
885,
2390,
287,
4452,
13,
... |
python/cendalytics/report/core/dmo/record_retriever.py | jiportilla/ontology | 0 | 120233 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from tabulate import tabulate
from base import BaseObject
from datamongo import BaseMongoClient
from datamongo import CendantCollection
from datamongo import CendantXdm
from datamongo import TransformCendantRecords
class RecordRetriever(BaseObject):
def __init__(s... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
13,
3166,
4434,
5987,
1053,
4434,
5987,
13,
13,
3166,
2967,
1053,
7399,
2061,
13,
3166,
1418,
31... |
tweet.py | m-r-moon/videographer | 0 | 88864 | <gh_stars>0
###############################
# Filename: tweet.py #
# Author: <NAME> #
###############################
import tweepy
from time import sleep
from credentials import *
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_secret)
api = tweepy.A... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
13383,
7346,
4136,
2277,
29937,
13,
29937,
2514,
3871,
29901,
7780,
300,
29889,
2272,
3986,
396,
13,
29937,
13361,
29901,
529,
5813,
29958,
418,
396,
13,
13383,
7346,
4136,
2277,
29937,
... |
tests/test_groups.py | daylinmorgan/click-rich-help | 4 | 182754 | <gh_stars>1-10
import click
from click_rich_help import StyledCommand, StyledGroup
def test_command_group(runner):
@click.group(
cls=StyledGroup,
command_groups={"main": ["cmd1", "cmd2"]},
)
def cli():
pass
@cli.command(cls=StyledCommand, styles={"header": "yellow", "option":... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
2828,
13,
13,
3166,
2828,
29918,
4018,
29918,
8477,
1053,
624,
29891,
839,
6255,
29892,
624,
29891,
839,
4782,
13,
13,
13,
1753,
1243,
29918,
6519,
29918,
297... |
sigm/ia/views.py | mariobp/SIGM | 0 | 106899 | <reponame>mariobp/SIGM<gh_stars>0
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.shortcuts import render, redirect
from django.http import HttpResponse
from django.contrib.auth.decorators import login_required
from django.contrib.auth import login, logout, authenticate
import models
import... | [
1,
529,
276,
1112,
420,
29958,
29885,
2628,
25288,
29914,
5425,
21576,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
4770,
29888,
9130,
1649,
1053... |
src/genui/settings/__init__.py | Tontolda/genui | 15 | 60558 | """
__init__.py
Created by: <NAME>
On: 4/27/20, 10:49 AM
"""
| [
1,
9995,
13,
1649,
2344,
26914,
2272,
13,
13,
20399,
491,
29901,
529,
5813,
29958,
13,
2951,
29901,
29871,
29946,
29914,
29906,
29955,
29914,
29906,
29900,
29892,
29871,
29896,
29900,
29901,
29946,
29929,
13862,
13,
15945,
29908,
13,
13,
... |
sandbox/decorator_def.py | olileger/sBeull | 0 | 136106 | import functools
def FuncDecoratorOne(func):
@functools.wraps(func)
def wrapper(*args, **kwargs):
print("Calling: ", func.__name__)
return func(*args, **kwargs)
return wrapper
def FuncDecoratorListProperties(func):
@functools.wraps(func)
def wrapper(*args, **kwargs):
print... | [
1,
1053,
2090,
312,
8789,
13,
13,
1753,
383,
4661,
6185,
272,
1061,
6716,
29898,
9891,
1125,
13,
1678,
732,
7692,
312,
8789,
29889,
29893,
336,
567,
29898,
9891,
29897,
13,
1678,
822,
14476,
10456,
5085,
29892,
3579,
19290,
1125,
13,
... |
RIPv2-Simulation/Router.py | vkmanojk/Networks-VirtualLAN | 0 | 8171 | '''
Summary: Program that implements a routing deamon based on the
RIP version 2 protocol from RFC2453.
Usage: python3 Router.py <router_config_file>
Configuration File:
The user supplies a router configuration file of the format:
[Setting... | [
1,
14550,
30004,
13,
1678,
6991,
5219,
29901,
7835,
393,
10703,
263,
21398,
316,
314,
265,
2729,
373,
278,
6756,
13,
632,
390,
5690,
1873,
29871,
29906,
9608,
515,
390,
8610,
29906,
29946,
29945,
29941,
22993,
13,
1678,
6756,
13,
1678,
... |
skylib/extraction/__init__.py | SkynetRTN/skylib | 1 | 102625 | """
SkyLib source extraction functions - a replacement for SExtractor.
main: high-level source extraction interface.
isophotal: a fast implementation of isophotal analysis.
"""
from .main import *
| [
1,
9995,
13,
29903,
3459,
14868,
2752,
4805,
428,
3168,
448,
263,
16920,
363,
3725,
486,
28891,
29889,
13,
13,
3396,
29901,
1880,
29899,
5563,
2752,
4805,
428,
5067,
29889,
13,
275,
3021,
7288,
29901,
263,
5172,
5314,
310,
338,
3021,
... |
scan/biotools.py | dubinnyi/rcsbscan | 0 | 187622 | <filename>scan/biotools.py
import gzip
import sys, os
import warnings
import time
from Bio.PDB.PDBExceptions import PDBConstructionWarning
import re
from Bio.PDB.mmtf import MMTFParser
from Bio.PDB import *
from Bio.Seq import Seq
from Bio.Data import IUPACData
import Bio.SVDSuperimposer
import multiprocessing as mp... | [
1,
529,
9507,
29958,
16192,
29914,
5365,
327,
8789,
29889,
2272,
13,
5215,
330,
7554,
13,
5215,
10876,
29892,
2897,
13,
5215,
18116,
13,
5215,
931,
13,
3166,
21184,
29889,
29925,
4051,
29889,
29925,
4051,
2451,
29879,
1053,
349,
4051,
1... |
instance/config.py | Alweezy/cp2-bucketlist-api | 1 | 69746 | <reponame>Alweezy/cp2-bucketlist-api
import os
class Config(object):
"""Parent configuration class."""
DEBUG = False
CSRF_ENABLED = True
SECRET_KEY = os.getenv('SECRET_KEY')
SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL')
class DevelopmentConfig(Config):
"""Configurations for Development... | [
1,
529,
276,
1112,
420,
29958,
2499,
705,
29872,
1537,
29914,
6814,
29906,
29899,
21454,
1761,
29899,
2754,
13,
5215,
2897,
13,
13,
13,
1990,
12782,
29898,
3318,
1125,
13,
1678,
9995,
9780,
5285,
770,
1213,
15945,
13,
1678,
21681,
353,
... |
migrations/0018_auto_20180326_0331.py | tkhjp/editor_tkh | 0 | 77708 | <gh_stars>0
# Generated by Django 2.0.2 on 2018-03-26 03:31
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('editor', '0017_knowledge_point_list_grade'),
]
operations = [
migrations.AlterField(
model_name='question_upload',
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
3251,
630,
491,
15337,
29871,
29906,
29889,
29900,
29889,
29906,
373,
29871,
29906,
29900,
29896,
29947,
29899,
29900,
29941,
29899,
29906,
29953,
29871,
29900,
29941,
29901,
29941,
29... |
Oefeningen/standalone/list_comprehension_4.py | Seviran/Python_3 | 0 | 24049 |
string_input = "amazing"
vowels = "aeiou"
answer = [char for char in string_input if char not in vowels]
print(answer)
| [
1,
29871,
13,
1807,
29918,
2080,
353,
376,
314,
834,
292,
29908,
13,
29894,
340,
1379,
353,
376,
3660,
29875,
283,
29908,
13,
12011,
353,
518,
3090,
363,
1373,
297,
1347,
29918,
2080,
565,
1373,
451,
297,
325,
340,
1379,
29962,
13,
... |
source/methods_upload_workspace_stats.py | CheyenneNS/metrics | 0 | 1603628 | <reponame>CheyenneNS/metrics
from pymongo import MongoClient
from pymongo import ReadPreference
from biokbase.workspace.client import Workspace
import json as _json
import os
import mysql.connector as mysql
import requests
import time
from datetime import date
#import pprint
requests.packages.urllib3.disable_warnings(... | [
1,
529,
276,
1112,
420,
29958,
26856,
29891,
4584,
3059,
29914,
2527,
10817,
13,
3166,
282,
962,
7443,
1053,
18294,
4032,
13,
3166,
282,
962,
7443,
1053,
7523,
29925,
5679,
13,
3166,
4768,
554,
3188,
29889,
1287,
3493,
29889,
4645,
1053... |
neviseh/persian/numbers.py | meyt/neviseh | 0 | 189886 | <filename>neviseh/persian/numbers.py
from . import PersianTextBase
class PersianNumbers(PersianTextBase):
def translate_arabic_numbers(self):
"""
Translate Arabic numbers to Persian
:return:
"""
characters_map = {
'١': '۱',
'٢': '۲',
'٣'... | [
1,
529,
9507,
29958,
484,
29894,
895,
29882,
29914,
6774,
713,
29914,
20326,
29889,
2272,
13,
3166,
869,
1053,
9034,
713,
1626,
5160,
13,
13,
13,
1990,
9034,
713,
29478,
29898,
15136,
713,
1626,
5160,
1125,
13,
13,
1678,
822,
14240,
2... |
pyrevolve/genotype/learning_body/crossover.py | braj29/robo_swimmers | 0 | 72173 | <reponame>braj29/robo_swimmers
from typing import List
from .config import Config
from pyrevolve.genotype.genotype import Genotype
def crossover(parents: List[Genotype], config: Config) -> Genotype:
return parents[0]
| [
1,
529,
276,
1112,
420,
29958,
2634,
29926,
29906,
29929,
29914,
307,
833,
29918,
2774,
6727,
414,
13,
3166,
19229,
1053,
2391,
13,
3166,
869,
2917,
1053,
12782,
13,
3166,
11451,
276,
1555,
345,
29889,
1885,
327,
668,
29889,
1885,
327,
... |
bot/main.py | EJH2/IQ-Discord | 1 | 193132 | # coding=utf-8
"""Main bot file"""
import aiohttp
import time
from collections import Counter, deque
from pathlib import Path
import discord
from discord.ext import commands
from pyppeteer import launch, errors
from bot.utils.logging import setup_logger
from bot.utils.over import send, _default_help_command
discord... | [
1,
396,
14137,
29922,
9420,
29899,
29947,
13,
15945,
29908,
6330,
9225,
934,
15945,
29908,
13,
5215,
263,
601,
1124,
13,
5215,
931,
13,
3166,
16250,
1053,
315,
5336,
29892,
316,
802,
13,
3166,
2224,
1982,
1053,
10802,
13,
13,
5215,
23... |
dbaas/drivers/mysqlpercona.py | didindinn/database-as-a-service | 303 | 78614 | from . import mysqldb
from physical.models import Instance
class MySQLPercona(mysqldb.MySQL):
def get_default_instance_type(self):
return Instance.MYSQL_PERCONA
@classmethod
def topology_name(cls):
return ['mysql_percona_single']
class MySQLPerconaFOXHA(mysqldb.MySQLFOXHA):
def ge... | [
1,
515,
869,
1053,
15534,
430,
29890,
13,
3166,
9128,
29889,
9794,
1053,
2799,
749,
13,
13,
13,
1990,
9254,
5894,
535,
29874,
29898,
19268,
430,
29890,
29889,
3421,
4176,
1125,
13,
13,
1678,
822,
679,
29918,
4381,
29918,
8758,
29918,
... |
examples/max_min.py | csunny/algorithm | 21 | 70927 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
def max_min(v):
m_min, m_max = min(v[0], v[-1]), max(v[0], v[-1])
for i in v[1:len(v)-1]:
if i<m_min:
m_min = i
elif i > m_max:
m_max = i
return m_min, m_max
if __name__ == '__main__':
m_min, m_max = max_min([9, ... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
9420,
29899,
29947,
448,
29930,
29899,
13,
13,
1753,
4236,
29918,
1195,
29898,
29894,
1125,
13,
1678,
286,
29918,
1195,
29892,
286,
29918,
3317,
3... |
workflows/pangenome-generate/sort_fasta_by_quality_and_len.py | AndreaGuarracino/bh20-seq-resource | 2 | 138778 | #!/usr/bin/env python3
# Sort the sequences by quality (percentage of number of N bases not called, descending) and by length (descending).
# The best sequence is the longest one, with no uncalled bases.
import os
import sys
import gzip
#import xxhash # Faster library
import hashlib
def open_gzipsafe(path_file):
... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
29937,
20025,
278,
15602,
491,
11029,
313,
25376,
482,
310,
1353,
310,
405,
22561,
451,
2000,
29892,
5153,
2548,
29897,
322,
491,
3309,
313,
14273,
2548,
467,
13,
29937,
450... |
plugins/welcome.py | su226/IdhagnBot | 2 | 1616563 | <reponame>su226/IdhagnBot
from util.config import BaseConfig, Field
from nonebot.adapters.onebot.v11 import Bot, Event, Message
import nonebot
class Config(BaseConfig):
__file__ = "welcome"
welcome: dict[int, str] = Field(default_factory=dict)
leave: set[int] = Field(default_factory=set)
CONFIG = Config.load()
... | [
1,
529,
276,
1112,
420,
29958,
2146,
29906,
29906,
29953,
29914,
1204,
29882,
4211,
29933,
327,
13,
3166,
3667,
29889,
2917,
1053,
7399,
3991,
29892,
8989,
13,
3166,
5642,
7451,
29889,
328,
481,
2153,
29889,
650,
7451,
29889,
29894,
29896... |
interceptor/jobs_wrapper.py | fossabot/interceptor | 0 | 132538 | # Copyright 2018 getcarrier.io
#
# 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 t... | [
1,
396,
259,
14187,
1266,
29871,
29906,
29900,
29896,
29947,
679,
4287,
4336,
29889,
601,
13,
29937,
13,
29937,
259,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
... |
FaceRecognitionWebsite/codeDesign/myDjango02/app01/migrations/0012_remove_getdatacss_copybook.py | ChunjunHu/FaceRecognitionLibraryWebsite | 1 | 169962 | # Generated by Django 2.0.1 on 2019-01-09 15:54
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('app01', '0011_auto_20190109_2351'),
]
operations = [
migrations.RemoveField(
model_name='getdatacss',
name='Co... | [
1,
396,
3251,
630,
491,
15337,
29871,
29906,
29889,
29900,
29889,
29896,
373,
29871,
29906,
29900,
29896,
29929,
29899,
29900,
29896,
29899,
29900,
29929,
29871,
29896,
29945,
29901,
29945,
29946,
30004,
13,
30004,
13,
3166,
9557,
29889,
2585... |
scripts/venv/lib/python2.7/site-packages/cogent/align/progressive.py | sauloal/cnidaria | 3 | 31612 | <gh_stars>1-10
#!/usr/bin/env python
from __future__ import with_statement
from cogent import LoadTree
from cogent.phylo import nj as NJ
from cogent.phylo.distance import EstimateDistances
from cogent.core.info import Info
from cogent.util import progress_display as UI
__author__ = "<NAME>"
__copyright__ = "Copyright... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
411,
29918,
20788,
13,
3166,
274,
468,
296,
1053,
16012,
9643,
13,
... |
PythonServer/UnitTestCasesForWebSocket.py | Cyberlightning/2D-3DCapture | 2 | 4916 | '''
Created on Mar 6, 2014
@author: tharanga
'''
import unittest
from time import sleep
import EventService as es
from EventService import WebSocketServer as ws
from EventService import EventManager as em
import socket
from base64 import b64encode
import struct
import MySQLdb
import json
import EventService
import fl... | [
1,
14550,
13,
20399,
373,
1085,
29871,
29953,
29892,
29871,
29906,
29900,
29896,
29946,
13,
13,
29992,
8921,
29901,
266,
279,
12686,
13,
12008,
13,
5215,
443,
27958,
13,
3166,
931,
1053,
8709,
13,
5215,
6864,
3170,
408,
831,
13,
3166,
... |
unionfind-component.py | surpace/shed | 2 | 181020 | class UnionFind:
def __init__(self, size):
self.parent = list(range(size))
self.component = [[i] for i in range(size)]
def root(self, i):
if self.parent[i] != i:
self.parent[i] = self.root(self.parent[i])
return self.parent[i]
def unite(self, i, j):
i, j = self.root(i), self.root(j... | [
1,
770,
7761,
12542,
29901,
13,
29871,
822,
4770,
2344,
12035,
1311,
29892,
2159,
1125,
13,
1678,
1583,
29889,
3560,
353,
1051,
29898,
3881,
29898,
2311,
876,
13,
1678,
1583,
29889,
9700,
353,
5519,
29875,
29962,
363,
474,
297,
3464,
29... |
capsNet.py | zhaoaite/ASTCapsNet | 0 | 33158 | """
License: Apache-2.0
Author: <NAME>
E-mail: <EMAIL>
"""
import tensorflow as tf
import rnn_cell_GRU as rnn_cell
import rnn
import numpy as np
from config import cfg
from utils import get_batch_data
from capsLayer import CapsLayer
from sklearn import metrics
import pickle
from sklearn.cross_validation import train... | [
1,
9995,
13,
29931,
293,
1947,
29901,
13380,
29899,
29906,
29889,
29900,
13,
13720,
29901,
529,
5813,
29958,
13,
29923,
29899,
2549,
29901,
529,
26862,
6227,
29958,
13,
15945,
29908,
13,
13,
5215,
26110,
408,
15886,
13,
5215,
364,
15755,
... |
vocoder/hifigan/env.py | 10088/MockingBird | 1 | 46337 | import os
import shutil
def build_env(config, config_name, path):
t_path = os.path.join(path, config_name)
if config != t_path:
os.makedirs(path, exist_ok=True)
shutil.copyfile(config, os.path.join(path, config_name))
| [
1,
1053,
2897,
13,
5215,
528,
4422,
13,
13,
1753,
2048,
29918,
6272,
29898,
2917,
29892,
2295,
29918,
978,
29892,
2224,
1125,
13,
1678,
260,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
2084,
29892,
2295,
29918,
978,
29897,
... |
python/deploy-cpu-alarms.py | earthlab/aws-ops | 1 | 37053 | # Deploy idle CPU alarms to stop EC2 instances
import boto3
account_id = boto3.client("sts").get_caller_identity().get("Account")
region = boto3.session.Session().region_name
client = boto3.client("cloudwatch")
ec = boto3.client("ec2")
reservations = ec.describe_instances()
exceptions = ["prf-"]
for r in reservation... | [
1,
396,
10034,
2376,
28132,
10808,
394,
279,
1516,
304,
5040,
17522,
29906,
8871,
13,
5215,
289,
3747,
29941,
13,
13,
10149,
29918,
333,
353,
289,
3747,
29941,
29889,
4645,
703,
303,
29879,
2564,
657,
29918,
4804,
261,
29918,
22350,
214... |
wirepas_backend_client/tools/utils.py | bencorrado/backend-client | 0 | 20802 | <gh_stars>0
"""
Utils
=======
Contains multipurpose utilities for serializing objects and obtaining
arguments from the command line.
.. Copyright:
Copyright 2019 Wirepas Ltd under Apache License, Version 2.0.
See file LICENSE for full license details.
"""
import binascii
import da... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
15945,
29908,
13,
1678,
22310,
29879,
13,
1678,
1275,
2751,
29922,
13,
13,
1678,
2866,
2708,
6674,
332,
4220,
3667,
1907,
363,
7797,
5281,
3618,
322,
4017,
292,
13,
1678,
6273,
515,
2... |
mooda/util/iplot/iplot_timeseries.py | rbardaji/mooda | 15 | 1606456 | <reponame>rbardaji/mooda
""" Implementation of WaterFrame.iplot_timeseries() """
import numpy as np
import plotly.graph_objects as go
def iplot_timeseries(list_wf, parameter_to_plot):
"""
It creates a Plotly figure with the time-series of the input parameter.
Parameters
----------
list_wf: Li... | [
1,
529,
276,
1112,
420,
29958,
6050,
538,
1175,
29875,
29914,
29885,
2092,
29874,
13,
15945,
29908,
1954,
14607,
310,
13062,
4308,
29889,
29875,
5317,
29918,
3706,
6358,
580,
9995,
13,
5215,
12655,
408,
7442,
13,
5215,
6492,
368,
29889,
... |
IGTI - Bootcamp Desenvolvedor Python/04/cap4/pygame/Cap2 - desenhando/desenhando_retangulo.py | ruginski/DS | 43 | 89395 | import pygame
from pygame.locals import *
from sys import exit
from random import *
pygame.init()
screen = pygame.display.set_mode((640, 480), 0, 32)
screen.lock()
for count in range(10):
random_color = (randint(0,255), randint(0,255), randint(0,255))
random_pos = (randint(0,639), randint(0,479))
random... | [
1,
1053,
22028,
13,
3166,
22028,
29889,
2997,
29879,
1053,
334,
13,
3166,
10876,
1053,
6876,
29871,
13,
13,
3166,
4036,
1053,
334,
13,
13,
2272,
11802,
29889,
2344,
580,
13,
10525,
353,
22028,
29889,
4990,
29889,
842,
29918,
8513,
3552,... |
Simulator/tournament.py | apayne19/DoubleAuctionMarket | 30 | 126936 | <reponame>apayne19/DoubleAuctionMarket<gh_stars>10-100
from Trader.trader import Trader_Shaver, Trader_ZIU, Trader_ZIC, Trader_Kaplan, Trader_PS, Trader_AA, Trader_GD, Trader_ZIP
import Institution.double_auction_institution as ins
import random
class Tournament(object):
""" A class that makes a trader"""
def... | [
1,
529,
276,
1112,
420,
29958,
481,
388,
484,
29896,
29929,
29914,
11843,
29909,
29884,
428,
9802,
300,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
3166,
1605,
1664,
29889,
509,
1664,
1053,
1605,
1... |
akilib/raspberrypi/AKI_I2C_LPS25H.py | nonNoise/akilib | 29 | 24428 | <filename>akilib/raspberrypi/AKI_I2C_LPS25H.py
#import mraa
import smbus
import time
I2C_ADDR = 0x5C
class AKI_I2C_LPS25H:
def __init__(self):
print "AKI_I2C_LPS25H"
self.i2c = smbus.SMBus(1)
def i2cReg(self,wr,addr=0x00,data=0x00):
try:
if(wr == "w"):
retu... | [
1,
529,
9507,
29958,
557,
15943,
29914,
3417,
29886,
16344,
1631,
29914,
22311,
29902,
29918,
29902,
29906,
29907,
29918,
29931,
7024,
29906,
29945,
29950,
29889,
2272,
13,
29937,
5215,
286,
336,
29874,
13,
13,
5215,
1560,
8262,
13,
5215,
... |
setup.py | MagnaXSoftware/popo | 0 | 146881 | <filename>setup.py<gh_stars>0
from setuptools import setup, find_packages
setup(
name="popo",
version="0.0.1",
url="https://github.com/MagnaXSoftware/popo",
license="MIT",
author="<NAME>",
author_email="<EMAIL>",
description="POPO gives you a simple, small, clean ORM with Plain Old Python O... | [
1,
529,
9507,
29958,
14669,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
731,
21245,
8789,
1053,
6230,
29892,
1284,
29918,
8318,
13,
13,
14669,
29898,
13,
1678,
1024,
543,
7323,
29877,
613,
13,
1678,
1873,
543,
2... |
et_micc2/templates/app-single-command/{{tmpl.project_name}}/{{tmpl.package_name}}/{{tmpl.cli_app_name}}.py | etijskens/et-micc2 | 0 | 184283 | <filename>et_micc2/templates/app-single-command/{{tmpl.project_name}}/{{tmpl.package_name}}/{{tmpl.cli_app_name}}.py
# -*- coding: utf-8 -*-
"""Command line interface {{tmpl.app_name}} (no sub-commands)."""
import sys
import click
@click.command()
@click.option('-v', '--verbosity', count=True
, help="T... | [
1,
529,
9507,
29958,
300,
29918,
13076,
29883,
29906,
29914,
20943,
29914,
932,
29899,
14369,
29899,
6519,
29914,
6224,
18276,
572,
29889,
4836,
29918,
978,
930,
29914,
6224,
18276,
572,
29889,
5113,
29918,
978,
930,
29914,
6224,
18276,
572... |
pkg/unix/Python27/Lib/site-packages/klei/textureconverter.py | hexgear-studio/ds_mod_tools | 112 | 199156 | import sys, os, tempfile, shutil
from PIL import Image
import util
import subprocess
'''
TOOL_PATH = os.path.join( os.path.dirname( __file__ ), "../../../../../../tools/bin" )
TEXTURE_CONVERTER = os.path.abspath( os.path.join( TOOL_PATH, "TextureConverter.exe" ) )
def Convert( src_filenames, dest_filename, t... | [
1,
1053,
10876,
29892,
2897,
29892,
5694,
1445,
29892,
528,
4422,
30004,
13,
3166,
349,
6227,
1053,
7084,
30004,
13,
5215,
3667,
30004,
13,
5215,
1014,
5014,
30004,
13,
30004,
13,
12008,
30004,
13,
4986,
5607,
29918,
10145,
353,
2897,
2... |
lib/coginvasion/hood/TTSafeZoneLoader.py | theclashingfritz/Cog-Invasion-Online-Dump | 1 | 1614361 | # uncompyle6 version 3.2.4
# Python bytecode 2.7 (62211)
# Decompiled from: Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)]
# Embedded file name: lib.coginvasion.hood.TTSafeZoneLoader
from lib.coginvasion.holiday.HolidayManager import HolidayType
import SafeZoneLoader, TTPlayground... | [
1,
396,
443,
2388,
1508,
29953,
1873,
29871,
29941,
29889,
29906,
29889,
29946,
13,
29937,
5132,
7023,
401,
29871,
29906,
29889,
29955,
313,
29953,
29906,
29906,
29896,
29896,
29897,
13,
29937,
897,
2388,
2356,
515,
29901,
5132,
29871,
2990... |
util/__init__.py | TinDang97/face_recognition | 6 | 64123 | <gh_stars>1-10
import cv2
import numpy
def normalize_L2(x):
assert isinstance(x, numpy.ndarray)
return x / numpy.sqrt(numpy.sum((x ** 2), keepdims=True, axis=1))
def cosine_similarity(x1, x2, skip_normalize=False):
if type(x1) is list:
x1 = numpy.array(x1)
if type(x2) is list:
x2 = ... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
13850,
29906,
13,
5215,
12655,
13,
13,
13,
1753,
4226,
675,
29918,
29931,
29906,
29898,
29916,
1125,
13,
1678,
4974,
338,
8758,
29898,
29916,
29892,
12655,
2988... |
scout/server/blueprints/login/views.py | szilvajuhos/scout | 0 | 1610778 | # -*- coding: utf-8 -*-
from datetime import datetime
from flask import (abort, current_app, Blueprint, flash, redirect, request,
session, url_for, render_template)
from flask_login import login_user, logout_user
from flask_oauthlib.client import OAuthException
from flask_ldap3_login.forms import LD... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
12865,
1053,
12865,
13,
13,
3166,
29784,
1053,
313,
370,
441,
29892,
1857,
29918,
932,
29892,
10924,
2158,
29892,
11013,
29892,
6684,
29892,
2009,
... |
feature/functions/feature_selection.py | manaranjoc/ResonanceImageClassification | 0 | 182297 | import numpy as np
from mlxtend.feature_selection import SequentialFeatureSelector as SFS
from sklearn.model_selection import KFold
from sklearn.feature_selection import SelectPercentile, mutual_info_classif
import sys
from pathlib import Path
sys.path[0] = str(Path(sys.path[0]).parent)
from metrics import metrics, m... | [
1,
1053,
12655,
408,
7442,
13,
3166,
286,
29880,
486,
355,
29889,
14394,
29918,
21731,
1053,
922,
339,
2556,
19132,
10378,
408,
317,
9998,
13,
3166,
2071,
19668,
29889,
4299,
29918,
21731,
1053,
476,
29943,
1025,
13,
3166,
2071,
19668,
... |
Bin/RepoTools/Scripts/GithubTools/github_preparation.py | stinvi/dava.engine | 26 | 170170 | #!/usr/bin/env python
import sys
import os
import argparse
import subprocess
class Preparation:
system_list = set(['.gitattributes', '.gitignore', '.gitmodules'])
white_list = set()
clear_list = set(['Bin/RepoTools/Scripts/GithubTools/white_list.txt', 'Bin/RepoTools/Scripts/GithubTools/github_preparation.... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
5215,
10876,
13,
5215,
2897,
13,
5215,
1852,
5510,
13,
5215,
1014,
5014,
13,
13,
13,
1990,
4721,
862,
362,
29901,
13,
1678,
1788,
29918,
1761,
353,
731,
18959,
29889,
5559,
15697,
74... |
packages/pyright-internal/src/tests/samples/paramInference1.py | Jasha10/pyright | 3,934 | 143288 | # This sample tests the logic that infers parameter types based on
# default argument values or annotated base class methods.
class Parent:
def func1(self, a: int, b: str) -> float:
...
class Child(Parent):
def func1(self, a, b):
reveal_type(self, expected_text="Self@Child")
reveal_t... | [
1,
396,
910,
4559,
6987,
278,
5900,
393,
3041,
414,
3443,
4072,
2729,
373,
13,
29937,
2322,
2980,
1819,
470,
9732,
630,
2967,
770,
3519,
29889,
13,
13,
13,
1990,
22280,
29901,
13,
1678,
822,
3653,
29896,
29898,
1311,
29892,
263,
29901... |
tests/integration/RoyaltiesPayment/test_withdrawals.py | MiracleCorunus/nft_royalties_market | 37 | 179164 | <reponame>MiracleCorunus/nft_royalties_market<gh_stars>10-100
import brownie
from brownie.test import strategy
import math
class StateMachine:
value = strategy("uint256", min_value=1, max_value="100 ether")
withdrawal = strategy("uint256", min_value=1, max_value="20 ether")
address = strategy("address", ... | [
1,
529,
276,
1112,
420,
29958,
29924,
29875,
10792,
12521,
348,
375,
29914,
29876,
615,
29918,
4727,
1997,
583,
29918,
28549,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
5215,
3347,
2786,
13,
3166,
... |
hackathon/column1/problem_10_4_LCA.py | abdurahmanadilovic/elements-of-programming-interviews | 0 | 84656 | from collections import defaultdict
class Node:
def __init__(self, value):
self.parent = None
self.value = value
def get_height(node):
height = 0
while node is not None:
height += 1
node = node.parent
return height
def solution2(node1, node2):
height1, height2... | [
1,
515,
16250,
1053,
2322,
8977,
13,
13,
13,
1990,
9071,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
995,
1125,
13,
4706,
1583,
29889,
3560,
353,
6213,
13,
4706,
1583,
29889,
1767,
353,
995,
13,
13,
13,
1753,
679,
29918,
3... |
train.py | HirataYurina/yoloV4-keras-techi | 6 | 140196 | # -*- coding:utf-8 -*-
# author:平手友梨奈ii
# e-mail:<EMAIL>
# datetime:1993/12/01
# filename:configs.py
# software: PyCharm
import numpy as np
import tensorflow as tf
import keras.backend as K
from keras.layers import Input, Lambda
from keras.models import Model
from keras.optimizers import Adam
from keras.callbacks impo... | [
1,
396,
448,
29930,
29899,
14137,
29901,
9420,
29899,
29947,
448,
29930,
29899,
13,
29937,
4148,
29901,
30606,
30880,
31373,
233,
165,
171,
31696,
2236,
13,
29937,
321,
29899,
2549,
29901,
29966,
26862,
6227,
29958,
13,
29937,
12865,
29901,... |
katana-nbi/katana/api/nfvo.py | afoteas/katana-slice_manager | 0 | 21295 | # -*- coding: utf-8 -*-
import logging
from logging import handlers
import pickle
import time
import uuid
from bson.binary import Binary
from bson.json_util import dumps
from flask import request
from flask_classful import FlaskView
import pymongo
from requests import ConnectTimeout, ConnectionError
from katana.share... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
5215,
12183,
13,
3166,
12183,
1053,
25795,
13,
5215,
5839,
280,
13,
5215,
931,
13,
5215,
318,
5416,
13,
13,
3166,
289,
1100,
29889,
19541,
1053,
29479,... |
mtr/sync/lib/converters.py | mtrgroup/django-mtr-import-export | 0 | 1614403 | from decimal import Decimal
from django.utils.six import text_type
from django.utils.encoding import smart_text
from .manager import manager
from ..translation import gettext_lazy as _
@manager.register('converter', label=_('Decimal'))
def decimal(value, action):
if value:
if isinstance(value, text_type... | [
1,
515,
13677,
1053,
3826,
3039,
13,
13,
3166,
9557,
29889,
13239,
29889,
28319,
1053,
1426,
29918,
1853,
13,
3166,
9557,
29889,
13239,
29889,
22331,
1053,
15040,
29918,
726,
13,
13,
3166,
869,
12847,
1053,
8455,
13,
3166,
6317,
3286,
1... |
omicexperiment/transforms/filters/taxonomy.py | bassio/omicexperiment | 7 | 190878 | import pandas as pd
from omicexperiment.transforms.transform import Filter, AttributeFilter, AttributeFlexibleOperatorMixin
class TaxonomyAttributeFilter(AttributeFilter, AttributeFlexibleOperatorMixin):
def __dapply__(self, experiment):
_op = self._op_function(experiment._counts_with_tax())
crite... | [
1,
1053,
11701,
408,
10518,
13,
3166,
2703,
625,
29916,
15362,
29889,
9067,
29879,
29889,
9067,
1053,
19916,
29892,
23833,
5072,
29892,
23833,
29943,
2506,
1821,
26486,
29924,
861,
262,
13,
13,
13,
1990,
17847,
21926,
6708,
5072,
29898,
6... |
scqubits/io_utils/fileio_backends.py | IlyaLSMmisis/scqubits-1 | 0 | 119290 | # fileio_backends.py
#
# This file is part of scqubits.
#
# Copyright (c) 2019, <NAME> and <NAME>
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
#######################################################... | [
1,
396,
934,
601,
29918,
1627,
1975,
29889,
2272,
13,
29937,
13,
29937,
910,
934,
338,
760,
310,
885,
339,
14836,
29889,
13,
29937,
13,
29937,
1678,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29929,
29892,
529,
5813,
29... |
db/settings.py | liuansen/python-utils-class | 3 | 163973 | # -*- coding:utf-8 -*-
# author:Anson
from __future__ import unicode_literals
MYSQL_DATABASES = {
'default': {
'ENGINE': 'mysql',
'NAME': '',
'USER': '',
'PASSWORD': '',
'HOST': '',
'PORT': '3306',
'STORAGE_ENGINE': 'INNODB',
}
}
REDIS_... | [
1,
396,
448,
29930,
29899,
14137,
29901,
9420,
29899,
29947,
448,
29930,
29899,
30004,
13,
29937,
4148,
30383,
2744,
1100,
30004,
13,
3166,
4770,
29888,
9130,
1649,
1053,
29104,
29918,
20889,
1338,
30004,
13,
30004,
13,
30004,
13,
17870,
... |
anstosstools/__init__.py | ericziethen/anstosstools | 0 | 56126 | """Root package for anstoss tools."""
| [
1,
9995,
10303,
3577,
363,
385,
303,
2209,
8492,
1213,
15945,
13,
2
] |
faker/providers/company/ro_RO/__init__.py | jeffwright13/faker | 3 | 139815 | from .. import Provider as CompanyProvider
class Provider(CompanyProvider):
formats = (
'{{last_name}} {{company_suffix}}',
'{{last_name}} {{last_name}} {{company_suffix}}',
'{{last_name}}',
)
company_suffixes = (
'SRL', 'SA', 'SCA', 'SNC', 'SCS', 'AFJ', 'ASF', 'CON', 'CR... | [
1,
515,
6317,
1053,
1019,
5489,
408,
6938,
6980,
13,
13,
13,
1990,
1019,
5489,
29898,
21410,
6980,
1125,
13,
13,
1678,
21971,
353,
313,
13,
4706,
525,
6224,
4230,
29918,
978,
930,
8620,
14518,
29918,
2146,
600,
861,
930,
742,
13,
47... |
Task/Non-decimal-radices-Convert/Python/non-decimal-radices-convert-2.py | djgoku/RosettaCodeData | 5 | 77439 | digits = "0123456789abcdefghijklmnopqrstuvwxyz"
def baseN(num,b):
return (((num == 0) and "0" )
or ( baseN(num // b, b).lstrip("0")
+ digits[num % b]))
# alternatively:
def baseN(num,b):
if num == 0: return "0"
result = ""
while num != 0:
num, d = divmod(num, b)
result += d... | [
1,
13340,
353,
376,
29900,
29896,
29906,
29941,
29946,
29945,
29953,
29955,
29947,
29929,
10736,
1753,
12443,
823,
6321,
23521,
459,
29939,
29878,
303,
4090,
29893,
20230,
29908,
13,
1753,
2967,
29940,
29898,
1949,
29892,
29890,
1125,
13,
2... |
demo.py | geerk/toradbapi | 1 | 170332 | <reponame>geerk/toradbapi
from __future__ import (absolute_import, division,
print_function, unicode_literals)
import tornado.httpserver
import tornado.ioloop
import tornado.options
import tornado.web
import tornado.gen
import tornado.platform.twisted
import mysql.connector
tornado.platform.tw... | [
1,
529,
276,
1112,
420,
29958,
479,
5968,
29914,
7345,
328,
29890,
2754,
13,
3166,
4770,
29888,
9130,
1649,
1053,
313,
23552,
29918,
5215,
29892,
8542,
29892,
13,
462,
4706,
1596,
29918,
2220,
29892,
29104,
29918,
20889,
1338,
29897,
13,
... |
PolTools/main_programs/align.py | GeoffSCollins/PolTools | 0 | 1613892 | import os
import sys
import subprocess
import argparse
from PolTools.utils.make_random_filename import generate_random_filename
from PolTools.utils.remove_files import remove_files
from multiprocessing import Pool
from collections import defaultdict
from statistics import mean
from shutil import rmtree
# TODO: Move ... | [
1,
1053,
2897,
13,
5215,
10876,
13,
5215,
1014,
5014,
13,
5215,
1852,
5510,
13,
13,
3166,
2043,
24183,
29889,
13239,
29889,
5675,
29918,
8172,
29918,
9507,
1053,
5706,
29918,
8172,
29918,
9507,
13,
3166,
2043,
24183,
29889,
13239,
29889,
... |
phase/jump_ge.py | ryos36/retro-for-FPGA | 0 | 133973 | class JUMP_GE:
def __init__(self, stack):
self.phase = 0
self.ip = 0
self.stack = stack
self.a = 0
def exec(self, ip, data):
if (self.phase == 0):
self.ip = ip + 1
self.a = self.stack.pop()
self.phase = 1
return False
... | [
1,
770,
435,
29965,
3580,
29918,
1692,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
5096,
1125,
13,
4706,
1583,
29889,
21646,
353,
29871,
29900,
13,
4706,
1583,
29889,
666,
353,
29871,
29900,
13,
4706,
1583,
29889,
1429,
353,
5... |
nrw/viersen.py | risklayer/corona-landkreis-crawler | 12 | 1601807 | <filename>nrw/viersen.py
#!/usr/bin/python3
from botbase import *
_viersen_cc = re.compile(r"([0-9.]+) neue Infektionen")
_viersen_s = re.compile(r"([0-9.]+|\w+) Menschen werden stationär behandelt", re.U)
_viersen_i = re.compile(r"([0-9.]+|\w+) befinden sich auf der Intensiv", re.U)
_viersen_q = re.compile(r"([0-9.]+... | [
1,
529,
9507,
29958,
29876,
13975,
29914,
1403,
414,
264,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
29941,
13,
3166,
9225,
3188,
1053,
334,
13,
13,
29918,
1403,
414,
264,
29918,
617,
353,
337,
29889,
12198,
29898,
2... |
alexaskillz.py | willchis/alexaskillz | 0 | 65182 | import os
import time
import urllib, json
from random import randint
from flask import Flask
from flask_ask import Ask, statement, question
app = Flask(__name__)
ask = Ask(app, '/')
MAGIC_SEAWEED_KEY = 'e96ca9b1f03a627aaab136eafe4f83ee'
SPOT_ID = '1449'
@ask.launch
def launched():
return question("This is a sur... | [
1,
1053,
2897,
13,
5215,
931,
13,
5215,
3142,
1982,
29892,
4390,
13,
3166,
4036,
1053,
20088,
524,
13,
13,
3166,
29784,
1053,
2379,
1278,
13,
3166,
29784,
29918,
1278,
1053,
26579,
29892,
3229,
29892,
1139,
13,
13,
932,
353,
2379,
127... |
tests/test_notary.py | sxn/notary | 7 | 71345 | from pathlib import Path
from click.testing import CliRunner
import notary
from notary import cli
def test_add_license_no_preexisting():
runner = CliRunner()
with runner.isolated_filesystem():
license_file = Path("LICENSE")
assert not license_file.exists()
result = runner.invoke(cli.... | [
1,
515,
2224,
1982,
1053,
10802,
13,
13,
3166,
2828,
29889,
13424,
1053,
315,
492,
16802,
13,
13,
5215,
451,
653,
13,
3166,
451,
653,
1053,
9335,
13,
13,
13,
1753,
1243,
29918,
1202,
29918,
506,
1947,
29918,
1217,
29918,
1457,
735,
... |
src/utils.py | jaejun-lee/amzbinimg | 1 | 176628 | <gh_stars>1-10
import tensorflow.keras.backend as K
import matplotlib.pyplot as plt
import numpy as np
### Custome Metrics
def soft_rmse(y_true, y_pred):
'''caculate RMSE for categorical predictions.
'''
return K.sqrt( K.mean(K.cast_to_floatx ( K.square( K.argmax(y_true) - K.argmax(y_pred) )), axis=-1)... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
26110,
29889,
3946,
294,
29889,
27852,
408,
476,
13,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
12655,
408,
7442,
13,
13,
13,
2277,
29937,
315,... |
SimModel_Python_API/simmodel_swig/Release/SimSpace_Occupied_Default.py | EnEff-BIM/EnEffBIM-Framework | 3 | 79655 | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.7
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2, 6, 0):
def swig_import_helper():
from os.path imp... | [
1,
396,
910,
934,
471,
6336,
5759,
491,
25289,
6259,
313,
1124,
597,
1636,
29889,
2774,
335,
29889,
990,
467,
13,
29937,
10079,
29871,
29941,
29889,
29900,
29889,
29955,
13,
29937,
13,
29937,
1938,
451,
1207,
3620,
304,
445,
934,
6521,
... |
chj/index/JType.py | aemcgraw/CodeHawk-Java | 0 | 194700 | <filename>chj/index/JType.py<gh_stars>0
# ------------------------------------------------------------------------------
# CodeHawk Java Analyzer
# Author: <NAME>
# ------------------------------------------------------------------------------
# The MIT License (MIT)
#
# Copyright (c) 2016-2019 Kestrel Technology LLC
#... | [
1,
529,
9507,
29958,
305,
29926,
29914,
2248,
29914,
29967,
1542,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
448,
2683,
2683,
2683,
2683,
9072,
29899,
13,
29937,
5920,
29950,
20011,
3355,
11597,
29891,
3298,
13,
... |
code/df_data_struct.py | jrihds/pdat.github.io | 0 | 170392 | #!/usr/bin/env python3
"""Creating a dataframe from a dict or list."""
import pandas as pd
d = {"a": [1, 2, 3],
"b": [4, 5, 6],
"c": [7, 8, 9]}
l = [[1,4,7],
[2,5,8],
[3,6,9]]
df = pd.DataFrame(d)
print(df)
df = pd.DataFrame(l)
df.columns = ['a', 'b', 'c']
print(df)
# a b c
# 0 1 4 7
#... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
15945,
29908,
9832,
1218,
263,
12205,
515,
263,
9657,
470,
1051,
1213,
15945,
13,
13,
5215,
11701,
408,
10518,
13,
13,
29881,
353,
8853,
29874,
1115,
518,
29896,
29892,
29871,
2... |
source/energy_function.py | Bolt64/protein_lab | 0 | 59333 | <gh_stars>0
#!/usr/bin/env python
import get_atom_distances as gad
import itertools as it
import pdb_parser as parser
lj_potential = lambda distance, rm: (rm/distance)**12 - 2*(rm/distance)**6
def get_energy(pdb_file, rm_file):
energy=0
rm_values=gad.read_labeled_pairs(rm_file)
for atom1,atom2 in it.comb... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
5215,
679,
29918,
8678,
29918,
5721,
2925,
408,
330,
328,
13,
5215,
4256,
8504,
408,
372,
13,
5215,
282,
2585,
29918,
16680,
... |
lib/Site.py | EthanZeigler/pastebin_scraper | 0 | 36989 | from queue import Queue
import time
from settings import USE_DB, DB_DB, DB_DUMP_TABLE, DB_ACCT_TABLE, REQUEST_SPACING
import logging
from . import helper
import sqlite3
import threading
class Site(object):
'''
Site - parent class used for a generic
'Queue' structure with a few helper metho... | [
1,
515,
9521,
1053,
5462,
434,
30004,
13,
5215,
931,
30004,
13,
3166,
6055,
1053,
501,
1660,
29918,
4051,
29892,
6535,
29918,
4051,
29892,
6535,
29918,
14849,
3580,
29918,
21009,
29892,
6535,
29918,
2477,
1783,
29918,
21009,
29892,
5195,
... |
mission_cannibal_Mike_Boodoo.py | BluedragonXVI/missionary_cannibal | 0 | 69325 | import heapq
# <NAME>
# Artificial Intelligence Assign 01
# DFS and A* algorithms acting on Node class who's state is represented as a dictionary
# DFS's fringe/frontier is a list and A* is a min-priority queue, using the heapq module
# Since dictionaries aren't hashable, the closed/reached set contains string repres... | [
1,
1053,
16947,
29939,
13,
13,
29937,
529,
5813,
29958,
13,
29937,
3012,
928,
616,
3159,
28286,
4007,
647,
29871,
29900,
29896,
13,
13,
29937,
360,
9998,
322,
319,
29930,
14009,
16684,
373,
9071,
770,
1058,
29915,
29879,
2106,
338,
9875... |
PyTorch/UOSBT/Supervised/uossl_1.py | agcdke/UOS | 0 | 145110 | import os
import sys
import PIL
import math
import time
import json
import random
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import torch
import torchvision
from pathlib import Path
from PIL import Image, ImageOps, ImageFilter
from torch import nn, optim
from torchvision import transforms,... | [
1,
1053,
2897,
13,
5215,
10876,
13,
5215,
349,
6227,
13,
5215,
5844,
13,
5215,
931,
13,
5215,
4390,
13,
5215,
4036,
13,
5215,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
4... |
7_kyu/Strings_swap_vowels_case.py | UlrichBerntien/Codewars-Katas | 0 | 127786 | <gh_stars>0
VOWELS = { c for c in "aeouiAEOUI" }
def swap_vowel_case_char(c :str) -> str:
return c.swapcase() if c in VOWELS else c
def swap_vowel_case(st: str) -> str:
return "".join(swap_vowel_case_char(c) for c in st)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29963,
9806,
6670,
29903,
353,
426,
274,
363,
274,
297,
376,
3660,
283,
29875,
16036,
29949,
3120,
29908,
500,
13,
13,
1753,
17945,
29918,
29894,
27531,
29918,
4878,
29918,
3090,
29898,
... |
DesignPattern/CompositePattern/__init__.py | Oliver-Yan-2019/algorithm | 1 | 57452 | """
组合模式
"""
from DataStructure.Link import FavoritesList
if __name__ == '__main__':
_favorites_list = FavoritesList()
| [
1,
9995,
13,
31263,
30733,
31382,
30607,
13,
15945,
29908,
13,
13,
3166,
3630,
5015,
12425,
29889,
6595,
1053,
383,
17118,
3246,
1293,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
903,
29888,
17118,
3246,
... |
examples/passwd_example.py | ZhukovGreen/aiohttp-json-rpc | 0 | 99315 | <gh_stars>0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: <NAME> <<EMAIL>>
from aiohttp_json_rpc.auth.passwd import PasswdAuthBackend
from aiohttp_json_rpc.auth import login_required
from aiohttp_json_rpc import JsonRpc
from aiohttp.web import Application
import asyncio
import os
@asyncio.coroutine
def pin... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
13361,
29901,
529,
5813,
29958,
3532,
2686... |
api/admin.py | titans55/pizza-ordering-service | 1 | 44719 | from django.contrib import admin
from django import forms
from . import models
class PizzaFlavorAdminForm(forms.ModelForm):
class Meta:
model = models.PizzaFlavor
fields = "__all__"
class PizzaFlavorAdmin(admin.ModelAdmin):
form = PizzaFlavorAdminForm
list_display = [
"id",
... | [
1,
515,
9557,
29889,
21570,
1053,
4113,
13,
3166,
9557,
1053,
7190,
13,
13,
3166,
869,
1053,
4733,
13,
13,
13,
1990,
349,
24990,
29943,
4112,
272,
12754,
2500,
29898,
9514,
29889,
3195,
2500,
1125,
13,
13,
1678,
770,
20553,
29901,
13,... |
api/portfolio/utils.py | lucasblazzi/insights-project | 0 | 1601653 | import os
import grpc
from google.protobuf.json_format import MessageToDict
from insights_pb2_grpc import MetricsStub
from insights_pb2 import PortfolioRequest, Product
import redis
import ast
metrics_port = os.environ.get("METRICS_PORT", "9999")
def message_encoder(message):
for k, v in message.items():
... | [
1,
1053,
2897,
13,
5215,
867,
6739,
13,
3166,
5386,
29889,
17529,
9721,
29889,
3126,
29918,
4830,
1053,
7777,
1762,
21533,
13,
3166,
1663,
5861,
29918,
24381,
29906,
29918,
629,
6739,
1053,
4737,
10817,
855,
431,
13,
3166,
1663,
5861,
2... |
floreal/views/view_purchases.py | caracole-io/circuitscourts | 0 | 18364 | <reponame>caracole-io/circuitscourts<filename>floreal/views/view_purchases.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
from django.http import HttpResponse, HttpResponseForbidden
from django.shortcuts import render_to_response
from django.contrib.auth.decorators import login_required
from caracole import ... | [
1,
529,
276,
1112,
420,
29958,
4287,
562,
1772,
29899,
601,
29914,
6034,
19544,
29883,
473,
1372,
29966,
9507,
29958,
1579,
487,
284,
29914,
7406,
29914,
1493,
29918,
29886,
2458,
2129,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29... |
mindspore/parallel/mpi/_mpi_config.py | GuoSuiming/mindspore | 55 | 131048 | <reponame>GuoSuiming/mindspore<filename>mindspore/parallel/mpi/_mpi_config.py
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apac... | [
1,
529,
276,
1112,
420,
29958,
9485,
29877,
5091,
326,
292,
29914,
24021,
1028,
487,
29966,
9507,
29958,
24021,
1028,
487,
29914,
23482,
29914,
1526,
29875,
19891,
1526,
29875,
29918,
2917,
29889,
2272,
13,
29937,
14187,
1266,
29871,
29906,... |
DP/ValueIteration.py | davidbrown3/reinforcement-learning | 1 | 127823 | import numpy as np
def value_iteration(env, theta=0.0001, discount_factor=1.0):
"""
Value Iteration Algorithm.
Args:
env: OpenAI environment. env.P represents the transition probabilities of the environment.
theta: Stopping threshold. If the value of all states changes less than theta
... | [
1,
1053,
12655,
408,
7442,
13,
13,
1753,
995,
29918,
1524,
362,
29898,
6272,
29892,
278,
941,
29922,
29900,
29889,
29900,
29900,
29900,
29896,
29892,
2313,
792,
29918,
19790,
29922,
29896,
29889,
29900,
1125,
13,
1678,
9995,
13,
1678,
786... |
survae/tests/transforms/bijections/coupling/coupling_linear.py | alisiahkoohi/survae_flows | 262 | 99673 | import numpy as np
import torch
import torch.nn as nn
import torchtestcase
import unittest
from survae.transforms.bijections.coupling import *
from survae.nn.layers import ElementwiseParams, ElementwiseParams2d
from survae.tests.transforms.bijections import BijectionTest
class AdditiveCouplingBijectionTest(BijectionT... | [
1,
1053,
12655,
408,
7442,
13,
5215,
4842,
305,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
5215,
4842,
305,
1688,
4878,
13,
5215,
443,
27958,
13,
3166,
1190,
1564,
29872,
29889,
9067,
29879,
29889,
29890,
7253,
1953,
29889,... |
tests/bdd/steps/test_calculate_season.py | nora-ns/allseasons | 4 | 1614974 | from pytest_bdd import scenario, given, when, then
from pytest_bdd import parsers
from urllib.parse import urljoin
import pytest
import sys
# pytestmark means it this mark will apply to all tests in the module
pytestmark = pytest.mark.skipif(sys.platform in ('win32', 'cygwin', 'darwin'),
... | [
1,
515,
11451,
1688,
29918,
29890,
1289,
1053,
10483,
29892,
2183,
29892,
746,
29892,
769,
13,
3166,
11451,
1688,
29918,
29890,
1289,
1053,
610,
4253,
13,
3166,
3142,
1982,
29889,
5510,
1053,
3142,
7122,
13,
5215,
11451,
1688,
13,
5215,
... |
maskrcnn_benchmark/modeling/roi_heads/box_head/loss.py | RyanXLi/OneshotDet | 16 | 25466 | <reponame>RyanXLi/OneshotDet<gh_stars>10-100
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import torch
from torch.nn import functional as F
from maskrcnn_benchmark.layers import smooth_l1_loss, SigmoidFocalLoss
from maskrcnn_benchmark.modeling.box_coder import BoxCoder
from maskrcnn_benchmar... | [
1,
529,
276,
1112,
420,
29958,
29934,
10094,
29990,
23410,
29914,
2951,
267,
8711,
6362,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
29937,
14187,
1266,
313,
29883,
29897,
13327,
29892,
9266,
29889,
... |
databass/exprutil.py | ivychen/databass-public | 6 | 86626 | from itertools import chain
from .exprs import *
def predicate_to_cnf(e):
"""
Split AND tree into a list of conditions
"""
if not e:
return []
if e.is_type("Expr") and e.op.lower() == "and":
return list(chain(*map(predicate_to_cnf, [e.l, e.r])))
if e.is_type("Paren"):
return [e.c]
return [e]
... | [
1,
515,
4256,
8504,
1053,
9704,
13,
3166,
869,
13338,
29879,
1053,
334,
13,
13,
1753,
24384,
29918,
517,
29918,
18038,
29888,
29898,
29872,
1125,
13,
29871,
9995,
13,
29871,
26178,
5300,
5447,
964,
263,
1051,
310,
5855,
13,
29871,
9995,... |
nesta/packages/worldbank/collect_worldbank.py | anniyanvr/nesta | 13 | 1604553 | """
Collect worldbank
=================
Collect worldbank sociodemographic data by country.
"""
import requests
from retrying import retry
import json
from collections import defaultdict
import re
import math
import pandas as pd
WORLDBANK_ENDPOINT = "http://api.worldbank.org/v2/{}"
DEAD_RESPONSE = (None, None) # tu... | [
1,
9995,
13,
28916,
3186,
9157,
13,
9166,
29922,
13,
13,
28916,
3186,
9157,
5374,
356,
29885,
12122,
848,
491,
4234,
29889,
13,
15945,
29908,
13,
13,
5215,
7274,
13,
3166,
337,
2202,
292,
1053,
337,
2202,
13,
5215,
4390,
13,
3166,
1... |
src/ctc/protocols/fei_utils/analytics/metric_groups/buyback_metrics.py | fei-protocol/checkthechain | 94 | 50674 | from __future__ import annotations
import typing
from ctc import spec
from ctc.protocols import balancer_utils
from .. import analytics_spec
async def async_compute_buybacks(
blocks: list[int], verbose: bool = False
) -> analytics_spec.MetricGroup:
return {
'name': 'Buybacks',
'metrics': {... | [
1,
515,
4770,
29888,
9130,
1649,
1053,
25495,
13,
13,
5215,
19229,
13,
13,
3166,
274,
14246,
1053,
1580,
13,
3166,
274,
14246,
29889,
20464,
29879,
1053,
6411,
25856,
29918,
13239,
13,
13,
3166,
6317,
1053,
16114,
1199,
29918,
6550,
13,... |
huTools/http/engine_httplib2.py | gadventures/huTools | 0 | 72186 | #!/usr/bin/env python
# encoding: utf-8
"""
engine_httplib2.py implements httplib2 based queries for huTools.http
Created by <NAME> on 2010-10-24.
Copyright (c) 2010, 2011 HUDORA. All rights reserved.
"""
from __future__ import unicode_literals
from builtins import object
import socket
import huTools.http.tools
from ... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
8025,
29901,
23616,
29899,
29947,
13,
15945,
29908,
13,
10599,
29918,
1124,
1982,
29906,
29889,
2272,
10703,
1732,
1982,
29906,
2729,
9365,
363,
22888,
24183,
29889,
1124,
13,
13,
... |
lunespy/wallet/assembly.py | lunes-platform/LunesPy | 4 | 167408 | def random_seed(len: int) -> str:
from lunespy.wallet.constants import word_list
from os import urandom
def f():
word_count = 2048
r: bytes = urandom(4)
x: int = r[3] + (r[2] << 8) + (r[1] << 16) + (r[0] << 24)
w1: int = x % word_count
w2: int = ((int(x / word_count)... | [
1,
822,
4036,
29918,
26776,
29898,
2435,
29901,
938,
29897,
1599,
851,
29901,
13,
1678,
515,
301,
7844,
2272,
29889,
14625,
1026,
29889,
3075,
1934,
1053,
1734,
29918,
1761,
13,
1678,
515,
2897,
1053,
5065,
2685,
13,
13,
1678,
822,
285,... |
github_oauth_gateway/auth.py | HDI-Project/ballet-oauth-gateway | 1 | 169868 | import requests
GITHUB_OAUTH_URL = 'https://github.com/login/oauth/access_token'
def request_token(client_id, client_secret, code, redirect_uri, state):
url = GITHUB_OAUTH_URL
data = {
'client_id': client_id,
'client_secret': client_secret,
'code': code,
'state': state,
}... | [
1,
1053,
7274,
13,
13,
29954,
13054,
7466,
29918,
29949,
20656,
29950,
29918,
4219,
353,
525,
991,
597,
3292,
29889,
510,
29914,
7507,
29914,
23106,
29914,
5943,
29918,
6979,
29915,
13,
13,
13,
1753,
2009,
29918,
6979,
29898,
4645,
29918,... |
cap9/ex3/index1.py | felipesch92/livroPython | 0 | 137595 | with open('multiplos4.txt', 'w') as multiplos:
pares = open('pares.txt')
for l in pares.readlines():
num = l.replace('\n', '')
if int(num) % 4 == 0:
multiplos.write(f'{num}\n')
| [
1,
411,
1722,
877,
9910,
572,
359,
29946,
29889,
3945,
742,
525,
29893,
1495,
408,
2473,
572,
359,
29901,
13,
1678,
610,
267,
353,
1722,
877,
862,
267,
29889,
3945,
1495,
13,
1678,
363,
301,
297,
610,
267,
29889,
949,
9012,
7295,
13... |
packages/mccomponents/tests/mccomponentsbpmodule/sample/Broadened_E_Q_Kernel_TestCase.py | mcvine/mcvine | 5 | 5432 | #!/usr/bin/env python
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# <NAME>
# California Institute of Technology
# (C) 2006-2010 All Rights Reserved
#
# {LicenseText}
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
13,
29937,
3695,
26594,
26594,
26594,
26594,
26594,
26594,
26594,
26594,
26594,
14087,
30022,
13,
29937,
13,
29937,
462,
462,
259,
529,
5813,
29958,
13,
29937,
462,
418,
8046,
890... |
cyk/cnf/linear_cnf.py | azoimide/cyk | 0 | 93569 | <reponame>azoimide/cyk
import sys
def read_linear_grammar(f=sys.stdin):
lines = f.readlines()
# rule_lines = lines[:-1]
rule_lines = lines
# s = map(lambda c: ord(c) - ord('a'), lines[-1].strip())
ups = []
rnups = []
lnups = []
nt_count = 0
t_count = 0
t_tab = {}
nt_tab = {}... | [
1,
529,
276,
1112,
420,
29958,
834,
29877,
326,
680,
29914,
25923,
13,
5215,
10876,
13,
13,
1753,
1303,
29918,
10660,
29918,
1393,
3034,
29898,
29888,
29922,
9675,
29889,
4172,
262,
1125,
13,
1678,
3454,
353,
285,
29889,
949,
9012,
580,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.