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
setup.py
jawahar273/practNLPTools-lite
29
172233
<gh_stars>10-100 #!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script.""" # from distutils.command.install import INSTALL_SCHEMES from setuptools import setup, find_packages with open("README.rst") as readme_file: readme = readme_file.read() with open("CHANGELOG.rst") as history_file: history =...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 15945, 299...
pymongo/timestamp.py
ixc/mongo-python-driver
0
1608899
# Copyright 2010 10gen, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, soft...
[ 1, 396, 14187, 1266, 29871, 29906, 29900, 29896, 29900, 29871, 29896, 29900, 1885, 29892, 9266, 29889, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, ...
raspi_components/light/rgb_light.py
builderdev212/raspi_components
1
42649
<filename>raspi_components/light/rgb_light.py import RPi.GPIO as GPIO from .light_errors import RGBLedError class RGBLed: """ This class is used to control a RGB LED via the GPIO. Please make sure you have 220 Ohm resistors between the 3 gpio pins and the LED. """ def __init__(self, red_pin, g...
[ 1, 529, 9507, 29958, 3417, 1631, 29918, 14036, 29914, 4366, 29914, 23973, 29918, 4366, 29889, 2272, 13, 5215, 390, 12197, 29889, 29954, 2227, 29949, 408, 402, 2227, 29949, 13, 3166, 869, 4366, 29918, 12523, 1053, 390, 7210, 29931, 287, 23...
api/db/base.py
p0lygun/astounding-arapaimas
0
156419
<filename>api/db/base.py # Import all the models, so that Base has them before being imported by Alembic from api.db.base_class import Base # noqa: F401 from api.models.user import User # noqa: F401
[ 1, 529, 9507, 29958, 2754, 29914, 2585, 29914, 3188, 29889, 2272, 13, 29937, 16032, 599, 278, 4733, 29892, 577, 393, 7399, 756, 963, 1434, 1641, 19673, 491, 319, 2409, 29890, 293, 13, 3166, 7882, 29889, 2585, 29889, 3188, 29918, 1990, 1...
easy_gold/pann_utils.py
wdy06/kaggle-birdsong-recognition
1
63434
import logging import os import random import time import warnings from collections import OrderedDict from contextlib import contextmanager from pathlib import Path from typing import List, Optional import cv2 import numpy as np import pandas as pd import torch import torch.nn as nn import torch.nn.functional as F im...
[ 1, 1053, 12183, 13, 5215, 2897, 13, 5215, 4036, 13, 5215, 931, 13, 5215, 18116, 13, 3166, 16250, 1053, 8170, 287, 21533, 13, 3166, 3030, 1982, 1053, 3030, 12847, 13, 3166, 2224, 1982, 1053, 10802, 13, 3166, 19229, 1053, 2391, 29892, 2...
src/pykeen/datasets/nations/__init__.py
cthoyt/pykeen
1
133774
<gh_stars>1-10 # -*- coding: utf-8 -*- """Get triples from the Nations dataset.""" import os from ..base import PathDataset from ..literal_base import NumericPathDataset __all__ = [ 'NATIONS_TRAIN_PATH', 'NATIONS_TEST_PATH', 'NATIONS_VALIDATE_PATH', 'NATIONS_LITERALS_PATH', 'Nations', 'Natio...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 15945, 29908, 2577, 3367, 2701, 515, 278, 18269, 8783, 1213, 15945, 13, 13, 52...
script_makevoc.py
skiteskopes/datasetCulling
1
174687
# -*- coding: utf-8 -*- """ script for setting up pascal-like datasets copyright:kentaroy47 10/2/2018 """ import os import subprocess import argparse parser = argparse.ArgumentParser(description='Train a Fast R-CNN network') parser.add_argument('--dataset', dest='dataset', help='training datase...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 15945, 29908, 13, 2154, 363, 4444, 701, 2331, 1052, 29899, 4561, 20035, 13, 8552, 1266, 29901, 29895, 296, 8854, 29891, 29946, 29955, 13, 29896, 2990...
plugins/jsmin.py
magentix/magentix.github.io
0
164740
""" Copyright (c) 2022, Magentix This code is licensed under simplified BSD license (see LICENSE for details) StaPy JsMin Plugin - Version 1.0.0 Requirements: - jsmin """ from pathlib import Path import jsmin import os def file_content_opened(content, args: dict) -> str: if _get_file_extension(args['path']) != '...
[ 1, 9995, 13, 11882, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29906, 29906, 29892, 3561, 296, 861, 13, 4013, 775, 338, 7794, 21144, 1090, 20875, 350, 7230, 19405, 313, 4149, 365, 2965, 1430, 1660, 363, 4902, 29897, 13, 855, 29874, 1...
dags/utils/voting/fetch_polls.py
makerdao-data/airflow-docker-image
0
187961
from dags.utils.bq_adapters import extract_calls_gas def _fetch_polls(**setup): calls = extract_calls_gas( setup['start_block'] + 1, setup['end_block'], setup['start_time'], setup['end_time'], (setup['polls_address'],), setup['polls_abi'], ) records = [ ...
[ 1, 515, 270, 810, 29889, 13239, 29889, 29890, 29939, 29918, 328, 481, 2153, 1053, 6597, 29918, 29883, 4293, 29918, 25496, 13, 13, 13, 1753, 903, 9155, 29918, 29886, 3028, 29879, 29898, 1068, 14669, 1125, 13, 13, 1678, 5717, 353, 6597, 2...
django_socketio_chat/admin.py
leukeleu/django-socketio-chat
6
140003
<filename>django_socketio_chat/admin.py from django.contrib import admin from .models import Chat, UserChatStatus, Message class ChatAdmin(admin.ModelAdmin): pass class UserChatStatusAdmin(admin.ModelAdmin): pass class MessageAdmin(admin.ModelAdmin): pass admin.site.register(Chat, ChatAdmin) admin....
[ 1, 529, 9507, 29958, 14095, 29918, 11514, 601, 29918, 13496, 29914, 6406, 29889, 2272, 13, 3166, 9557, 29889, 21570, 1053, 4113, 13, 13, 3166, 869, 9794, 1053, 678, 271, 29892, 4911, 1451, 271, 5709, 29892, 7777, 13, 13, 13, 1990, 678, ...
qcenginerecords/tests/test_validate.py
eljost/QCEngineRecords
1
119080
<gh_stars>1-10 import pytest import qcenginerecords as qcev import qcelemental as qcel def test_list_programs(): assert "molpro" in qcev.list_programs() assert "entos" in qcev.list_programs() assert "terachem" in qcev.list_programs() # Build out a list of all tests and validate validation_tests = [] fo...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 11451, 1688, 13, 13, 5215, 3855, 29883, 996, 262, 406, 29883, 4339, 408, 3855, 346, 29894, 13, 5215, 3855, 346, 944, 284, 408, 3855, 2242, 13, 13, 13, 1753,...
ANSIBLE/library/eos_routemap.py
ayosef/pynet_test
0
18305
#!/usr/bin/python # # Copyright (c) 2015, Arista Networks, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # Redistributions of source code must retain the above copyright notice, # t...
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 13, 29937, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29945, 29892, 826, 2079, 8527, 29879, 29892, 9266, 29889, 13, 29937, 2178, 10462, 21676, 29889, 13, 29937, 13, 29937...
emo/templatetags/emoji_dict.py
richardcornish/django-emobar
1
1604260
emoji_dict = { ':smile:': 'smile.png', ':smiley:': 'smiley.png', ':grinning:': 'grinning.png', ':blush:': 'blush.png', ':relaxed:': 'relaxed.png', ':wink:': 'wink.png', ':heart_eyes:': 'heart_eyes.png', ':kissing_heart:': 'kissing_heart.png', ':kissing_closed_eyes:': 'kissing_closed_...
[ 1, 953, 29877, 2397, 29918, 8977, 353, 426, 13, 1678, 525, 29901, 3844, 488, 29901, 2396, 525, 3844, 488, 29889, 2732, 742, 13, 1678, 525, 29901, 3844, 15168, 29901, 2396, 525, 3844, 15168, 29889, 2732, 742, 13, 1678, 525, 29901, 629, ...
eval_eth.py
codyly/PatchmatchNet
1
195454
<filename>eval_eth.py import argparse import os import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim as optim from torch.utils.data import DataLoader from torch.autograd import Variable import torch.nn.functional as F import numpy as np import time from dat...
[ 1, 529, 9507, 29958, 14513, 29918, 621, 29889, 2272, 13, 5215, 1852, 5510, 13, 5215, 2897, 13, 5215, 4842, 305, 13, 5215, 4842, 305, 29889, 15755, 408, 302, 29876, 13, 5215, 4842, 305, 29889, 15755, 29889, 23482, 13, 5215, 4842, 305, ...
Program_Python_code/IOT_02/sql_03.py
skyhigh8591/Learning_Test_Program
0
86178
<filename>Program_Python_code/IOT_02/sql_03.py # -*- coding: utf-8 -*- """ Created on Mon Jun 15 10:42:03 2020 @author: skyhigh """ from flask import Flask,request,render_template from flask_mysqldb import MySQL import datetime app = Flask (__name__) app.config['MYSQL_HOST'] = 'localhost' app.config['MYSQL_USER']...
[ 1, 529, 9507, 29958, 9283, 29918, 11980, 29918, 401, 29914, 29902, 2891, 29918, 29900, 29906, 29914, 2850, 29918, 29900, 29941, 29889, 2272, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908,...
models/train_classifier.py
munnyraht/Disaster-Response-Message-Classification
0
1605981
import sys import pandas as pd from sqlalchemy import create_engine import nltk from nltk.tokenize import word_tokenize from nltk.stem import WordNetLemmatizer from sklearn.ensemble import RandomForestClassifier from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer from sklearn.pipeline import P...
[ 1, 1053, 10876, 13, 5215, 11701, 408, 10518, 13, 3166, 4576, 284, 305, 6764, 1053, 1653, 29918, 10599, 13, 5215, 302, 1896, 29895, 13, 3166, 302, 1896, 29895, 29889, 6979, 675, 1053, 1734, 29918, 6979, 675, 13, 3166, 302, 1896, 29895, ...
src/sphinx_theme_builder/_internal/nodejs.py
jorisvandenbossche/sphinx-theme-builder
1
164552
"""NodeJS tooling orchestration. Broadly, it has a `.nodeenv` created using the nodeenv package; and ensures that the `node_modules` directory is kept in sync with the `package.json` file of the project. """ import os import shlex import shutil import subprocess import sys import textwrap from pathlib import Path fro...
[ 1, 9995, 4247, 8700, 5780, 292, 22624, 16444, 362, 29889, 13, 13, 29933, 9972, 368, 29892, 372, 756, 263, 5050, 3177, 6272, 29952, 2825, 773, 278, 2943, 6272, 3577, 29936, 322, 5662, 1973, 393, 278, 13, 29952, 3177, 29918, 7576, 29952, ...
pipen/cli/__init__.py
sthagen/pwwang-pipen
41
73064
<filename>pipen/cli/__init__.py<gh_stars>10-100 """Provide CLI for pipen""" from ._hooks import CLIPlugin from ._main import main
[ 1, 529, 9507, 29958, 13096, 264, 29914, 11303, 29914, 1649, 2344, 26914, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 15945, 29908, 1184, 29894, 680, 24492, 363, 8450, 264, 15945, 29908, 13, 13,...
itsnp/__init__.py
CaffeineDuck/itsnp-discord-bot
0
18301
<filename>itsnp/__init__.py from .bot import ItsnpBot
[ 1, 529, 9507, 29958, 1169, 9302, 29914, 1649, 2344, 26914, 2272, 13, 3166, 869, 7451, 1053, 8011, 9302, 29933, 327, 30004, 13, 2 ]
tests/test_app/models.py
Javex/pyramid_crud
4
1603192
from sqlalchemy import ( Column, Integer, Unicode, DateTime, Boolean, ) from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ( scoped_session, sessionmaker, relationship, backref, ) from sqlalchemy.schema import ( ForeignKey, ) from d...
[ 1, 515, 4576, 284, 305, 6764, 1053, 313, 13, 1678, 12481, 29892, 13, 1678, 8102, 29892, 13, 1678, 23862, 29892, 13, 1678, 12315, 29892, 13, 1678, 11185, 29892, 13, 1678, 1723, 13, 13, 3166, 4576, 284, 305, 6764, 29889, 1062, 29889, 31...
Python/snake_gameTurtle.py
Rohitshailesh43/hacktoberfest2021
0
129805
<gh_stars>0 from turtle import * from random import randrange from freegames import square, vector food = vector(0, 0) snake = [vector(10, 0)] aim = vector(0, -10) def change(x, y): "Change snake direction." aim.x = x aim.y = y def inside(head): "Return True if head inside boundarie...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 30004, 13, 30004, 13, 3166, 260, 4227, 280, 1053, 334, 30004, 13, 3166, 4036, 1053, 20088, 3881, 30004, 13, 3166, 3005, 387, 1280, 1053, 6862, 29892, 4608, 30004, 13, 30004, 13, 1181, ...
solutions/python3/245.py
sm2774us/amazon_interview_prep_2021
42
157680
class Solution: def shortestWordDistance(self, words, word1, word2): i1 = i2 = -1 res, same = float("inf"), word1 == word2 for i, w in enumerate(words): if w == word1: if same: i2 = i1 i1 = i if i2 >= 0: res = min(res, i1 - i2) ...
[ 1, 770, 24380, 29901, 13, 1678, 822, 3273, 342, 14463, 27469, 29898, 1311, 29892, 3838, 29892, 1734, 29896, 29892, 1734, 29906, 1125, 13, 4706, 474, 29896, 353, 474, 29906, 353, 448, 29896, 13, 4706, 620, 29892, 1021, 353, 5785, 703, 71...
tests/integration/test_between_tags.py
liorbass/pydriller
583
20081
# Copyright 2018 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwa...
[ 1, 396, 14187, 1266, 29871, 29906, 29900, 29896, 29947, 529, 5813, 29958, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, 13, 29937, 366, 1122, ...
Random/cpp_compare.py
SuperV1234/Experiments
12
115321
<reponame>SuperV1234/Experiments<filename>Random/cpp_compare.py import subprocess import sys import itertools def run_cmd(cmd): return subprocess.run(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) def main(): flags = "-std=c++17 -Ofast" time = "/usr/bin/time -f %...
[ 1, 529, 276, 1112, 420, 29958, 19111, 29963, 29896, 29906, 29941, 29946, 29914, 1252, 546, 7862, 29966, 9507, 29958, 17875, 29914, 8223, 29918, 18307, 29889, 2272, 13, 5215, 1014, 5014, 13, 5215, 10876, 13, 5215, 4256, 8504, 13, 13, 1753,...
clld/tests/test_web_datatables_value.py
Woseseltops/clld
1
72835
<gh_stars>1-10 from clld.tests.util import TestWithEnv from clld.db.models import common class Tests(TestWithEnv): def _run(self, **kw): from clld.web.datatables.value import Values return self.handle_dt(Values, common.Value, **kw) def test_Values(self): dt = self._run() self....
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 1067, 430, 29889, 21150, 29889, 4422, 1053, 4321, 3047, 21745, 13, 3166, 1067, 430, 29889, 2585, 29889, 9794, 1053, 3619, 13, 13, 13, 1990, 4321, 29879, 29898, ...
Robot Car/Old Scripts/VisionController.py
ATPHHe/Raspberry-Pi-3-Robot-Car
0
155366
<reponame>ATPHHe/Raspberry-Pi-3-Robot-Car<gh_stars>0 ###################################################################### ### Description ####### ### ###### ### Created by: <NAME> ##### ### Date Created: 3/03/2017 #### ### ### ########...
[ 1, 529, 276, 1112, 420, 29958, 1299, 19689, 3868, 29914, 29934, 4692, 16344, 29899, 12197, 29899, 29941, 29899, 21860, 327, 29899, 8179, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 13, 13, 13383, 13383, 13383, 13383, 4136, 2277, 13, ...
102785/D.py
julianferres/Codeforces
4
102074
from math import inf def solve(i2, i3, i5, i7, i11, i13, i17, i19): return pow(2, i2) * pow(3, i3) * pow(5, i5) * pow(7, i7) * pow(11, i11) * pow(13, i13) * pow(17, i17) * pow(19, i19) def main(): ans = [inf]*1005 for i1 in range(1000): print(i1) for i2 in range(32): for i3 in ...
[ 1, 515, 5844, 1053, 3041, 13, 13, 1753, 4505, 29898, 29875, 29906, 29892, 474, 29941, 29892, 474, 29945, 29892, 474, 29955, 29892, 474, 29896, 29896, 29892, 474, 29896, 29941, 29892, 474, 29896, 29955, 29892, 474, 29896, 29929, 1125, 13, ...
src/constants.py
matheus3301/neps-academy-scraper
0
93433
NEPS_URL = 'https://neps.academy' ENGLISH_BUTTON = '/html/body/div/div/div/div[2]/div/div/a/div[2]/div' LOGIN_PAGE_BUTTON = '//*[@id="app"]/div/div/div/div[1]/div/header/div/div/div[3]/div/div/nav/ul/li[6]/button' EMAIL_INPUT = '/html/body/div/div/div/div[3]/div/div/div/form/div[1]/div/div[1]/div/input' PASSWORD_INPUT ...
[ 1, 14693, 7024, 29918, 4219, 353, 525, 991, 597, 484, 567, 29889, 562, 1943, 1357, 29915, 13, 1430, 7239, 3235, 29950, 29918, 29933, 2692, 29911, 1164, 353, 8207, 1420, 29914, 2587, 29914, 4563, 29914, 4563, 29914, 4563, 29914, 4563, 2996...
api/gsn-api/gsndb/migrations/0004_auto_20190327_1847.py
DonovanDarko/gsn
2
120433
<reponame>DonovanDarko/gsn # Generated by Django 2.1.5 on 2019-03-27 18:47 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('gsndb', '0003_auto_20190326_2144'), ] operations = [ migrations.RenameField( model_name='student', ...
[ 1, 529, 276, 1112, 420, 29958, 10310, 10471, 29928, 935, 29877, 29914, 3174, 29876, 13, 29937, 3251, 630, 491, 15337, 29871, 29906, 29889, 29896, 29889, 29945, 373, 29871, 29906, 29900, 29896, 29929, 29899, 29900, 29941, 29899, 29906, 29955, ...
MENU and SUBMENU .py
HorridHanu/Notepad-Python
1
96271
######################################################################################## ######################################################################################## ## # CODE LANGUAGE IS PYHTON! ## ## ## ## # DATE: 1-JULY-2021 ## ## ...
[ 1, 29871, 13, 13, 13383, 13383, 13383, 13383, 13383, 7346, 13, 13383, 13383, 13383, 13383, 13383, 7346, 13, 2277, 396, 4810, 2287, 365, 19453, 29965, 10461, 8519, 349, 29979, 3912, 1164, 29991, 3986, 444, 418, 444, 462, 462, 268, 444, 1...
simsalabim/io/excel_loader.py
simklein/simsalabim
0
1605937
""" Excel Loader ============ Provides 1. IO stuff to access data from messy spreadsheets. """ import pandas as pd from openpyxl import load_workbook def load_xl_range(io, sheet_name=0, start=None, stop=None): """Load data from a certain range of an Excel sheet and transforms it to an dataframe. Para...
[ 1, 9995, 13, 22926, 4309, 1664, 13, 4936, 2751, 13, 13, 1184, 29894, 2247, 13, 259, 29896, 29889, 10663, 6433, 304, 2130, 848, 515, 4473, 29891, 9677, 19360, 29889, 13, 13, 15945, 29908, 13, 5215, 11701, 408, 10518, 13, 3166, 1722, 22...
Utilities/vtkTclTest2Py/expr.py
jasper-yeh/VtkDotNet
3
132571
"""Evalues a tcl expr expression.""" import math def expr(caller_globals_dict, caller_localvars_dict, arguments): """the arguments to expr in tcl are passed as individual arguments to this method. eg [expr sin(20)*$a] becomes expr.expr("sin","(","20",")","*", a)""" eval_str = "eval(\"\"\"" for arg ...
[ 1, 9995, 29923, 5975, 263, 260, 695, 22010, 4603, 1213, 15945, 13, 5215, 5844, 13, 13, 1753, 22010, 29898, 4804, 261, 29918, 23705, 1338, 29918, 8977, 29892, 24959, 29918, 2997, 16908, 29918, 8977, 29892, 6273, 1125, 13, 1678, 9995, 1552,...
mocksh.py
blyxxyz/mocksh
1
58146
<gh_stars>1-10 # Copyright 2018 <NAME> <<EMAIL>> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISC...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29947, 529, 5813, 29958, 3532, 26862, 6227, 6778, 13, 29937, 13, 29937, 20894, 2333, 304, 671, 29892, 3509, 29892, 6623,...
legocollector/inventory/management/commands/import_ldraw_processed_parts.py
ericziethen/legocollector
1
98060
import json import logging import os from django.core.management.base import BaseCommand from django.db import transaction from inventory.models import Part, PartExternalId logger = logging.getLogger(__name__) # pylint: disable=invalid-name class Command(BaseCommand): def add_arguments(self, parser): ...
[ 1, 1053, 4390, 13, 5215, 12183, 13, 5215, 2897, 13, 13, 3166, 9557, 29889, 3221, 29889, 21895, 29889, 3188, 1053, 7399, 6255, 13, 3166, 9557, 29889, 2585, 1053, 10804, 13, 13, 3166, 11817, 706, 29889, 9794, 1053, 3455, 29892, 3455, 2586...
rango/views.py
farschmessivo/ranco
0
91043
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from rango.models import Category, Page from rango.forms import CategoryForm, PageForm from rango.forms import UserForm, UserProfileForm from django.core.urlresolvers import reverse from django.contrib.auth import authenticat...
[ 1, 515, 9557, 29889, 12759, 7582, 29879, 1053, 4050, 13, 3166, 9557, 29889, 1124, 1053, 9056, 5103, 24735, 29892, 9056, 5103, 13, 3166, 364, 4524, 29889, 9794, 1053, 17943, 29892, 9305, 13, 3166, 364, 4524, 29889, 9514, 1053, 17943, 2500,...
fvp-core.py
duck-master/FVP
0
103472
#code written by duck_master since 2 january 2021 #licensed under MIT license #based on Final Version Perfected, invented by willbradshaw on 27 november 2020 #as described in https://www.lesswrong.com/posts/xfcKYznQ6B9yuxB28/final-version-perfected-an-underused-execution-algorithm #TODO: make into PyPI package or shell...
[ 1, 396, 401, 3971, 491, 868, 384, 29918, 6207, 1951, 29871, 29906, 10111, 653, 29871, 29906, 29900, 29906, 29896, 13, 29937, 506, 21144, 1090, 341, 1806, 19405, 13, 29937, 6707, 373, 9550, 10079, 2431, 3647, 287, 29892, 11817, 287, 491, ...
mneia_admin_backend/migrations/0005_person_works.py
mneia-gr/mneia-admin-backend
0
1600679
<gh_stars>0 # Generated by Django 3.2.4 on 2021-06-25 07:34 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("mneia_admin_backend", "0004_personworkrelationship"), ] operations = [ migrations.AddField( model_name="person", ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 3251, 630, 491, 15337, 29871, 29941, 29889, 29906, 29889, 29946, 373, 29871, 29906, 29900, 29906, 29896, 29899, 29900, 29953, 29899, 29906, 29945, 29871, 29900, 29955, 29901, 29941, 29...
math/rsa.py
javyxu/algorithms-python
2
103911
""" RSA encryption algorithm a method for encrypting a number that uses seperate encryption and decryption keys this file only implements the key generation algorithm there are three important numbers in RSA called n, e, and d e is called the encryption exponent d is called the decryption exponent n is called the modu...
[ 1, 9995, 13, 29934, 8132, 20956, 5687, 13, 29874, 1158, 363, 27924, 292, 263, 1353, 393, 3913, 409, 21194, 20956, 322, 1602, 14272, 6611, 13, 1366, 934, 871, 10703, 278, 1820, 12623, 5687, 13, 13, 12711, 526, 2211, 4100, 3694, 297, 39...
config.py
gve-sw/GVE_DevNet_Jabber_MigrateRooms-ChatToWebex
1
142599
<filename>config.py """Copyright (c) 2020 Cisco and/or its affiliates. This software is licensed to you under the terms of the Cisco Sample Code License, Version 1.1 (the "License"). You may obtain a copy of the License at https://developer.cisco.com/docs/licenses All use of the material herei...
[ 1, 529, 9507, 29958, 2917, 29889, 2272, 13, 15945, 29908, 11882, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29906, 29900, 315, 275, 1111, 322, 29914, 272, 967, 23736, 1078, 22993, 13, 30004, 13, 4013, 7047, 338, 7794, 21144, 304, 366, ...
src/test.py
Times125/Graduation_Project
0
1614822
<reponame>Times125/Graduation_Project<filename>src/test.py #! /usr/bin/env python # -*- coding: utf-8 -*- """ @Author:lichunhui @Time: 2018/4/10 13:01 @Description: """ import nltk import re from src import log from sklearn.naive_bayes import MultinomialNB, BernoulliNB from nltk.classify.scikitlearn import SklearnC...
[ 1, 529, 276, 1112, 420, 29958, 29164, 29896, 29906, 29945, 29914, 3338, 13467, 362, 29918, 7653, 29966, 9507, 29958, 4351, 29914, 1688, 29889, 2272, 13, 29937, 29991, 847, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, ...
anyfft/reikna/_version.py
tlambert03/anyfft
0
156851
<reponame>tlambert03/anyfft<filename>anyfft/reikna/_version.py # file generated by setuptools_scm # don't change, don't track in version control version = "0.1.dev1+ga7b326d.d20210618" version_tuple = (0, 1, "dev1+ga7b326d", "d20210618")
[ 1, 529, 276, 1112, 420, 29958, 29873, 5288, 2151, 29900, 29941, 29914, 1384, 600, 29873, 29966, 9507, 29958, 1384, 600, 29873, 29914, 276, 638, 1056, 19891, 3259, 29889, 2272, 13, 29937, 934, 5759, 491, 731, 21245, 8789, 29918, 1557, 2988...
asn1tools/version.py
eerimoq/asn1tools
198
27689
__version__ = '0.159.0'
[ 1, 4770, 3259, 1649, 353, 525, 29900, 29889, 29896, 29945, 29929, 29889, 29900, 29915, 13, 2 ]
paddle/trainer/tests/gen_proto_data.py
lzhao4ever/Paddle-master
1
72587
# Copyright (c) 2016 Baidu, Inc. All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
[ 1, 396, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29953, 6000, 333, 29884, 29892, 9266, 29889, 2178, 26863, 2538, 9841, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, ...
Wk06/06-storing-input/site.py
beyondvalence/biof509_wtl
0
135567
from flask import Flask, render_template app = Flask(__name__) app.config['SECRET_KEY'] = 'important to keep unknown in production' from flask_wtf import Form from wtforms import StringField from wtforms.validators import DataRequired class MyForm(Form): name = StringField('first name', validators=[DataRequired...
[ 1, 515, 29784, 1053, 2379, 1278, 29892, 4050, 29918, 6886, 13, 13, 932, 353, 2379, 1278, 22168, 978, 1649, 29897, 13, 13, 932, 29889, 2917, 1839, 1660, 22245, 29911, 29918, 10818, 2033, 353, 525, 17001, 304, 3013, 9815, 297, 5802, 29915...
cupid/actions.py
iinnovations/iicontrollibs
11
85458
#!/usr/bin/python3 __author__ = "<NAME>" __copyright__ = "Copyright 2016, Interface Innovations" __credits__ = ["<NAME>"] __license__ = "Apache 2.0" __version__ = "1.0" __maintainer__ = "<NAME>" __email__ = "<EMAIL>" __status__ = "Development" import os import sys import inspect try: import simplejson as json exc...
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 29941, 13, 13, 1649, 8921, 1649, 353, 9872, 5813, 11903, 13, 1649, 8552, 1266, 1649, 353, 376, 11882, 1266, 29871, 29906, 29900, 29896, 29953, 29892, 25796, 512, 13715, 800, 29908, 13, 1649, 11944...
htdfsdk/web3/_utils/txpool.py
youngqqcn/htdfsdk
2
164876
<reponame>youngqqcn/htdfsdk<gh_stars>1-10 from typing import ( Callable, ) from htdfsdk.web3._utils.rpc_abi import ( RPC, ) from htdfsdk.web3.method import ( Method, ) from htdfsdk.web3.types import ( TxPoolContent, TxPoolInspect, TxPoolStatus, ) content: Method[Callable[[], TxPoolContent]] = ...
[ 1, 529, 276, 1112, 420, 29958, 6293, 865, 24349, 18038, 29914, 400, 2176, 15348, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 19229, 1053, 313, 13, 1678, 8251, 519, 29892, 13, 29897, 13, 13, 3166, 298, 15...
sql_judge/control/exam_controller.py
r4ulill0/gui_dbjudge
1
127675
from model.exam import ExamData from dbjudge.connection_manager.manager import Manager from dbjudge import squema_recollector, exceptions from PyQt5.QtCore import pyqtSlot, QItemSelectionModel class Exam_controller(): def __init__(self, selection_view, exam_view, results_view): self.selection_view = sele...
[ 1, 515, 1904, 29889, 735, 314, 1053, 1222, 314, 1469, 13, 13, 3166, 4833, 17675, 479, 29889, 9965, 29918, 12847, 29889, 12847, 1053, 15629, 13, 3166, 4833, 17675, 479, 1053, 10674, 2603, 29918, 276, 15914, 272, 29892, 15283, 13, 3166, 1...
chat/forms.py
Firexd2/social-network
2
47407
<reponame>Firexd2/social-network from django import forms from chat.models import Message, Room class NewRoomForm(forms.ModelForm): ids_users = forms.CharField(label='', required=False, widget=forms.TextInput(attrs={'hidden': 'true'})) first_message = forms.CharField(label='Приветственное сообщение', requi...
[ 1, 529, 276, 1112, 420, 29958, 18654, 29916, 29881, 29906, 29914, 24911, 29899, 11618, 13, 3166, 9557, 1053, 7190, 13, 13, 3166, 13563, 29889, 9794, 1053, 7777, 29892, 25114, 13, 13, 13, 1990, 1570, 9588, 290, 2500, 29898, 9514, 29889, ...
apps/fyle/migrations/0002_auto_20201221_0814.py
fylein/fyle-xero-api
0
67304
<filename>apps/fyle/migrations/0002_auto_20201221_0814.py # Generated by Django 3.0.3 on 2020-12-21 08:14 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('fyle', '0001_initial'), ] operations = [ migrations.AlterModelTable( name='exp...
[ 1, 529, 9507, 29958, 13371, 29914, 29888, 1508, 29914, 26983, 800, 29914, 29900, 29900, 29900, 29906, 29918, 6921, 29918, 29906, 29900, 29906, 29900, 29896, 29906, 29906, 29896, 29918, 29900, 29947, 29896, 29946, 29889, 2272, 13, 29937, 3251, ...
events/vizier.py
bonus-tm/euforia
1
1609001
<gh_stars>1-10 # Визирь from event import Event class Vizier(Event): """ Визирь Армия: довольствие, дезертиры Население: рождаемость, смертность, недовольство, голод Урожай: засухи-наводнения, урожайность, крысы Визирь: украл золото и скрылся """ def __init__(self, data, say, ask): ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 4491, 1916, 7474, 13, 3166, 1741, 1053, 6864, 13, 13, 1990, 478, 466, 631, 29898, 2624, 1125, 13, 1678, 9995, 4491, 1916, 7474, 13, 1678, 6164, 17682, 29901,...
JasonKe-v1/DDPG/DDPG.py
jasonke1225/AI-introduction
0
119518
<gh_stars>0 import matplotlib.pyplot as plt import gym import torch import math import numpy as np from torch._C import dtype import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import os import DDPG.replaymemory as replaymemory from DDPG.OUNoise import OUNoise import time ''' 紀錄q直 try '...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 5215, 330, 962, 13, 5215, 4842, 305, 13, 5215, 5844, 13, 5215, 12655, 408, 7442, 13, 3166, 4842, 305, 3032, 29907, 1053, 26688, 13, 521...
tests/test_env_runner.py
pistarlab/simpleland
4
26443
<reponame>pistarlab/simpleland import pytest from landia.env import LandiaEnv, LandiaEnvSingle import time from landia.clock import clock def test_env(): agent_map = {str(i):{} for i in range(4)} env = LandiaEnv(agent_map=agent_map,dry_run=False) start_time = time.time() max_steps = 2000 dones = ...
[ 1, 529, 276, 1112, 420, 29958, 29886, 391, 279, 8205, 29914, 12857, 1049, 13, 5215, 11451, 1688, 13, 3166, 2982, 423, 29889, 6272, 1053, 3172, 423, 21745, 29892, 3172, 423, 21745, 15771, 13, 5215, 931, 13, 3166, 2982, 423, 29889, 13058,...
wsgi.py
javicacheiro/salt-git-synchronizer-proxy
0
2167
#!/usr/bin/env python import logging import sys from app import app as application def setup_flask_logging(): # Log to stdout handler = logging.StreamHandler(sys.stdout) # Log to a file #handler = logging.FileHandler('./application.log') handler.setLevel(logging.INFO) handler.setFormatter(logg...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 5215, 12183, 13, 5215, 10876, 13, 3166, 623, 1053, 623, 408, 2280, 13, 13, 13, 1753, 6230, 29918, 1579, 1278, 29918, 21027, 7295, 13, 1678, 396, 4522, 304, 27591, 13, 1678, 7834, 353...
plsa_example.py
dingwanggmail/Topic_model
0
152704
<filename>plsa_example.py from plsa import Corpus, Pipeline, Visualize from plsa.pipeline import DEFAULT_PIPELINE from plsa.algorithms import PLSA csv_file = '/disk2/wangding/plsa_data/Full-Economic-News-DFE-839861.csv' pipeline = Pipeline(*DEFAULT_PIPELINE) corpus = Corpus.from_csv(csv_file, pipeline) n_topics = 5 ...
[ 1, 529, 9507, 29958, 572, 4977, 29918, 4773, 29889, 2272, 13, 3166, 715, 4977, 1053, 2994, 13364, 29892, 349, 23828, 29892, 9249, 675, 13, 3166, 715, 4977, 29889, 13096, 5570, 1053, 22236, 29918, 2227, 4162, 18521, 13, 3166, 715, 4977, ...
app/crawlzero/apps.py
rputh055/crawlzerotest
0
38896
from django.apps import AppConfig class crawlzeroConfig(AppConfig): name = 'crawlzero'
[ 1, 515, 9557, 29889, 13371, 1053, 2401, 3991, 13, 13, 13, 1990, 29349, 29880, 9171, 3991, 29898, 2052, 3991, 1125, 13, 1678, 1024, 353, 525, 29883, 1610, 29880, 9171, 29915, 13, 2 ]
seraphim/util/extended_euclidean.py
kluhan/seraphim
0
101594
<gh_stars>0 # Python Module extended_euclidean import logging class Error(Exception): """Base class for exceptions in this module.""" pass class InversionError(Error): """Exception raised for errors in the input. Attributes: expression -- input expression in which the error occurred ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 5132, 15591, 10410, 29918, 29872, 27511, 13, 13, 5215, 12183, 13, 13, 13, 1990, 4829, 29898, 2451, 1125, 13, 1678, 9995, 5160, 770, 363, 15283, 297, 445, 3883, 1213, 15945, 13, ...
tests/test_bestip.py
po2xel/mootdx
88
193828
<gh_stars>10-100 import logging from pathlib import Path import pytest from mootdx import config class TestBestIP: config = '' @staticmethod def setup_class(cls): logging.info('setup_class') cls.config = Path.home() / '.mootdx' / 'config.json' cls.config.exists() and cls.config....
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 5215, 12183, 13, 3166, 2224, 1982, 1053, 10802, 13, 13, 5215, 11451, 1688, 13, 13, 3166, 2730, 327, 8235, 1053, 2295, 13, 13, 13, 1990, 4321, 25353, ...
keras/downstream_tasks/BraTS/DataSet.py
joeranbosma/ModelsGenesis
574
99510
#!/usr/bin/env python """ File: DataSet Date: 5/1/18 Author: <NAME> (<EMAIL>) This file provides loading of the BraTS datasets for ease of use in TensorFlow models. """ import os import pandas as pd import numpy as np import nibabel as nib from tqdm import tqdm from BraTS.Patient import * from BraTS.structure impo...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 15945, 29908, 13, 2283, 29901, 3630, 2697, 13, 2539, 29901, 29871, 29945, 29914, 29896, 29914, 29896, 29947, 29871, 13, 13720, 29901, 529, 5813, 29958, 313, 29966, 26862, 6227, 12948, 13, ...
config/usb_device_cdc.py
newbs/usb
0
17954
"""***************************************************************************** * Copyright (C) 2019 Microchip Technology Inc. and its subsidiaries. * * Subject to your compliance with these terms, you may use Microchip software * and any derivatives exclusively with Microchip products. It is your * responsibility to ...
[ 1, 9995, 7775, 7775, 7775, 7775, 4189, 2328, 29930, 13, 29930, 14187, 1266, 313, 29907, 29897, 29871, 29906, 29900, 29896, 29929, 20140, 305, 666, 17968, 9266, 29889, 322, 967, 11684, 8819, 4314, 29889, 13, 29930, 13, 29930, 3323, 622, 30...
setup.py
ZebinYang/pyUniDOE
3
184962
<reponame>ZebinYang/pyUniDOE<gh_stars>1-10 from setuptools import setup, Extension pyUniDOE_module = Extension('_pyunidoe_swig', sources=['pyunidoe/pyunidoe_swig_wrap.cxx', 'pyunidoe/wrapper.cpp', 'pyunidoe/doe_optimizer.cpp', 'pyunidoe/doe_criteria.cpp', 'pyunido...
[ 1, 529, 276, 1112, 420, 29958, 29999, 774, 262, 29979, 574, 29914, 2272, 8110, 3970, 29923, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 731, 21245, 8789, 1053, 6230, 29892, 7338, 2673, 13, 13, 2272, 8110, ...
tests/test_ad_sid.py
morian/bonsai
59
108441
<reponame>morian/bonsai import pytest from bonsai.active_directory import SID, sid def test_create_from_bytes_le(): """ Test create SID from binary. """ with pytest.raises(ValueError): _ = SID(bytes_le=b"NOT-A-SID") with pytest.raises(ValueError): _ = SID( bytes_le=b"\x01\x05\...
[ 1, 529, 276, 1112, 420, 29958, 12257, 713, 29914, 29890, 787, 1794, 13, 5215, 11451, 1688, 13, 13, 3166, 289, 787, 1794, 29889, 4925, 29918, 12322, 1053, 317, 1367, 29892, 25349, 13, 13, 13, 1753, 1243, 29918, 3258, 29918, 3166, 29918, ...
src/util/perf/u_trace.py
SoftReaper/Mesa-Renoir-deb
0
140675
# # Copyright (C) 2020 Google, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, dist...
[ 1, 396, 13, 29937, 14187, 1266, 313, 29907, 29897, 29871, 29906, 29900, 29906, 29900, 5087, 29892, 9266, 29889, 13, 29937, 13, 29937, 20894, 2333, 338, 1244, 1609, 16896, 29892, 3889, 310, 8323, 29892, 304, 738, 2022, 4017, 292, 263, 13, ...
src/certGenerator.py
m-lab/wehe_desktop
6
1611438
import argparse import os import sys from urllib2 import urlopen # https://gist.github.com/fntlnz/cf14feb5a46b2eda428e000157447309 default_root_cert_location = './ssl/ca.crt' default_root_key_location = './ssl/ca.key' parser = argparse.ArgumentParser( description='Generate a new certificate and sign it with root...
[ 1, 1053, 1852, 5510, 13, 5215, 2897, 13, 5215, 10876, 13, 3166, 3142, 1982, 29906, 1053, 5065, 417, 2238, 13, 13, 29937, 2045, 597, 29887, 391, 29889, 3292, 29889, 510, 29914, 29888, 593, 3083, 29920, 29914, 6854, 29896, 29946, 29888, 7...
babel_python/babel_python/rabbitmq.py
threathunterX/python_lib
2
136552
#!/usr/bin/env python # -*- encoding: utf-8 -*# # referencing code in pyspider from __future__ import absolute_import import time, logging import threading, Queue try: from urllib import parse as urlparse except ImportError: import urlparse import pika import pika.exceptions from threathunter_common.rabbitmq.r...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 8025, 29901, 23616, 29899, 29947, 448, 29930, 29937, 13, 29937, 29371, 775, 297, 282, 952, 29886, 1241, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 52...
Dataset/Utils.py
Armanfard-Lab/DASVDD
3
105197
import numpy as np import torch import torch.nn as nn import torchvision import pandas as pd import matplotlib.pyplot as plt import torch.nn.functional as F from sklearn import metrics import torchvision.transforms as transforms def get_target_label_idx(labels, targets): return np.argwhere(np.isin(labels, target...
[ 1, 29871, 13, 13, 5215, 12655, 408, 7442, 13, 5215, 4842, 305, 13, 5215, 4842, 305, 29889, 15755, 408, 302, 29876, 13, 5215, 4842, 305, 4924, 13, 5215, 11701, 408, 10518, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 5215, 4842,...
tests/operators01/__init__.py
Imperatorn/ohmygentool
26
1616823
import os import sys import subprocess import platform import helpers from io import open def run(): test_name = 'optest' config = 'Release' libExt = helpers.static_lib_extensions() dc = helpers.detect_compiler() extra_args = list() helpers.setup_args(extra_args, config=config) if (helper...
[ 1, 1053, 2897, 13, 5215, 10876, 13, 5215, 1014, 5014, 13, 5215, 7481, 13, 5215, 1371, 414, 13, 3166, 12013, 1053, 1722, 13, 13, 13, 13, 1753, 1065, 7295, 13, 1678, 1243, 29918, 978, 353, 525, 3670, 342, 29915, 13, 1678, 2295, 353, ...
examples/mnist_test_pipe.py
vfdev-5/fairscale
6
60905
<filename>examples/mnist_test_pipe.py # adapted from https://github.com/pytorch/examples/blob/master/mnist/main.py from __future__ import print_function import argparse import time import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.optim.lr_scheduler import StepL...
[ 1, 529, 9507, 29958, 19057, 29914, 23521, 391, 29918, 1688, 29918, 17760, 29889, 2272, 13, 29937, 23430, 515, 2045, 597, 3292, 29889, 510, 29914, 2272, 7345, 305, 29914, 19057, 29914, 10054, 29914, 6207, 29914, 23521, 391, 29914, 3396, 2988...
Site-Campus/sitecampus/migrations/0007_auto_20191121_1902.py
Benedito-Medeiros-Neto-UnB/TacProgWeb
1
1605940
<filename>Site-Campus/sitecampus/migrations/0007_auto_20191121_1902.py<gh_stars>1-10 # Generated by Django 2.2.7 on 2019-11-21 19:02 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sitecampus', '0006_post_sutia'), ] operations = [ migra...
[ 1, 529, 9507, 29958, 17033, 29899, 29907, 1160, 375, 29914, 2746, 24821, 375, 29914, 26983, 800, 29914, 29900, 29900, 29900, 29955, 29918, 6921, 29918, 29906, 29900, 29896, 29929, 29896, 29896, 29906, 29896, 29918, 29896, 29929, 29900, 29906, ...
src/simmate/database/base_data_types/thermodynamics.py
laurenmm/simmate-1
0
152181
<reponame>laurenmm/simmate-1 # -*- coding: utf-8 -*- from tqdm import tqdm from simmate.toolkit import Structure as ToolkitStructure from simmate.database.base_data_types import DatabaseTable, table_column from simmate.utilities import get_chemical_subsystems # , dask_batch_submit from pymatgen.analysis.phase_diagr...
[ 1, 529, 276, 1112, 420, 29958, 433, 10732, 4317, 29914, 3601, 25046, 29899, 29896, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 3166, 260, 29939, 18933, 1053, 260, 29939, 18933, 13, 13, 3166,...
cosmoboost/lib/KernelODE.py
maamari/CosmoBoost
0
87429
""" library containing differential equation solver for d=1 kernel elements """ __author__ = " <NAME>" __email__ = "<EMAIL>" import os import numpy as np from scipy.special import factorial import pdb np.seterr(divide='ignore', invalid='ignore') from scipy import special from scipy.integrate import odeint, solve_ivp...
[ 1, 9995, 13, 5258, 6943, 16712, 6306, 899, 369, 363, 270, 29922, 29896, 8466, 3161, 13, 15945, 29908, 13, 1649, 8921, 1649, 353, 376, 529, 5813, 11903, 13, 1649, 5269, 1649, 353, 9872, 26862, 6227, 11903, 13, 13, 5215, 2897, 13, 5215,...
sap/xssec/security_context.py
51acorsi/cloud-pysec
0
150607
<reponame>51acorsi/cloud-pysec<gh_stars>0 """ This module is deprecated. """ import warnings from sap.xssec import SecurityContextXSUAA warnings.warn("Class security_context.SecurityContext is deprecated, " "use security_context_xsuaa.SecurityContextXSUAA instead ", DeprecationWarning, stacklevel=2) Se...
[ 1, 529, 276, 1112, 420, 29958, 29945, 29896, 562, 943, 29875, 29914, 9274, 29899, 2272, 3471, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 15945, 29908, 13, 4013, 3883, 338, 18164, 29889, 13, 15945, 29908, 13, 5215, 18116, 13, 13, ...
geolocate/tests/test_parser.py
kayodebristol/geolocate
4
65151
<reponame>kayodebristol/geolocate """ test_logparser.py Programmed by: <NAME> email: <EMAIL> """ import io import sys import unittest import unittest.mock from collections import namedtuple import geolocate.classes.config as config import geolocate.classes.geowrapper as geoip import geolocate.classes.parser as p...
[ 1, 529, 276, 1112, 420, 29958, 29895, 388, 356, 1182, 19639, 29914, 479, 324, 542, 403, 13, 15945, 29908, 13, 1243, 29918, 1188, 16680, 29889, 2272, 13, 13, 7835, 2168, 491, 29901, 529, 5813, 29958, 13, 13, 4876, 29901, 529, 26862, 62...
Week 1/id_165/LeetCode_283_165.py
larryRishi/algorithm004-05
1
178333
#-*- encoding: utf-8 -*- # 给定一个数组 nums,编写一个函数将所有 0 移动到数组的末尾,同时保持非零元素的相对顺序。 # # 示例: # # 输入: [0,1,0,3,12] # 输出: [1,3,12,0,0] # # 说明: # # # 必须在原数组上操作,不能拷贝额外的数组。 # 尽量减少操作次数。 # # Related Topics 数组 双指针 # leetcode submit region begin(Prohibit modification and deletion) # class Solution(object): # def moveZeroes(self, n...
[ 1, 396, 29899, 29930, 29899, 8025, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 29937, 29871, 31999, 30495, 30287, 30502, 30354, 31263, 954, 29879, 30214, 31795, 31479, 30287, 30502, 31629, 30354, 30998, 30744, 30417, 29871, 29900, ...
nhoods/profile_builder.py
MSLADevServGIS/NhoodProfiles
0
148602
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Neighborhood Profiler Script <NAME>; Feb-April 2016 This script uses an mxd map template to query neighborhood information, places that info into an HTML template, and finally kicks those HTML files out to PDF. This script relies on up-to-date data that is managed man...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 8139, 1141, 4089, 6614, 23202, 261, 14415, 13, 29966, 5813, 25867, 26319, 29899, 29909...
recommendations/kujikatsu/249/c.py
takelifetime/competitive-programming
0
28486
a, b, n = map(int, input().split()) x = min(b - 1, n) print(a * x // b - a * (x // b))
[ 1, 263, 29892, 289, 29892, 302, 353, 2910, 29898, 524, 29892, 1881, 2141, 5451, 3101, 13, 29916, 353, 1375, 29898, 29890, 448, 29871, 29896, 29892, 302, 29897, 13, 2158, 29898, 29874, 334, 921, 849, 289, 448, 263, 334, 313, 29916, 849, ...
vcf/old/read_test.py
TuanjieNew/jubilant-fiesta
0
1600930
#!/usr/bin/env python # read_test.py FILE = open('wanrenInfo_snp.txt', 'r') DICFILE = open('/haplox/users/huanghuiqiang/project/wanren/VCF/vcf/caobo.final.snp.hg19_multianno.vcf', 'r') dic = {} for line in DICFILE: line = line.strip('\n') ln_ls = line.split('\t') if line[0] == '#': continue chr...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 1303, 29918, 1688, 29889, 2272, 13, 13, 7724, 353, 1722, 877, 11440, 1267, 3401, 29918, 29879, 9302, 29889, 3945, 742, 525, 29878, 1495, 13, 29928, 2965, 7724, 353, 1722, 11219, ...
Examples And Benchmarks/HTTP over Raw Connection/SERVERS/http_server__http_tools.py
FI-Mihej/FI-ASockIOCore
0
12958
from simple_network.tcp_app_server import * import httptools """ Module Docstring Docstrings: http://www.python.org/dev/peps/pep-0257/ """ __author__ = 'ButenkoMS <<EMAIL>>' # ====================================================================== # ===================GLOBAL SETTINGS FOR ALL TESTS===================...
[ 1, 515, 2560, 29918, 11618, 29889, 23981, 29918, 932, 29918, 2974, 1053, 334, 13, 5215, 1143, 415, 8789, 13, 13, 15945, 29908, 13, 7355, 28197, 1807, 13, 14526, 19651, 29901, 1732, 597, 1636, 29889, 4691, 29889, 990, 29914, 3359, 29914, ...
MYONN/myonn.py
bfelder/MYONN
3
144319
#!/usr/bin/env python3 import csv import datetime import os import shelve from time import time import matplotlib.pyplot as plt import numpy as np from scipy.special import expit as activation_function # sigmoid function from scipy.special import logit as inverse_activation_function import wget # CONFIG DATA_DIR =...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 5215, 11799, 13, 5215, 12865, 13, 5215, 2897, 13, 5215, 528, 13841, 13, 3166, 931, 1053, 931, 13, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 5215, 12655, 408, 744...
custom_components/ecowitt/sensor.py
synth3tk/homeassistant_ecowitt
15
51737
<gh_stars>10-100 """Support for Ecowitt Weather Stations.""" import logging import homeassistant.util.dt as dt_util from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN from homeassistant.components.sensor import SensorEntity from homeassistant.const import DEVICE_CLASS_BATTERY from homeassistant.const ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 15945, 29908, 14039, 363, 382, 20587, 986, 1334, 1624, 624, 800, 1213, 15945, 13, 5215, 12183, 13, 13, 5215, 3271, 465, 22137, 29889, 4422, 29889, 6008,...
laboratorios/4-Analisis-algoritmos-2/B - Friend Circle Queries.py
yeisonbarreto/ayed-2019-1
0
155854
from sys import stdin def main(): print('Número de enteros a procesar') n = stdin.readline().strip() f = [] print('Secuencia de consultas') cont = 1 for i in range(int(n)): x = stdin.readline().strip().split(' ') if x in f: print('2') elif x[0] in f: ...
[ 1, 515, 10876, 1053, 3659, 262, 13, 1753, 1667, 7295, 13, 1678, 1596, 877, 29940, 30030, 1050, 29877, 316, 3896, 359, 263, 14177, 279, 1495, 13, 1678, 302, 353, 3659, 262, 29889, 949, 1220, 2141, 17010, 580, 13, 1678, 285, 353, 5159, ...
cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_ipv4_telnet_mgmt_cfg.py
tkamata-test/ydk-py
0
30753
<reponame>tkamata-test/ydk-py """ Cisco_IOS_XR_ipv4_telnet_mgmt_cfg This module contains a collection of YANG definitions for Cisco IOS\-XR ipv4\-telnet\-mgmt package configuration. This module contains definitions for the following management objects\: telnet\: Global Telnet configuration commands Copyright (c) ...
[ 1, 529, 276, 1112, 420, 29958, 11178, 314, 532, 29899, 1688, 29914, 2941, 29895, 29899, 2272, 13, 15945, 29908, 315, 275, 1111, 29918, 25925, 29918, 29990, 29934, 29918, 666, 29894, 29946, 29918, 28497, 1212, 29918, 29885, 29887, 4378, 2991...
Lib/contextlib.py
uburuntu/cpython
0
130199
<filename>Lib/contextlib.py """Utilities for with-statement contexts. See PEP 343.""" import abc import sys import _collections_abc from collections import deque from functools import wraps from types import MethodType, GenericAlias __all__ = ["asynccontextmanager", "contextmanager", "closing", "nullcontext", ...
[ 1, 529, 9507, 29958, 14868, 29914, 4703, 1982, 29889, 2272, 13, 15945, 29908, 7270, 1907, 363, 411, 29899, 20788, 3030, 29879, 29889, 29871, 2823, 349, 15488, 29871, 29941, 29946, 29941, 1213, 15945, 13, 5215, 25638, 13, 5215, 10876, 13, ...
examples/old-examples/GLWindow/conways_game_of_life_texel_fetch.py
asnt/moderngl
96
173260
import struct import numpy import GLWindow import ModernGL # This example is not working with NPOT Textures width, height = 640, 460 pixels = numpy.round(numpy.random.rand(width, height)).astype('float32') grid = numpy.dstack(numpy.mgrid[0:height, 0:width][::-1]).astype('int32') wnd = GLWindow.create_window(width,...
[ 1, 1053, 2281, 13, 5215, 12655, 13, 13, 5215, 12729, 5907, 13, 5215, 14624, 7239, 13, 13, 29937, 910, 1342, 338, 451, 1985, 411, 405, 29925, 2891, 3992, 1973, 13, 13, 2103, 29892, 3171, 353, 29871, 29953, 29946, 29900, 29892, 29871, 2...
Processing.py
Christoper-Harvey/ecg-file-processing
0
113745
import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import base64 import glob from scipy.signal import medfilt from scipy.integrate import trapz import xml.etree.ElementTree as et from datetime import date today = date.today() np.warnings.filterwarnings('ignore') ...
[ 1, 1053, 12655, 408, 7442, 30004, 13, 5215, 11701, 408, 10518, 30004, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 30004, 13, 5215, 409, 370, 1398, 408, 269, 1983, 30004, 13, 5215, 2967, 29953, 29946, 30004, 13, 5215, 13149, 30004, 1...
src/core/migrations/0020_auto_20181125_0510.py
metabolism-of-cities/ARCHIVED-metabolism-of-cities-platform-v3
0
176673
# Generated by Django 2.1.3 on 2018-11-25 05:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0019_auto_20181125_0501'), ] operations = [ migrations.AlterField( model_name='reference', name='title_origi...
[ 1, 396, 3251, 630, 491, 15337, 29871, 29906, 29889, 29896, 29889, 29941, 373, 29871, 29906, 29900, 29896, 29947, 29899, 29896, 29896, 29899, 29906, 29945, 29871, 29900, 29945, 29901, 29896, 29900, 13, 13, 3166, 9557, 29889, 2585, 1053, 9725, ...
spNQueenTheorem/generator.py
lightofanima/Adventures
0
166795
# This script generates a theorem for them Z3 SAT solver. The output of this program # is designed to be the input for http://rise4fun.com/z3 # The output of z3 is the coordinates of the queens for a solution to the N Queen problem :) #Prints an assert statement def zassert(x): print("( assert ( {} ) )".format(x)...
[ 1, 396, 910, 2471, 16785, 263, 9185, 363, 963, 796, 29941, 317, 1299, 899, 369, 29889, 450, 1962, 310, 445, 1824, 13, 29937, 338, 8688, 304, 367, 278, 1881, 363, 1732, 597, 29878, 895, 29946, 7692, 29889, 510, 29914, 29920, 29941, 13,...
mypyc/test/test_irbuild.py
aghast/mypy
0
137251
"""Test cases for IR generation.""" import os.path from mypy.test.config import test_temp_dir from mypy.test.data import DataDrivenTestCase from mypy.errors import CompileError from mypyc.common import TOP_LEVEL_NAME from mypyc.ir.func_ir import format_func from mypyc.test.testutil import ( ICODE_GEN_BUILTINS, u...
[ 1, 9995, 3057, 4251, 363, 23292, 12623, 1213, 15945, 13, 13, 5215, 2897, 29889, 2084, 13, 13, 3166, 590, 2272, 29889, 1688, 29889, 2917, 1053, 1243, 29918, 7382, 29918, 3972, 13, 3166, 590, 2272, 29889, 1688, 29889, 1272, 1053, 3630, 29...
applications/ParticleMechanicsApplication/tests/test_search_mpm_particle.py
lcirrott/Kratos
2
76864
<reponame>lcirrott/Kratos from __future__ import print_function, absolute_import, division import KratosMultiphysics import KratosMultiphysics.ParticleMechanicsApplication as KratosParticle import KratosMultiphysics.KratosUnittest as KratosUnittest class TestSearchMPMParticle(KratosUnittest.TestCase): def _gene...
[ 1, 529, 276, 1112, 420, 29958, 29880, 19052, 26970, 29914, 29968, 3605, 359, 13, 3166, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 29892, 8380, 29918, 5215, 29892, 8542, 13, 5215, 476, 3605, 359, 15329, 25105, 13, 13, 5215, 476, 3...
Hello.py
pechimuthu369/pythonapp
0
123985
<reponame>pechimuthu369/pythonapp msg="Hello World" print(msg)
[ 1, 529, 276, 1112, 420, 29958, 412, 305, 326, 2806, 29884, 29941, 29953, 29929, 29914, 4691, 932, 13, 7645, 543, 10994, 2787, 29908, 13, 2158, 29898, 7645, 29897, 2 ]
setup.py
vhdeluca/PyStacking
0
51102
from setuptools import setup, find_packages setup(name='pystacking', version='0.1.0', description='Python Machine Learning Stacking Maker', author='<NAME>', author_email='<EMAIL>', license='MIT', packages=find_packages(), python_requires=">=3.5", tests_require=['pytest'...
[ 1, 515, 731, 21245, 8789, 1053, 6230, 29892, 1284, 29918, 8318, 13, 13, 13, 14669, 29898, 978, 2433, 29886, 858, 547, 292, 742, 13, 418, 1873, 2433, 29900, 29889, 29896, 29889, 29900, 742, 13, 418, 6139, 2433, 11980, 6189, 29257, 10292,...
server.py
IT-Department-Projects/HCI-Project
0
137884
from imports import * from utils import * from auth import * """ REST API Call to detect image in a particular picture Argument takes in image with POST Key as 'file' Returns JSON of 'face_exists' and 'number_of_faces' """ @app.route('/image_detection', methods=['GET', 'POST']) def image_detection(): # Check if a...
[ 1, 515, 24802, 1053, 334, 13, 3166, 3667, 29879, 1053, 334, 13, 3166, 4817, 1053, 334, 13, 13, 13, 15945, 29908, 13, 1525, 1254, 3450, 8251, 304, 6459, 1967, 297, 263, 3153, 7623, 13, 15730, 4893, 297, 1967, 411, 11971, 7670, 408, 5...
logger.py
bekaaa/xgboost_tuner
0
2880
<reponame>bekaaa/xgboost_tuner<gh_stars>0 #! /usr/bin/env python import logging #--------------------------------------- class logger : ''' A ready to use logging class. All you need to do is set an object with the parameters (log_filename, directory to save it) then whenever you want to add text, type obj.add("so...
[ 1, 529, 276, 1112, 420, 29958, 915, 1335, 7340, 29914, 29916, 29887, 17079, 29918, 29873, 348, 261, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 29991, 847, 4855, 29914, 2109, 29914, 6272, 3017, 13, 5215, 12183, 13, 13, 29937,...
app/Http/python/DNVGLRPF103/DNVGLRPF103.py
asavadorndeja/sttools
0
41610
#!/usr/bin/python; import sys import ast import json import math as m import numpy as np # from scipy.interpolate import interp1d # from scipy.optimize import fsolve # Version Controller sTitle = 'DNVGL RP F103 Cathodic protection of submarine pipelines' sVersion = 'Version 1.0.0' # Define constants pi = m.pi e = m....
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 29936, 13, 5215, 10876, 13, 5215, 8717, 13, 5215, 4390, 13, 13, 5215, 5844, 408, 286, 13, 5215, 12655, 408, 7442, 13, 29937, 515, 4560, 2272, 29889, 1639, 3733, 403, 1053, 1006, 29886, 29896, ...
python3/aoc-01-04/main.py
brunobell/aoc-2019
0
118083
import typing def get_repeat_info(n: int) -> (bool, typing.Dict): digit, is_asc, repeat, hashmap = '0', True, 0, dict() for c in str(n): if c in hashmap: hashmap[c] = hashmap[c] + 1 else: hashmap[c] = 1 if digit <= c: if digit == c: ...
[ 1, 1053, 19229, 13, 13, 13, 1753, 679, 29918, 14358, 29918, 3888, 29898, 29876, 29901, 938, 29897, 1599, 313, 11227, 29892, 19229, 29889, 21533, 1125, 13, 1678, 13615, 29892, 338, 29918, 6151, 29892, 12312, 29892, 6608, 1958, 353, 525, 29...
ogreyLevelAttributesPanel.py
opengd/OgreyTool
0
154152
import wx from ogreyEntity import * from FoldPanelBar import * from ogreyScriptEditor import * import ogre.renderer.OGRE as ogre class ogreyLevelAttributesPanel(wx.Panel): def __init__(self, parent, window, resourceInformation, middle): wx.Panel.__init__(self, parent, -1, style = wx.FULL_REPAINT_ON_RESIZE...
[ 1, 1053, 26437, 13, 3166, 3671, 8903, 6691, 1053, 334, 13, 3166, 383, 1025, 7490, 4297, 1053, 334, 13, 3166, 3671, 8903, 4081, 15280, 1053, 334, 13, 13, 5215, 3671, 276, 29889, 9482, 261, 29889, 29949, 29954, 1525, 408, 3671, 276, 13,...
litex_boards/targets/digilent_cmod_a7.py
vacajk/litex-boards
0
67400
<gh_stars>0 #!/usr/bin/env python3 # # This file is part of LiteX-Boards. # # Copyright (c) 2021 <NAME> <<EMAIL>> # SPDX-License-Identifier: BSD-2-Clause import os import sys import argparse from migen import * from litex.build.io import CRG from litex.build.xilinx.vivado import vivado_build_args, vivado_build_argd...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 29937, 13, 29937, 910, 934, 338, 760, 310, 365, 568, 29990, 29899, 8431, 3163, 29889, 13, 29937, 13, 29937, 14187, 126...
venv/Lib/site-packages/pymessenger/bot.py
shivamsahni/Bot-to-live
0
41116
import json import requests from requests_toolbelt import MultipartEncoder from pymessenger.graph_api import FacebookGraphApi import pymessenger.utils as utils class Bot(FacebookGraphApi): def __init__(self, *args, **kwargs): super(Bot, self).__init__(*args, **kwargs) def send_text_message(self, r...
[ 1, 1053, 4390, 13, 13, 5215, 7274, 13, 3166, 7274, 29918, 10154, 29890, 2152, 1053, 9683, 27494, 8566, 6119, 13, 13, 3166, 282, 962, 9957, 914, 29889, 4262, 29918, 2754, 1053, 13327, 9527, 11713, 13, 5215, 282, 962, 9957, 914, 29889, ...
utils/augmentations.py
kogans1107/AR_yolact
2
170501
<reponame>kogans1107/AR_yolact import torch import cv2 import numpy as np import types #from numpy import random from math import sqrt from scipy.spatial import ConvexHull import imageio import copy # Force same sequence of random numbers to be drawn by augmentations. If two # training processes are otherwise the sa...
[ 1, 529, 276, 1112, 420, 29958, 29895, 468, 550, 29896, 29896, 29900, 29955, 29914, 1718, 29918, 29891, 324, 627, 13, 5215, 4842, 305, 13, 5215, 13850, 29906, 13, 5215, 12655, 408, 7442, 13, 5215, 4072, 13, 29937, 3166, 12655, 1053, 4036...
tscli/stats/commands.py
pnemade/transtats-cli
1
169064
# Copyright 2017-2019 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
[ 1, 396, 14187, 1266, 29871, 29906, 29900, 29896, 29955, 29899, 29906, 29900, 29896, 29929, 4367, 25966, 29892, 9266, 29889, 13, 29937, 2178, 26863, 2538, 9841, 29889, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, ...
custom_components/here_weather/utils.py
eifinger/homeassistant-conf
60
196426
<reponame>eifinger/homeassistant-conf<gh_stars>10-100 """Utility functions for here_weather.""" from __future__ import annotations from homeassistant.const import ( CONF_UNIT_SYSTEM_METRIC, LENGTH_CENTIMETERS, LENGTH_INCHES, LENGTH_KILOMETERS, LENGTH_MILES, PRESSURE_INHG, PRESSURE_MBAR, ...
[ 1, 529, 276, 1112, 420, 29958, 29872, 361, 5621, 29914, 5184, 465, 22137, 29899, 5527, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 15945, 29908, 7270, 537, 3168, 363, 1244, 29918, 705, 1624, 1213, ...