blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 283 | content_id stringlengths 40 40 | detected_licenses listlengths 0 91 | license_type stringclasses 2
values | repo_name stringlengths 3 135 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 68 | visit_date timestamp[ns]date 2015-07-25 20:53:29 2023-09-06 10:46:05 | revision_date timestamp[ns]date 1970-01-01 00:00:00 2037-05-03 13:00:00 | committer_date timestamp[ns]date 1970-01-01 00:00:00 2036-02-09 17:40:36 | github_id int64 1.61k 691M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 24
values | gha_event_created_at timestamp[ns]date 2012-06-03 10:21:33 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-09-13 22:40:33 ⌀ | gha_language stringclasses 250
values | src_encoding stringclasses 27
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 6 10M | extension stringclasses 289
values | filename stringlengths 1 218 | content stringlengths 6 10M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0f616d2f1b96e1e0a24366ae2ea6e63d1399cfff | e4cee772b6c92b6d025c261bfcf6aa54412d30f3 | /weekday.py | 3168a3e099d8e26723aa4854ac281b8ce6047de7 | [] | no_license | vinayavk/krish | 16f1f5ae3d3ac5ee828fe593974a667467a03103 | b540cd2b0315332a218a659b09483c64580bc068 | refs/heads/master | 2020-03-22T17:07:56.390463 | 2018-07-09T06:51:30 | 2018-07-09T06:51:30 | 140,374,962 | 0 | 0 | null | 2018-07-10T03:59:42 | 2018-07-10T03:59:42 | null | UTF-8 | Python | false | false | 145 | py | weekday.py | a=['mon','tues','thur','fri','sat']
b=['sun','wed']
c=str(input())
if c in a:
print('not a holiday')
else:
print('its a holiday')
|
b674ae7e989e1b36a427547a20918263613ef514 | f80631bddee062c73c41652ce393c3a00045bffb | /Server.py | 9ecbc51a5c3ac5da37e1046de5f53a6df4ac87d3 | [] | no_license | mahdafr/20u_cs5391-t3 | a437a4c7a4b75520e2eb848ead55e0bea9cf8a5b | 231be1c943d3a8fd0d7cc59631413e5dddeda531 | refs/heads/master | 2022-11-20T22:18:32.550776 | 2020-07-15T01:32:23 | 2020-07-15T01:32:23 | 276,516,990 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,050 | py | Server.py | import socket, threading, datetime
from TimeStamp import TimeStamp
import commands as cmd
client_addr = []
client_thread = []
class CThread(threading.Thread):
def __init__(self, c_sock, c_addr, file='out/serverTimeData.txt'):
threading.Thread.__init__(self) # create a new thread
... |
74c4f45f9bb6ada814f34dc87219e3453c5e72cb | 13b6ddb879828630822e59942f019ebf78658056 | /Examples/QFrame.py | 3a9d9860a639accc2f6d5671a9511b6f7f0d07f6 | [
"MIT"
] | permissive | GrayLand119/PyQt5-Demos | 9adc2c9f5e6a775dfd6d3490cec3b0eb19385809 | 792379b4f474abd00aceb2982aad599277a6139d | refs/heads/master | 2020-08-18T06:48:31.350363 | 2019-10-17T09:59:34 | 2019-10-17T09:59:34 | 215,760,389 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 994 | py | QFrame.py | from PyQt5 import QtGui
from PyQt5.QtWidgets import QApplication, QWidget, QFrame, QHBoxLayout, QPushButton
import sys
class Window(QWidget):
def __init__(self):
super().__init__()
self.title = "PyQt5 Frame"
self.top = 200
self.left = 500
self.width = 400
self.heigh... |
ef48b7d7c9dd814c676d9dbd12ff3ddef2397191 | b8424f2b4a53a3cba0eee3b063f6af32ddbb2702 | /sem5/avdp/lab/helper/walk.py | 2e23f741f04a4c150f3926ba86c1f614f2ec150b | [] | no_license | andreibratu/bachelor | f3e09a7ba75de7fb59fa180277121244b191796e | 735e26d2d9fdb4e04f527ea134efb1f923fe31ad | refs/heads/master | 2023-02-26T00:24:54.858339 | 2021-09-11T11:05:40 | 2021-09-11T11:05:40 | 155,425,216 | 5 | 2 | null | 2023-02-16T04:12:27 | 2018-10-30T17:06:24 | JavaScript | UTF-8 | Python | false | false | 2,128 | py | walk.py | from math import sqrt
from typing import List, Dict, Tuple
from domain.types import Matrix
# The positions in walk are invariant to matrix values.
# Use dicts to memorise position of any coord
walk, reverse_walk = {}, {}
def _build_zig_zag_walk(size: int) -> Tuple[Dict[Tuple[int, int], int], Dict[int, Tuple[int, in... |
90afbe9c7bb20f9b92b3d810bd0466581514c7bf | 7ff2a98d098dbba42b2ddd9ba5d84e25fd5ca776 | /pycor/__init__.py | 5f763340fa8f8886bd3d487733c5a546919dec57 | [
"BSD-3-Clause"
] | permissive | ontolog-so/pycor | 52d36aca8bdf6b6d61e6eeaac5581e25a46c5c6f | 25820c1e48c3cad279baea87bc0c21bf508f99b5 | refs/heads/master | 2021-07-20T01:26:51.000232 | 2018-12-05T04:22:35 | 2018-12-05T04:22:35 | 145,850,472 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 111 | py | __init__.py | from . import korlang
from .korlang import *
from . import VERSION
def version():
return VERSION.VERSION
|
5b7c8b0fefb29a8006eea627a44eea6bfff942fe | 0705800231be8e5b39ea368515bce1bba9a4b127 | /oop/design_patterns/decorator_pattern/baseclass/__init__.py | e7ae87bf350ad78243f1adeb533bc124870513c9 | [] | no_license | jochenrui/learn-py | f4ac1e9be35b2487d8987d109798924b85e38ba2 | 3b0a3e8b679e0d4c7fcec90ad27bcc8617807a5b | refs/heads/main | 2023-07-18T17:10:49.381013 | 2021-08-22T19:47:45 | 2021-08-22T19:47:45 | 387,421,850 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 158 | py | __init__.py | '''__init__.py files are required to make Python treat dirs as packages'''
from .beverage import Beverage
from .condiment_decorator import CondimentDecorator
|
ad70a933ad0dc222dfc86637f91966477dbe2614 | 92f651529eb71de77e9dea2ac885940fb8caf0b7 | /final_regression.py | a6d93dd6616981467380273d53beadb6c7d4e1b5 | [] | no_license | Priyanshu0/Boston-House-Price-Prediction | 9943d47910e1a81a53daee30dba48434b3943150 | adebb3895450bc4a51bb44a65677f1231f1e33a4 | refs/heads/master | 2020-12-19T20:18:03.497289 | 2020-09-30T19:42:56 | 2020-09-30T19:42:56 | 235,840,921 | 0 | 1 | null | 2020-09-30T19:42:58 | 2020-01-23T16:51:25 | Python | UTF-8 | Python | false | false | 2,956 | py | final_regression.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jun 11 09:38:13 2019
@author: priyanshutuli
"""
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
dataset = pd.read_csv('Downloads/boston.csv')
print(dataset.head(8))
X=dataset.iloc[:,:-1]
y=dataset.iloc... |
7e44010f87d0a339eb0f68e4d957bb0ea0fcd0e5 | a7cfe6cdc50ce5f2908a8187054543db471f7241 | /Interface.py | e8d96de00dfb2342ab802c26f4edcfa66af56ed0 | [] | no_license | AxMannessiez/InterfaceCommandeSousMarin | c6cf306780eab4be6137868a29cc69f6a6c9c5e7 | ea3772171c42650b609e7bdd6312433bfec97f36 | refs/heads/main | 2023-04-02T21:32:48.529194 | 2021-04-01T13:45:24 | 2021-04-01T13:45:24 | 353,714,353 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,168 | py | Interface.py | ### Programme : Interface.py
########## IMPORTS ##########
import io, os, sys, picamera
import RPi.GPIO as GPIO
import pygame
from pygame.locals import *
import time
import warnings
#################################################################
warnings.filterwarnings('def... |
76f727bc078281526b109cadf5100d009a76a616 | 662bc415ec79fada68061b937ac40fd7fcdc2a91 | /backend/interfaces/restful/project/test_case/test_step/extract.py | d30ab48dd8324add5a9b65eb2a217c07fcc8e80c | [] | no_license | qianqian3/Swagger2CaseManager | bd04f8c4109354562c458ba6d5a34c6c417fd284 | 7da7e796cd72d27b56600588a59203c48431b85d | refs/heads/master | 2022-01-21T14:27:21.298322 | 2019-06-06T10:38:02 | 2019-06-06T10:38:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,015 | py | extract.py | from flask import make_response, jsonify
from flask_restful import Resource, reqparse
from backend.models.models import Extract
from backend.models.curd import ExtractCURD, Session
curd = ExtractCURD()
parser = reqparse.RequestParser()
parser.add_argument('id', type=str)
parser.add_argument('step_id', type=str)
pars... |
c40a7fe3d1963d31a95cadef7e6caf7184cdec88 | b358245f42b1be261826bb89896a574dc71a0159 | /iterations.py | c6ec2683dedea2037d6bee5661d1dd9fd46e01a1 | [] | no_license | Pedro-M-Santos/python_scripts | d073f6da731f987ba15949c96943392efd04be88 | 09ee9b3c0d04a46351ada32fcf50eb95c1956436 | refs/heads/master | 2021-01-10T16:03:20.019390 | 2016-02-25T02:32:44 | 2016-02-25T02:32:44 | 52,491,119 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 67 | py | iterations.py | word = 'ovo'
for turn in range(len(word)):
print word[turn] |
0ea7c5e3df0477fc557d242c8c51295f9ea34f5c | cf38801b9856eb1674731b1d75487c3d315238a2 | /harshadnumbers.py | f867825e5e63efe45cff9af3b3292da881937c35 | [] | no_license | justinballas/Kattis-Solutions | 0644498eca350759e34412a05a2ebd4db9e0ee56 | 477ab5fb8045405ff1d35b5a3a467f1a176f8421 | refs/heads/main | 2023-07-14T10:03:23.183366 | 2021-08-29T23:14:06 | 2021-08-29T23:14:06 | 327,362,182 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 288 | py | harshadnumbers.py | num = input()
num_list = list(map(int, num))
int_num = int(num)
if int_num % sum(num_list) == 0:
print(num)
else:
while int_num % sum(num_list) != 0:
int_num += 1
num_list = list(map(int, str(int_num)))
if int_num % sum(num_list) == 0:
print(int_num) |
5967e344d08e620d75465c23e746849078c6b91f | 735b6ae989d603d9d2d43f660392b8b57e5a21e9 | /particle.py | 8c2862bd0adee0accb4389537e284c88dd43f08d | [] | no_license | Sirivasv/RouteFinding | 44373f4d80f57f8c7bd57d9c2bfa4090135f6853 | c61dff4d581a1f988efc403f05dce3e20c2684e4 | refs/heads/master | 2021-09-01T14:50:35.162545 | 2017-12-27T15:19:46 | 2017-12-27T15:19:46 | 107,785,083 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 574 | py | particle.py | from point import Point
import random
class Particle:
def __init__(self, coord_x = 0, coord_y = 0, steps_number = 100):
self.curr_coord = Point(coord_x, coord_y) #Posicion Actual
self.prev_coord = self.curr_coord #Posicion Anterior
self.directions = [] #Arreglo de direcciones en cada paso
self.f... |
1d9189ee39b439130e683af1c508dbda3f664da4 | 5d8ae8cf9bc7837f306ac458e6277bbd6067143e | /timetable_scheduler.py | 392268494422d52784f9ebe7c68aecbb9890d08b | [] | no_license | kobinaquansah/Scheduler | 93b8ed3098da292f15ebb897743d76833e505a96 | 0b729aaf997d882bb6572f09e4589178b69c8d90 | refs/heads/master | 2022-11-17T14:38:17.430797 | 2020-07-20T19:09:20 | 2020-07-20T19:09:20 | 275,175,628 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,296 | py | timetable_scheduler.py | import re
import time
import random
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
responsibility=pd.read_csv("responsibility_input.csv")
availability=pd.read_csv("available_slots_input.csv")
class InputParse():
@staticmethod
def clean_(entry):
entry.set_index(entry.columns[0],... |
a057ede8a732e6d704a4347457f2e244878ba0c2 | 4d11a6c3ff2789c3af5cbda8eb927dc468fd0609 | /tests/texture_test.py | e4b9ecefba6417f5b6d28281adb030b5873f7a3a | [
"MIT"
] | permissive | stanfortonski/Perlin-Noise-3D-Voxel-Generator | 540c2a14c3021701979c0a930091d7862e2d6302 | f06b0329c948848b22b5e3c04978e95ce71f5ab0 | refs/heads/master | 2022-11-18T23:53:00.305860 | 2020-07-18T16:54:17 | 2020-07-18T16:54:17 | 264,319,677 | 31 | 1 | null | null | null | null | UTF-8 | Python | false | false | 708 | py | texture_test.py | import sys, unittest, glfw
sys.path.insert(0, '..')
from OpenGL.GL import *
from engine.buffer.texture import Texture
import helper
class TextureTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.window = helper.initAndGetWindow()
@classmethod
def tearDownClass(cls):
glfw.t... |
fbd72495595dd7f6fd1fe5ea866163d4fb74af55 | 0e77ebcc2b72b8e1b620d916336166badd38a887 | /Python项目开发实战/第2章 Python脚本/2.3.3 xml & html/text_parse.py | 644369848c065162389f20e08363d6d07ffb6222 | [] | no_license | L1nwatch/Mac-Python-3.X | ce70f2c3691a73db9256bcf47510c415d68591f0 | 73022b40d26ad09051329ae7ff8aae7201d8de6d | refs/heads/master | 2022-08-08T20:59:58.041245 | 2022-08-07T14:41:39 | 2022-08-07T14:41:39 | 50,715,245 | 10 | 2 | null | null | null | null | UTF-8 | Python | false | false | 538 | py | text_parse.py | #!/bin/env python3
# -*- coding: utf-8 -*-
# version: Python3.X
''' 纯文本解析示例
'''
__author__ = '__L1n__w@tch'
def has_mary(a_line):
print("We found: ", a_line)
def parse_text(the_text, a_pattern, function):
for line in the_text.split("\n"):
if a_pattern in line:
function(line)
def main()... |
3847efaab194a616232e96c776dcf51cf06f59fb | 75952c75cf062910c9ced72ff22d7a3d5ea1513d | /python/asyncio_test.py | 51ca91bdae20335cf84f6784466f2e7cbc2e04c6 | [] | no_license | GabrieleMaurina/workspace | f01a412f001f63c8e41dc8e6d21941be83bf404e | 37d98a99c83d36c07c51990c5b6ec2a8acaac33e | refs/heads/master | 2022-09-26T16:48:49.169262 | 2022-08-30T20:09:18 | 2022-08-30T20:09:18 | 155,683,393 | 1 | 0 | null | 2021-02-26T14:42:44 | 2018-11-01T08:16:45 | Python | UTF-8 | Python | false | false | 348 | py | asyncio_test.py | import asyncio as asy
import time
async def say_after(delay, what):
await asy.sleep(delay)
print(what)
async def main():
print(f"started at {time.strftime('%X')}")
await say_after(1, 'hello')
await say_after(2, 'world')
print(f"finished at {time.strftime('%X')}")
asy.run(main())
print(f"af... |
44174fe53fdd0b0ba50a009ba7f7a7e5294d5c35 | 00260ba65d03f544eb28104813684d4272e2c225 | /blogapp/admin/views.py | 85269ece278932fd4707e9c4ba34427fbd8170ff | [] | no_license | yuanshandaren/hehe | 4307f4030c97a1db1cc302f60bab010df7b272b3 | 0349a644654eff5284811ad27cfa200e0a2a4818 | refs/heads/master | 2021-01-10T00:56:54.349039 | 2015-10-09T01:42:03 | 2015-10-09T01:42:03 | 43,621,577 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,536 | py | views.py | #encoding=utf-8
from flask.ext.admin import AdminIndexView,expose
from flask.ext.admin.contrib.sqla import ModelView
from flask.ext.login import login_user,current_user,logout_user
from flask import url_for,redirect
from forms import LoginForm
from wtforms import fields, widgets
class MyIndexView(AdminIndexView):
... |
3670ca00c295e42dc04beb52edf203cd24730a08 | 14a73c204821ab5e022e286ae0b93db5adfdde5c | /main/model.py | 932007379a5939c0ce2b83feaf6f1fa9d681d272 | [] | no_license | gideongrinberg/ViralCheck-YouTube-Algorithm-Predictor | 0c935944ee2ee26e1409fe0a77309ebdf7c81021 | c996c994e906abe5024f355325eea5971f74d7f9 | refs/heads/master | 2022-09-29T12:31:52.812900 | 2020-06-06T21:49:40 | 2020-06-06T21:49:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 368 | py | model.py | import tensorflow as tf
class Model():
def __init__(self):
self.model = self.load_model()
def load_model(self):
pass
def predict():
pass
def process_prediction():
pass
class Likes():
def __init__(self):
super.__init__()
def load_model(self):
# TODO
self.model = Model()
def predict(self):
return... |
d059eca5dc063ac59a3f623334b58f884c406f3f | adbcfc92d71e9be39ccef49b3aee0d06cdcb0af1 | /config_reader.py | 83d32846fa799e837e560887be93b18ab1eac1a8 | [] | no_license | linxaddict/mpkscraper | 67e5cf5806974d4fe78f1c892f12870008951a91 | a3b48a16f5db448692751c7de1f443dc3b0b30e7 | refs/heads/master | 2020-06-15T03:33:19.935314 | 2016-12-17T21:07:20 | 2016-12-17T21:07:20 | 75,334,083 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 782 | py | config_reader.py | import json
__author__ = 'Marcin Przepiórkowski'
__email__ = 'mprzepiorkowski@gmail.com'
class ScraperConfig:
def __init__(self, bus_lines: [str], tram_lines: [str]):
self._bus_lines = bus_lines
self._tram_lines = tram_lines
@property
def bus_lines(self) -> [str]:
return self._bu... |
113b1d537fbc71cda54ab73e2a8110985069bb2d | 811c4ef59e6f83566007dbd4070f02bd85307118 | /Ass3/altro.py | 5f527a30d8dda2e5629c70d9e249f37e63c40451 | [] | no_license | JorgeAndd/CIS_2750_Project | 830d2f14550f9bea9d33ade27250d3e9df59e7cd | f52a2facdf7976b67ca36160553e22bcf3fef4a3 | refs/heads/master | 2020-06-16T08:47:30.685572 | 2015-03-03T19:21:42 | 2015-03-03T19:21:42 | 75,120,589 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,979 | py | altro.py | ###############################
# altro.py -- GUI on Python tkinter
# Last updated: 7-Nov-14, Version 1
#
# Jorge Luiz Andrade
# #0906139
###############################
import os
import tempfile
from curses.ascii import ispunct
from subprocess import *
import Mx
from tkinter import *
from tkinter import ttk
import ... |
58d069f6700149793c3446bdd4677f08eaf301ee | 54349a1359a0ef30976687cf057cc7849ba77183 | /src/openbiolink/graph_creation/graph_writer/pickle_writer.py | bfc48900df207bea57a4ddad9eeecadbda9b07cd | [
"CC-BY-4.0",
"CC-BY-SA-3.0",
"CC-BY-NC-4.0",
"MIT",
"LicenseRef-scancode-public-domain",
"CC0-1.0"
] | permissive | OpenBioLink/OpenBioLink | 58cd6433b0785c59943022a5d15ccec5f3569c65 | 1fa4cf6215b075ab2aaa536153330a1653690b3b | refs/heads/master | 2023-01-03T19:18:33.670113 | 2023-01-02T14:00:00 | 2023-01-02T14:00:00 | 199,718,903 | 132 | 26 | MIT | 2022-12-20T17:12:56 | 2019-07-30T20:00:01 | Python | UTF-8 | Python | false | false | 1,541 | py | pickle_writer.py | """A utility for outputting graphs as pickle files.
To test, run ``openbiolink generate --no-download --no-input --output-format pickle --qual hq``.
"""
import os
import pickle
from typing import Mapping
from openbiolink.edge import Edge
from openbiolink.graph_creation.graph_writer.base import GraphWriter
__all__ =... |
123d3906ce040a4daa5309eae555bad5509f805e | 89a5fd2677b4a2ccff85ebe70fc2228973d09d88 | /tao.py | 31f0a15b91bc4cef15425f2d736fab8fecc9c414 | [] | no_license | w1024k/personal | bad0e9415edd4449da7eb22afdb9987f5f13ed35 | 01bea5e829c2da2dfc2e8053d240041456bebdba | refs/heads/master | 2023-03-10T06:46:48.078452 | 2023-02-28T05:44:35 | 2023-02-28T05:44:35 | 97,214,306 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,353 | py | tao.py | # coding=utf-8
# http://rate.tmall.com/list_detail_rate.htm?itemId=41464129793&sellerId=1652490016¤tPage=1
import requests, re
from Tkinter import *
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import random
import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif']=['SimHei'] ... |
a4ecc578a163ee4657a2c9302f79f15c2e4e39de | 3f135274847781ecf43611eaf340b3197b3f847c | /leg.py | 6f771d954f7a62146d0b5c361469153b3a043c16 | [] | no_license | kevinmcaleer/lesson_12_learning_python_classes_and_oop | 09f232ccae39be42d0c855a2024b2bbfab6fecf3 | e3c7837481fefb4de51dad3d79264ffd4ba1b8ba | refs/heads/master | 2022-11-30T19:26:23.869523 | 2020-08-11T20:42:43 | 2020-08-11T20:42:43 | 286,295,238 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 290 | py | leg.py | class Leg():
__smelly = True
def bend_knee(self):
print("knee bent")
@property
def smelly(self):
return self.__smelly
@smelly.setter
def smelly(self,smell):
self.__smelly = smell
def is_smelly(self):
return self.__smelly |
a85a7ad6ffb2b9aa5f5326d11c75ddbee680fac4 | 08f7fa6513832b4d52c77b601ad2965d3162a6bc | /dfs.py | eb0d30e15c5257968a3dd1624ee3cee7e1aa7934 | [] | no_license | cindyep/othello | 0d3000fd164eccbd36e7db6cc607fd379e43019b | 22ebb6ae7baa33c96eca645b4f43014a301c7453 | refs/heads/main | 2023-03-27T03:35:02.854278 | 2021-03-22T00:19:22 | 2021-03-22T00:19:22 | 349,809,120 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,927 | py | dfs.py | import sys
import sucessor
import expande
from collections import deque
def busca_caminho(nodo_final, nodo_inicial):
pilha_acoes = deque() # iremos empilhar as acoes já que a estaremos com a ordem reversa a priori
v = nodo_final
while v != nodo_inicial:
pilha_acoes.append(v.acao)
v = v.pai
return pilha_acoes
... |
42d2d8717ec2c25a99302e8de3090d600f8e80ff | 5db0fab37c2b8a618d85d3b60fab9f806c416474 | /src/python/pants/backend/scala/goals/tailor_test.py | 13539bec2205e06994252103b0af1507dd6c0efa | [
"Apache-2.0"
] | permissive | pantsbuild/pants | 4988d1ac5474ec95f94ce2218aeb759401e4b011 | 98cbda8545f0d58c586ed2daa76fefd729d5e0d5 | refs/heads/main | 2023-09-05T03:44:17.646899 | 2023-09-01T19:52:09 | 2023-09-01T19:52:09 | 7,209,075 | 2,708 | 593 | Apache-2.0 | 2023-09-14T19:33:33 | 2012-12-17T17:39:04 | Python | UTF-8 | Python | false | false | 802 | py | tailor_test.py | # Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from pants.backend.scala.goals.tailor import classify_source_files
from pants.backend.scala.target_types import (
ScalaJunitTestsGeneratorTarget,
ScalaSourcesGeneratorTarget,
... |
b2fa6104f03dc76522a51f352101cef199ddc665 | ea47cf7e1a772b354ca59d5f046d6c581c623085 | /quizzprojet/quizzapp/migrations/0006_remove_question_titre.py | 35f80e7acf383bcb8bdf0aa10fe8d74b1c1246eb | [] | no_license | MJoshua25/projet_nan_quizz | 60e82939e78ffb594bcf391acb9aa8ab11c0c0df | 2afde662d2077d1253350e7029192926b3f44f0b | refs/heads/master | 2020-09-05T06:21:19.324927 | 2019-11-16T07:18:16 | 2019-11-16T07:18:16 | 220,010,090 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 330 | py | 0006_remove_question_titre.py | # Generated by Django 2.2.7 on 2019-11-15 23:43
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('quizzapp', '0005_auto_20191115_2339'),
]
operations = [
migrations.RemoveField(
model_name='question',
name='titre',
... |
07bd3c7cacbf8d0e39d06b21456258ad92cb2294 | 985daad670a0fe477dc1c5ed7eefcc59685e65c0 | /Restaurant-App-FS/order.py | db532618460ae11ccfc429c0a7a08aa5c2909cd7 | [] | no_license | QW999/VANAR | aeb61e1b3a8d559b0b0a7e3c76a2e21a256d784b | 3f7bb0e59c259c71bc7be7e51fbc7189cb0fb82e | refs/heads/main | 2023-03-05T10:54:27.092734 | 2021-02-21T15:37:56 | 2021-02-21T15:37:56 | 340,871,866 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,607 | py | order.py |
# module: order functionality
# HW2: complete this func
def process_option(food, option):
# print(food.keys())
food_name = list(food.keys())[option-1]
food_price = food[food_name]
print(food_price)
print("You have chosen: ", option, food_name, "!", " For unit price: ", food_price)
... |
37f610457e51599a29168accd95eaa6699c6f777 | 6768e44c6d0bfc2953545e7573b353912339a757 | /accounts/migrations/0012_auto_20201105_1633.py | da5f04b19a39b4c001c4996f5a250648ce381954 | [] | no_license | 1984-zen/forum | 75af8a14e0b832f1c494f3658da0d41c43e316f8 | aafd4ae8238167c01d1aed6591abc42c9e7f6a5f | refs/heads/master | 2023-06-06T09:26:48.486442 | 2021-06-21T00:46:51 | 2021-06-21T01:27:26 | 295,986,635 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 558 | py | 0012_auto_20201105_1633.py | # Generated by Django 2.2 on 2020-11-05 16:33
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0011_auto_20201104_0936'),
]
operations = [
migrations.AddField(
model_name='users',
name='isadmin',
... |
d786e89b9d478dcff3c541c89731247075d078c3 | ea046497d43c5107675f27a7e87c07a335df661d | /wineset.py | ab75391ca4b09ccea559e64a5894de654d0d671e | [] | no_license | christer19/WineLookup | 25a3692dfd1b4b461c8db2fb9955c6cc55cf9baa | 03a95bc3d5630411674f656b717cc9b3f2646174 | refs/heads/master | 2022-11-13T01:59:49.972895 | 2020-06-28T18:32:35 | 2020-06-28T18:32:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 85,614 | py | wineset.py | '''
@author: Ken Venner
@contact: ken@venerllc.com
@version: 1.13
Read in a file of wine names and create consistent wine descriptions
from these names.
'''
import kvutil
import kvcsv
import re
import sys
import shutil
# may comment out in the future
import pprint
pp = pprint.PrettyPrinte... |
c6cce2edafd7683af766b932d90ca170359e648a | 486caeb0ff54bf83c92c106fc1445e1a09576f2e | /sharedprint.py | 5af0c2674f84a1f942b6b904d68755355a2998ff | [
"ECL-2.0"
] | permissive | cca/libraries_scelc_catalog_export | ce98cadf2365da55d8c445ec598a47f7d4cf0a1a | 72834e8ca73184731ad19a1e48b5a740f97e3a1d | refs/heads/main | 2021-06-05T10:39:26.509676 | 2021-05-03T20:49:59 | 2021-05-03T20:49:59 | 129,943,275 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,425 | py | sharedprint.py | """Usage:
sharedprint.py INPUT [--output=out.mrc]
sharedprint.py INPUT [--csv=greenglass.csv]
Process Koha MARC export for SCELC Shared Print.
The two uses above either 1) create a subset of the MARC input that's limited to
circulating items only or 2) performs a comparison between what's in the catalog
and w... |
71ca05d425d38112b943fcf3b29c9080fa5f0d4b | 1d96db84225301d972f07cad95c2a13f4fbafa84 | /python/generate_distributions_to_explain_efficiency_correction/gen_dist.py | ab4335fdc7c60c1a8ab8657137ee845b177af352 | [] | no_license | mattbellis/matts-work-environment | 9eb9b25040dd8fb4a444819b01a80c2d5342b150 | 41988f3c310f497223445f16e2537e8d1a3f71bc | refs/heads/master | 2023-08-23T09:02:37.193619 | 2023-08-09T05:36:32 | 2023-08-09T05:36:32 | 32,194,439 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,918 | py | gen_dist.py | import lichen.lichen as lch
import matplotlib.pylab as plt
import numpy as np
import scipy.stats as stats
################################################################################
# Efficiency
################################################################################
def efficiency(x):
xeff = []
... |
bc8a82f2a0c03b2f29917d531c303511feb1747a | 91007797ecaafd94bc30b76be3bf45e26a187c95 | /rateme2.py | 351899e6276c2ea6b12cfac98a47ecdac2574674 | [] | no_license | wanshun123/rateme | 89a3c285760c31e788ebfb6f59ef9b95d23df12a | 968759ea5e5d0d55a573f4b783ba2333b3fd3565 | refs/heads/master | 2020-03-27T12:14:47.778763 | 2018-09-04T10:35:53 | 2018-09-04T10:35:53 | 146,534,911 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 17,114 | py | rateme2.py | '''
# /r/rateme
# scraper to view all submissions and scrape ONE image only - preferrably directly off page - then use face detection to only use submissions with exactly one face detected (plenty of data)
# in scraper, scrape all ratings (in a form like "n/10") and take the average (of course disregard scrapes with n... |
bfa2f8c8e1e0e3fdc6ae73be99c76b6207434e51 | 4a7f897b9b7585d158c84a0401fcb4443241c846 | /test.py | 88349dbf923c5d70a76f2d93a96776f8c1b8fd63 | [] | no_license | JustinLion83/BEGAN-1 | a81d40e443a279e3c07ce5a687a7d4253ac3d5ad | 446cdf110012eee1c1e3665aa33b92e00fe34118 | refs/heads/master | 2020-05-30T18:58:02.154397 | 2018-11-02T04:11:47 | 2018-11-02T04:11:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 275 | py | test.py | import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure()
ax1 = fig.add_subplot(1, 2, 1)
ax2 = fig.add_subplot(1, 2, 2)
data1 = np.random.rand(50)
data2 = np.random.rand(30)
ax1.plot(data1, 'k--', label='data1')
ax2.plot(data2, 'k-', label='data2')
fig.show() |
f220682e62b058fb862aa1801a84d593131a6051 | a873f3cd46a10ad879fc56d78e1f533d8bf486c0 | /spider/阶段11-爬虫开发/代码以及其他/04.selenium/code/7.qzone.py | 14df3878bccc6792bf606b91fc80fe4fe3f0d571 | [] | no_license | shenhaiyu0923/resful | d0301b39363e6b3d3659f62fa4a9b2532ebcd225 | 1e66cae7d68fa231794776953cc1a5e999bf36c6 | refs/heads/master | 2021-07-08T20:46:57.300298 | 2021-06-01T08:17:27 | 2021-06-01T08:17:27 | 244,308,016 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 476 | py | 7.qzone.py | #coding:utf-8
from selenium import webdriver
url = 'https://qzone.qq.com/'
driver = webdriver.Chrome()
driver.get(url)
el_frame = driver.find_element_by_xpath('//*[@id="login_frame"]')
# driver.switch_to.frame('login_frame')
driver.switch_to.frame(el_frame)
driver.find_element_by_id('switcher_plogin').click()
dr... |
72df0502586a133193085751dc3a5fb89cb57fe6 | f41a15a51446b4705336d86071b586061d37ebf0 | /article/migrations/0006_comment_user.py | 66063b77cdb97dc2f2fbd881e42604d6747caeb2 | [] | no_license | Zenny233/bbsForStudent | 3565e14ed4e9c32521a9a758c5db491ca42b1fb8 | 0805e0aa2266d734d43741fe8e2fd71cb88d15ab | refs/heads/master | 2022-10-07T22:53:20.462056 | 2022-09-27T02:56:12 | 2022-09-27T02:56:12 | 213,851,439 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 653 | py | 0006_comment_user.py | # Generated by Django 2.0.13 on 2019-10-28 09:20
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('article', '0005_auto_20... |
1d721de7f94023ffc0378a54165af8484eeef544 | 4bb1a23a62bf6dc83a107d4da8daefd9b383fc99 | /work/arc097_d.py | ce93b67b3cc335cb4605c41c95621d8a931aa430 | [] | no_license | takushi-m/atcoder-work | 0aeea397c85173318497e08cb849efd459a9f6b6 | f6769f0be9c085bde88129a1e9205fb817bb556a | refs/heads/master | 2021-09-24T16:52:58.752112 | 2021-09-11T14:17:10 | 2021-09-11T14:17:10 | 144,509,843 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 941 | py | arc097_d.py | # -*- coding: utf-8 -*-
class UnionFind():
def __init__(self, n):
self.par = [i for i in range(n)]
self.rank = [0 for _ in range(n)]
def find(self, x):
if self.par[x]==x:
return x
else:
self.par[x] = self.find(self.par[x])
return self.par[x]
... |
6380d69cefa5948bdec34ede31683b81a3585300 | 5ffdb373fd13e018bc13ef2da34e292a442463af | /accumulator-pattern.py | 3a05ff1415eaf7fbf4069a8c2eb7b369cbdc3204 | [] | no_license | king-kenneth/cs20-class-demos-fall2018 | 926ae303b9cb97430c1b8494aac2aff67ac0dc45 | 89075b64f85bfffb31fbde26a840db277b53530d | refs/heads/master | 2020-04-12T12:21:21.524306 | 2018-12-19T20:45:50 | 2018-12-19T20:45:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 618 | py | accumulator-pattern.py | def sum_to(ending_number):
"""Returns the sum of all integers from 1 to ending_number."""
running_total = 0
for counter in range(ending_number + 1):
running_total = running_total + counter
return running_total
def gauss_sum_to(ending_number):
"""Uses Gaussian formula to find a sum."""
... |
6e1cca2eeb885a0b31ecab0b0ede64a62e22e2b0 | 707b2d948152d52c2ab3d68d550c986739d8593c | /python/functions.py | fca46f0aa84d6eebb5df41ae647c83e7409b5414 | [] | no_license | Maro1306/ImageRecognition | 2732a4676616bc2f57af083604bc737291d0ac6f | 41f79bc071414e054a601f0c512b1d6dca3d41fc | refs/heads/master | 2021-06-11T07:57:29.403212 | 2017-02-02T17:09:52 | 2017-02-02T17:09:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,185 | py | functions.py | # coding: utf-8
import numpy as np
def sigmoid(x):
return 1 / (1 + np.exp(-x))
def approx_sigmoid(xs):
y = np.zeros_like(xs)
for i, x in enumerate(xs):
for j, x in enumerate(xs[i]):
if x < -6.0: y[i][j] = 0
elif (-6.0 <= x) and (x < -5.0): y[i][j] =... |
4ca510b37c3dae14da768ef5c9b9de4c790950a9 | 0cc4812e7c6ebda26c61db4437d4f1167e558411 | /sso/files/gui/sse/core/__init__.py | a9f92adbeaf47f42d41620d2996f17f9ab131004 | [] | no_license | nofxrok/headless | b30079f0e3772e6820aff348dd7b2de2445f3014 | 122a172caea82ef660e81a9dfc6377afd731f9cb | refs/heads/master | 2021-01-10T05:41:34.754657 | 2016-02-12T20:26:48 | 2016-02-12T20:26:48 | 43,715,900 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 53 | py | __init__.py | """
Module for core functionality for SSE HP
"""
|
3f082fcf42b8a352ff1ed13b1c6b1b13e0c36328 | ef76d0b5318fff31fc96ce5e404850897d0cfb4d | /滑动验证码/Geetest/trace.py | 216265261c9ae71c2d409487a76673a9dfca8f7a | [] | no_license | WeiEast/Lengyue-Vcode | d5968b7620ca26a3e7d6b7e3084b0906db2cc3f1 | 3fe9599dbde900df0d121f7219f2ceeeab67464d | refs/heads/master | 2020-04-29T01:42:15.634358 | 2018-11-02T08:16:17 | 2018-11-02T08:16:17 | 175,738,989 | 1 | 0 | null | 2019-03-15T03:03:56 | 2019-03-15T03:03:54 | JavaScript | UTF-8 | Python | false | false | 1,175 | py | trace.py | import random
def get_trace_fast(distance):
track = [[random.randint(19, 30), random.randint(20, 25), 0]]
rand_x = int(distance * random.randint(5, 8) / 10)
track.append([rand_x, random.randint(-2, 2), random.randint(300, 500)])
track.append([distance - rand_x, random.randint(-2, 2), random.randint(30... |
d53e39ead62342e074ef111cfb8994b14f27d10a | 8a6f95c30ef47b828f9548b2e4165eac907be16d | /tools/eval_tool.py | d7dd792055ed40a8065a8abb991e7fab3d766b44 | [] | no_license | waitwaitforget/swingpytorch | 80c486839c7248218201cf776b44b99da0aeb1ae | 9ddfef7becf17db589f0d8736972b2ababa18151 | refs/heads/master | 2020-05-31T22:19:03.667429 | 2019-06-08T13:47:14 | 2019-06-08T13:47:14 | 190,517,926 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,166 | py | eval_tool.py | import torch
def accuracy(y_pred, gt, topk=(1,)):
""" Measure accuracy for classification.
@Args:
y_pred: Tensor, predictions of the model
gt: ground truth labels
topk: tuple, specific top-k evaluation
Return:
tuple (tok1, (top-k)) accuracies
"""
maxk = max(topk)
... |
9c3fe0f0c70779b05a410aa14a2c04e98c9d2150 | 5df948746450b1aa27bd4fdd688f2b0acaaa37df | /boostnote/base.py | 5aa03607156ef8e619a064a905874c69c68e66c5 | [] | no_license | masa4u/pyboostnote | 82e64cfd282229e38e9710d102541bd3bb38fa8e | c60f0212bc9b274c8fd7328bf176ca80d358b614 | refs/heads/master | 2022-12-24T19:19:18.693583 | 2019-06-21T06:07:36 | 2019-06-21T06:07:36 | 124,506,162 | 2 | 2 | null | 2022-12-18T10:13:00 | 2018-03-09T07:44:33 | Python | UTF-8 | Python | false | false | 1,311 | py | base.py | # -*- coding: utf-8 -*-
from typing import List, Union
from boostnote.storage import Storage
from boostnote.note import NoteType
class Boostnote(object):
def __init__(self, paths: Union[List[str], str]):
if isinstance(paths, str):
paths = [paths]
self._storages = {}
name = 'De... |
04f8878f421a605c72029149859afbfa56cd92aa | 3f554de65e0e4e7b3f1ae89b19fe424716f4837a | /spi_calc.py | f38740e6f7a9ba0ffea4c2a506518ede1c0d9732 | [
"MIT"
] | permissive | joebradly/hubbard-lda3 | cffa5a546ef4aba6ec91f3977b62b00d52580f3b | 47c3257140da265cd9e74be1a8a04b45844cba48 | refs/heads/master | 2021-05-01T18:34:52.735089 | 2014-12-02T03:30:46 | 2014-12-02T03:30:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,954 | py | spi_calc.py |
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
import scubic
import lda
from colorChooser import rgb_to_hex, cmapCycle
def single_spi(**kwargs):
savedir = kwargs.pop('savedir', None)
numlist = kwargs.pop('numlist', [1.2e5, 1.3e5, 1.4e5, 1.5e5, 1.6e5] )
mulist = kwarg... |
286b87b9e46033c2a170dd2d8a157de60400b6aa | 449da7b08bb82654028967aa0fa8efce8b2b10d2 | /adapter/sites/open/blueking/component/apis/bk_paas.py | da08eaa2cef1ba4d17dbfd4209d8ee4f6febe531 | [] | no_license | sdgdsffdsfff/bk-dop | f1ae15f858f6236405e50e9453554026d2bcfd21 | 97cfac2ba94d67980d837f0b541caae70b68a595 | refs/heads/master | 2023-08-31T22:24:30.616269 | 2021-10-19T17:56:36 | 2021-10-19T17:56:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 418 | py | bk_paas.py | # -*- coding: utf-8 -*-
from ..base import ComponentAPI
class CollectionsBkPaas(object):
"""Collections of BK_PAAS APIS"""
def __init__(self, client):
self.client = client
self.get_app_info = ComponentAPI(
client=self.client,
method='GET',
path='/api/c/com... |
38b5e44c2105bbe76f39171adf714b9f1f607ce7 | c3be7bd20d193876bd73948aeca2e038ca75a9c3 | /bf/utils/mo_exporter.py | 0111385dd520959dbdb04108a3113c9f4b502db6 | [] | no_license | georgymironov/single_shot_detection | b4452a716b11c930d09b597e23af9440598230c3 | e8122971802b3e33c57f8e2f0ee1ee652e027bf9 | refs/heads/master | 2020-04-11T13:01:01.542632 | 2019-07-23T15:04:46 | 2019-07-23T15:04:46 | 161,800,395 | 10 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,323 | py | mo_exporter.py | import logging
import os
import tempfile
from bf.utils import onnx_exporter, mo_extensions
class _argv_wrapper(object):
def __init__(self, dict_):
self.__dict__ = dict_
def __getattr__(self, attr):
return None
def export(model, config, filename, folder=None, postprocess=None):
_, tmp = ... |
5da8dc61fd3eb4b4520af6e5846bb54c18e674b6 | f4f8c67ceea5423e4a174a0d1557616cc7908898 | /dvwacrawler/dvwacrawler/items.py | adf05ac2807ac04f04db390bb5e1315d9f3921fa | [] | no_license | DarthBandicoot/DVWA-Actual | 798c8bc33e523703ee5a07eb1f39642339c1c17c | 00ba9c0e5118c13c8ae69d5d1f5f14fe57df178d | refs/heads/master | 2022-11-06T08:40:27.789727 | 2019-08-27T12:52:21 | 2019-08-27T12:52:21 | 204,340,827 | 0 | 0 | null | 2022-11-04T19:37:11 | 2019-08-25T19:32:53 | Python | UTF-8 | Python | false | false | 336 | py | items.py | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://docs.scrapy.org/en/latest/topics/items.html
import scrapy
from scrapy import Field, Item
class DvwacrawlerItem(Item):
first_name = Field()
surname = Field()
database_name = Field()
database_ve... |
096e2599938023869acb469a08a7a6153230e34b | 88354a23cf7b08489ceb6ea02fd22272dc8ec91d | /Useful_function/Random_book.py | 5711122589548b61855e90bd32074ce8519b8096 | [] | no_license | Cartez55/projects_one | cf3872446d7a9c28c65b12725bee8a150a2b4b0e | cb618345cabc903a291f0b88c274b29862661ccc | refs/heads/master | 2023-06-24T07:59:18.164860 | 2021-07-27T07:53:51 | 2021-07-27T07:53:51 | 330,179,782 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,972 | py | Random_book.py | from random import choice
def random_phrase():
list_book = ["Мастер и Маргарита",
"Утиная охота",
"Соловьиный сад",
"Евгений Онегин",
"Преступление и наказание",
"Война и мир",
"Герой нашего времени",
... |
96b97477fb427583519d64eec52680f6803f4b0e | f045134733649a710abefc41a77c2ac89d0a8e40 | /samples/fib/fib_graph.py | c0c67775d76dfbcfb5e1381b865da35d474719a2 | [
"CC-BY-4.0",
"MIT"
] | permissive | dalance/python_zero | d7d4afc7b2631a6be663c3bc9930284b78d6c80d | ae68eb06e5a4ebe07ca7288441c5a00b24490262 | refs/heads/master | 2020-06-07T20:14:17.071806 | 2019-06-20T10:42:10 | 2019-06-20T10:42:10 | 193,085,955 | 0 | 0 | CC-BY-4.0 | 2019-06-21T11:22:10 | 2019-06-21T11:22:10 | null | UTF-8 | Python | false | false | 478 | py | fib_graph.py | from graphviz import Digraph
def fib(n, parent, nodes, g):
index = len(nodes)
nodes.append(index)
if n == 1:
g.node(str(index), str(n), color="red")
else:
g.node(str(index), str(n))
if parent is not None:
g.edge(str(index), str(parent))
if n in (0, 1):
return
... |
d5528e951aebc2cecc0666ac4c41dc60cb8427ae | 33b50b32a3d259195a701c9f7103f3c6d30b8518 | /修改了前端的项目/Shopping-Cart/DAO/SPU.py | 71230b6b43a7da44673d128f7b98c61f88d53d89 | [] | no_license | YouanZhang/Database-training | f72ed247ef7ee58794ffce84bef4110973395ddf | aa06976bfb5b4d581c055d5409c51338738b6c4a | refs/heads/master | 2022-12-24T23:40:16.913060 | 2020-07-05T04:19:21 | 2020-07-05T04:19:21 | 267,850,443 | 2 | 0 | null | 2020-10-13T22:57:09 | 2020-05-29T12:18:38 | CSS | UTF-8 | Python | false | false | 1,666 | py | SPU.py | from DAO.link_database import *
#添加SPU
def addSPU(name, desc, second_class_id):
conn = link_mysql()
cur = conn.cursor()
cur.execute('INSERT INTO SPU (SPU_ID, SPU_NAME, SPU_DESC, SECOND_CLASS_ID)\
VALUES (NULL, %s, %s, %s);',(name, desc, second_class_id))
conn.commit()
cur.close()
conn.clos... |
622e83ebf2b48b003c00eedc601d1ffd8b728b6e | eda2289dae8a186fc4283af918249e83c634a6b8 | /uuslug/tests/tests.py | 88ebfbe423c9839b4e66555ae173625d7912f63d | [
"MIT",
"BSD-3-Clause"
] | permissive | timgates42/django-uuslug | ce7edeea3a6e9321a6f23923da3f37fd0f36eafb | 73c2c2c34f33826043262cad18770959d131c3ba | refs/heads/master | 2023-03-16T02:08:20.856908 | 2022-02-01T14:57:31 | 2022-02-01T14:57:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,268 | py | tests.py | # -*- coding: utf-8 -*-
from django.test import TestCase
# http://pypi.python.org/pypi/django-tools/
# from django_tools.unittest_utils.print_sql import PrintQueries
from uuslug import slugify, uuslug
from uuslug.models import (CoolSlug, AnotherSlug, TruncatedSlug,
SmartTruncatedExactWordB... |
6acea552f1d81ae856d819e7e2103032123e7181 | dc1269373c442b8f23edf8b9f39a64e3dd42d511 | /bayes_by_backprop.py | aca9289097dc542d608556627285232a0144f470 | [] | no_license | amirunpri2018/bayes-by-backprop | 1bfab97cccfaee4cedf8513b00d27b864571d765 | 9281339a02784bd016180a9a262651614e493ef0 | refs/heads/master | 2020-04-08T09:38:29.367071 | 2018-09-12T19:36:49 | 2018-09-12T19:36:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,165 | py | bayes_by_backprop.py | import argparse
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
from torch.autograd import Variable
from torchvision import datasets, transforms
class BayesianParameter(nn.Module):
def __init__(self, shape, sigma_prior=1.0, ratio_prior=None, init... |
d99f9b280015d56f0c7f1cc68c83cc900ccd25d2 | cf0e21540165446d8a55416054929340ab671de2 | /axion_camb_wrappers/power_interpolation.py | 4303c5a3e4ed482866a4b6342b4b1cb297547aa4 | [] | no_license | LBJ-Wade/Axion-kSZ-source | 4fe2f60990b07ed65d1fd126288e79c8c404c209 | 04dda98fa763560bfbaf962c36b92f6522a44353 | refs/heads/master | 2023-08-28T19:51:04.583113 | 2021-10-07T16:26:50 | 2021-10-07T16:26:50 | 418,828,092 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,184 | py | power_interpolation.py | import numpy as np
from scipy.interpolate import interp1d as interpolate
class LinearPowerInterpolation(object):
def __init__(self, pk_vals_file, extrap_kmax=1e3, extrap_kmin=1e-5):
P_CAMB = np.loadtxt(pk_vals_file)
kmax = np.max(P_CAMB[:, 0])
kmin = np.min(P_CAMB[:, 0])
self.__lo... |
fca862e5a5af1d1cfb4fd28a78b9103a8538c737 | 732ded4cc747ea7ca7876c2a1b87b2017cfd33fe | /files_practise/write_binary_file.py | ba425f755f71c92499e1c72a45b5d3b6d15dcd50 | [] | no_license | subramanyamvegiterralogic/test-task | 80f09b03dfa3d1998bc37616423b74c82750e9ae | 10240f8f522c9231c4a1c8791d080e5dc4a129e5 | refs/heads/master | 2020-07-12T00:15:26.461655 | 2019-12-10T10:40:08 | 2019-12-10T10:40:08 | 204,672,821 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 661 | py | write_binary_file.py | import urllib.request, re
# f = urllib.request.urlopen('https://www.redbus.in/info/contactus')
# f = urllib.request.urlopen('https://www.terralogic.com/contact-us')
f = urllib.request.urlopen('https://www.apsrtconline.in/oprs-web/home/contactus.do')
data = f.read()
# data = str(f.read())
print(data)
print(type(data))
... |
cee91175b2d54fda0587e3bc7d68bef02bc9018e | ac838cc2cbaf20463dd7d7b96739cac89d896ba8 | /inventory-allocator/InventoryAllocator.py | 6ff3492df790a3d9aef65a831d6aab1c4d4cfea1 | [] | no_license | BenChapmanKish/recruiting-exercises | dde8ecd0d4af83c2e355f70de7757f891d1e79d1 | 9b88348c0d891c9a3ca757e0c7cb0ee3d6b7a793 | refs/heads/master | 2022-10-03T10:46:39.913935 | 2020-06-10T19:25:35 | 2020-06-10T19:25:35 | 268,918,148 | 0 | 1 | null | 2020-06-02T22:04:32 | 2020-06-02T22:04:32 | null | UTF-8 | Python | false | false | 3,991 | py | InventoryAllocator.py | #!/usr/bin/env python3
"""
Ben Chapman-Kish - June 2020
Deliverr recruiting exercise: inventory allocator
https://github.com/deliverr/recruiting-exercises/tree/master/inventory-allocator
"""
from collections import defaultdict
class InventoryAllocator():
"""
Inventory Allocator static class
Contains the ... |
3f60e2e02620deb6150f3b31b2e8df5d55074f1c | 7dc105487c3e53923f38b9deb9b6ea4a89c9ea9f | /abq_hysttest.py | f892a4cfc48cec940c54e2ff895d0d12e45d97e5 | [
"MIT"
] | permissive | HarshalSonar1/spa-design-tool | d15033d7f07e36b1742e74f9f07381d80aa77db3 | 84d250a02cc3f4af56770550c9f559feb524cb07 | refs/heads/main | 2023-03-15T17:35:52.521276 | 2021-02-23T00:51:46 | 2021-02-23T00:51:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,380 | py | abq_hysttest.py | # The MIT License (MIT)
#
# Copyright (c) 2015, EPFL Reconfigurable Robotics Laboratory,
# Philip Moseley, philip.moseley@gmail.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
... |
1d1eaa37136d12684f0709e8168e014d88e0b3ae | 5fb00fd4b736a491e68baa5206efa829639b377e | /level_23.py | 17c3523596aa55c2f4ce21c2ce54a335f1783a07 | [] | no_license | diegorodriguezv/pythonchallenge | a8d45b03a3e6e4496bfa176ba48f69655f4b1a07 | 8c0a6e364f144ea31c9d5deec154703a702b813f | refs/heads/master | 2021-08-19T08:33:25.606570 | 2017-11-25T14:13:52 | 2017-11-25T14:18:49 | 111,438,533 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 410 | py | level_23.py | # LEVEL 23
# www.pythonchallenge.com/pc/hex/bonus.html
import this
# ROT13
first = ord('a')
last = ord('z')
str1 = "".join([chr(x) for x in range(first, last + 1)])
str2 = "".join([chr(first + x + 13 - last - 1) if x + 13 > last else chr(x + 13) for x in range(first, last + 1)])
print(str1)
print(str2)
table = str.ma... |
f7d0fc31af32dfbf6e20aa580eaf32be72afdab8 | 31738f25e365067d0c2477dc99de3112517e9469 | /django_workdays/quarter/views.py | dc1217cb15e5433a354be19edb8f700ea1fe3312 | [] | no_license | rfloriano/django-workdays | 57c5a8eda1bfc9214a9e53d70b60c0e922e25776 | 33b0e294b654d9c419463f0fc162e1a36df04be9 | refs/heads/master | 2021-01-22T04:40:57.430365 | 2015-07-30T18:18:52 | 2015-07-30T18:18:52 | 32,201,286 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 685 | py | views.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
try:
import ujson as json
except ImportError:
import json
from django.views.generic import View
from django.http import HttpResponse
from .models import Quarter
class JSONResponseView(View):
def render_to_response(self, data, **kwargs):
return HttpRespon... |
4d2b0f4e7f944a61e36f63d7fb3f1876150dc8c3 | 2a58cda309b50c3816da08ca4510483937d5c2e2 | /Preprocessing/get_yf.py | cb9203de1de9789ea7cb136ddca49c3b3e080c6c | [] | no_license | DennisH3/CISC-CMPE-351-Adv-DA | 6905b538e7272ba9a37c00cb13fcea470c8a8d60 | 50dbf4b0a86f8d2d19772178f2239860ce93bc78 | refs/heads/main | 2023-08-01T13:48:16.188806 | 2023-07-15T06:27:40 | 2023-07-15T06:27:40 | 331,149,744 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 14,380 | py | get_yf.py | #!/usr/bin/env python
# coding: utf-8
# In[ ]:
# Imports
import pandas as pd
import numpy as np
import time
import sys
# For dates
import datetime as dt
from dateutil.relativedelta import relativedelta
# For financial data
import yahoo_fin
import yahoo_fin.stock_info as si
# import yahoo_fin.options as ops
# In[ ... |
30e98edf9eb2d806c8fa929929a00a9bed09c962 | b2c54fc989e839348019dd52027f643ce669f121 | /code/wine/preprocess.py | 3a7aa8c089e63551a32645062dccb7f280e82030 | [
"MIT"
] | permissive | shalinkpatel/Deep-Forest | 195385aaf14350fb38e29af2cda4b40a04c14863 | c53aac1f59049a5045d5749f3873962cff6ad595 | refs/heads/main | 2023-01-31T20:14:49.073132 | 2020-12-08T23:36:58 | 2020-12-08T23:36:58 | 311,707,802 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,020 | py | preprocess.py | import numpy as np
from sklearn import datasets
import torch as th
def get_data(pct_train):
"""
:param pct_train: what percentage of the data should be used to train on
:return: as numpy arrays: train_data, train_labels, test_data, test_labels
"""
data_dict = datasets.load_wine()
data = np.arr... |
9861ce98eadcc2adf9c1c0dec36558508e134deb | 857644da13131a02866ddcf7e9e465169e08373f | /sync_service/init_companies.py | 73096879006ec1f82f65527704080516f8fb2494 | [] | no_license | tonickkozlov/twitter-company-rating-backend | 8d53842821e5dd3682970c76e93af5b183571b91 | 08ab53d77645713a14364aaa3fe12539b21d050b | refs/heads/master | 2020-05-20T18:00:27.840414 | 2017-03-29T08:16:26 | 2017-03-29T08:16:26 | 84,498,992 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 673 | py | init_companies.py | ''' This script gets a list of companies from either stdin or as a parameter, and will go through
the list while searching for company accounts on Twitter and writing them into the db '''
import fileinput
import redis
from lib.api import api
from lib import twitter
from lib import db
def add_company(db_instance... |
3ffcce2cf423ad029f74767231c5bfd3494042f9 | 4e0ff785b993b6bae70745434e61f27ca82e88f0 | /99-Recover-Binary-Search-Tree/solution.py | 39ce51c05334ab4a9884c78e05d4960920d89547 | [] | no_license | NobodyWHU/Leetcode | 2ee557dd77c65c5fa8ca938efb6de3793b4de261 | d284fa3daab02531e5300867463b293d44737e32 | refs/heads/master | 2021-01-23T14:05:28.161062 | 2016-09-23T11:51:51 | 2016-09-23T11:51:51 | 58,898,114 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 617 | py | solution.py | # Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def inorder(self, root, list, listp):
if root:
self.inorder(root.left, list, listp)
list.... |
b13b220b1de83da78a39dfcc58840156a492bdde | 7d982a3c696fe2604eb255ea9aaab86410971d3b | /marvelpedia/marvelapp01/marvelApiRequests.py | 7b05e06c8eb28c1024b1111b0090fb251c50e480 | [] | no_license | dmoreira317/marvel_site | 65c127ecec806c25faf4f3fd1de73ec550628c54 | 30fd7b7c255dc8ba24940680489caf6aceccaf5e | refs/heads/main | 2023-05-31T09:49:35.933944 | 2021-06-08T18:22:58 | 2021-06-08T18:22:58 | 365,383,082 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 857 | py | marvelApiRequests.py | import sys
import requests
import os
import time
import hashlib
from dotenv import load_dotenv
from django import template
#This isn't linked to anything as of now
# Request to Marvel's dev site
def API_request(url):
# Loading keys
load_dotenv()
TIME_STAMP = time.time()
API_PUBLIC = os.getenv('API_PU... |
292218dd3356173f75163a6c2155e48ff743f1d7 | 8fbe9c91c23f213f6a8f59216f986a375ad8cdcb | /artifacts/migrations/0018_auto_20180111_2146.py | 9219e1e8a9e97973b2b2b140b986bbdef0ae60c7 | [] | no_license | yaniv14/BHDigitalCollection | 86c21fbda90894a3d23f6a3ebc91205f6eaa3b6d | f4c0cf4f518f2d707fe119749abdecd76bde234c | refs/heads/master | 2021-09-13T10:55:35.987125 | 2018-04-28T19:10:02 | 2018-04-28T19:10:02 | 112,206,222 | 0 | 0 | null | 2018-03-16T08:31:11 | 2017-11-27T14:27:14 | JavaScript | UTF-8 | Python | false | false | 819 | py | 0018_auto_20180111_2146.py | # Generated by Django 2.0 on 2018-01-11 19:46
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('artifacts', '0017_auto_20180107_1021'),
]
operations = [
migrations.RemoveField(
model_name='artifact',
name='displaye... |
5943c09c630ca3fdb4b7827de60022d3b51a511b | ae48c2a1fa0c4776ec2cc79281cd3ebb9ade0c4d | /docs/solutions/DMOJ/cco07p2.py | 95e26f75141c0db9f88fe362af21c0cea6b276b4 | [] | no_license | shunr/cbcs-docs | c9cac20de9624fcfaed7a753a28c91993909d830 | 42b065fa6f8d80c50ae9d724d8d777b2a41df7d6 | refs/heads/master | 2021-01-23T00:56:44.540801 | 2017-09-23T01:48:32 | 2017-09-23T01:48:32 | 92,857,947 | 1 | 2 | null | 2017-09-23T01:48:33 | 2017-05-30T17:19:43 | HTML | UTF-8 | Python | false | false | 292 | py | cco07p2.py | import sys
def input():
return sys.stdin.readline().strip()
n = int(input())
succ = set()
for i in range(n):
d = (input().split())
d.sort()
if tuple(d) in succ:
print("Twin snowflakes found.")
sys.exit()
else:
succ.add(tuple(d))
print("No two snowflakes are alike.") |
70748be98325288d732444e15615d7a3b14824fe | 6fc3aad11c574940b69481a2987cee5f151393cd | /set7_6.py | 300865eafe2b1299705d9b7686ce892cf41eed2b | [] | no_license | paramesh33/codekata | d1e1d91ac7c83ce68ac6e6a82c9627824b83de56 | 7ca8b0e8315fed2a2b052d0c1a41b05145e0ecb8 | refs/heads/master | 2020-05-31T22:29:01.359063 | 2019-06-12T09:12:05 | 2019-06-12T09:12:05 | 190,520,947 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 113 | py | set7_6.py | a=int(input())
d=0
for x in range(2,a//2):
if a%x==0:
d=1
if d==0:
print('yes')
else:print('no')
|
3c91fff2c6faec5324366d36c8c8383724cd3e35 | f6e7c42800a3c3cb427faa3eeeb34a74de42cc94 | /yunibot/plugins/ffxiv/__init__.py | 619945d2a71c087958b73a71a1efc89c431a5c43 | [
"BSD-3-Clause"
] | permissive | algobot76/yunibot | 43d912c49800ec6c7f726645df227b27cff4d68d | e3bc5b4ddc6f38d185e0e67b7f846ed4c1a56ef4 | refs/heads/master | 2023-02-13T13:24:09.293980 | 2021-01-09T19:54:16 | 2021-01-09T19:54:16 | 324,093,279 | 0 | 0 | BSD-3-Clause | 2021-01-09T19:54:17 | 2020-12-24T07:19:46 | Python | UTF-8 | Python | false | false | 691 | py | __init__.py | import random
from nonebot.adapters import Bot, Event
from nonebot.adapters.cqhttp.event import GroupMessageEvent
from nonebot.plugin import on_message
from nonebot.typing import T_State
async def is_jumbo_cactpot(bot: Bot, event: Event, state: T_State) -> bool:
msg = str(event.get_message()).strip()
return ... |
f9c20b2a86fea6f798a7036b85eb58cb527f4f68 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2603/60724/288123.py | afaac41f31b4197ee9f92c95ec17c4f0a9b808a5 | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 284 | py | 288123.py | line=input()
line=line[1:len(line)-1]
nums=line.split(",")
k=int(input())
distance=[]
for i in range(len(nums)):
nums[i]=int(nums[i])
for i in range(len(nums)-1):
for j in range(i+1,len(nums)):
distance.append(abs(nums[i]-nums[j]))
distance.sort()
print(distance[k-1]) |
d8a34dbf38655b732e551fddf8510169bc812e0f | 7b41f07922c4e8c50d10b85ac29610a0f94409d9 | /Lesson2Strings.py | 800634e15814ff6830f0e656f05c711b11542672 | [] | no_license | b0dah/Python | 7400929396216593c09ebcd34bebbaa1944c45e0 | fb191c42071f2dd375647bb338646cf31f15afc8 | refs/heads/master | 2021-01-04T07:52:31.381937 | 2020-12-25T21:47:44 | 2020-12-25T21:47:44 | 240,454,176 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,195 | py | Lesson2Strings.py | #import string
#sourceString = input("Enter the string")
#filteredString = '';
#
#for symbol in sourceString:
# if !symbol.isalpha():
# fil
#
#
#Look and say sequence
#1 11 21 1211 111221 312211 13112221
seq = ['1']
numberOfNodes = int(input("I wanna get ?th\n"))
for ith in range(1, numberOfNodes, 1):
previous... |
a70139ebbbc0cd6f48a593da868ad38721650da0 | c5771317baab73f21ceaed91e6d581026f846f4b | /qga_test.py | c3c6d4db80fee5b7ab62df4df7c1faa3d171da14 | [] | no_license | kalott/qga-framework | c309fc7b5b672c3428b12d63e26996b53e78c13e | d233ed114b67834bb43e7f38ebf04343e19b83fd | refs/heads/master | 2023-02-24T01:51:08.245172 | 2021-01-30T04:13:22 | 2021-01-30T04:13:22 | 310,010,252 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 759 | py | qga_test.py | import qga_framework, qga_gui
# Function Maximaization Problem
def fitness_func(self: qga_framework.Chromosome):
return 2 * self.genes[0] ** 2 + self.genes[1] / self.genes[2] - 57
genes_limits = [[-500, +100], [-500, 500], [-12.5, 20]]
qga_framework.run_sim(fit_func = fitness_func, genes_limits = genes_li... |
55e4053f6f931711e5cf3914011e7423c221204a | b247bbcd03794dd5888a5d5b2c6d808977defe1b | /lgbm_examples/components/integrated-transformlib-lightGBM-infer/infer.py | a52b2f4725c0c0e7e5014d53de7c0774cd03111f | [] | no_license | chjinche/hello-aml-modules | da63978769037af2eeb004a4e32144f5235f30de | 263a45dabba17151e0259992641ece65477fe31d | refs/heads/master | 2023-07-15T11:53:49.886435 | 2021-09-01T06:09:27 | 2021-09-01T06:09:27 | 274,553,363 | 0 | 0 | null | 2020-06-24T02:13:29 | 2020-06-24T02:13:28 | null | UTF-8 | Python | false | false | 2,735 | py | infer.py | import argparse
import logging
import lightgbm as lgb
import numpy as np
import os
import json
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument(
'--infer-data-path',
help='The file path for the inference data.',
)
parser.add_argument(
'--model-p... |
f2ad3a706a724a2ca7d855715ecbcf7010d9d7f2 | 2203cd98c0c998daa9379e2127aaa7960f839eee | /streamlit/parsingpdf.py | 18dc2c28f764a5a59519847e3340b78e8093b59f | [] | no_license | monrodcar/ParsingPDF | 94778b3cd514ce2b70ae0d2a7e05bf286850db61 | 0feff2861127b4de54a4b3e18cb6f57e960588d7 | refs/heads/main | 2023-03-03T20:36:10.742201 | 2021-02-01T11:36:55 | 2021-02-01T11:36:55 | 334,928,384 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,135 | py | parsingpdf.py | import spacy
import numpy as np
import pandas as pd
import streamlit as st
import os
from neo4j import GraphDatabase
from tika import parser
from spacy.matcher import PhraseMatcher
from collections import Counter
from pandas.io.formats.style import Styler
# ------------------------------------------------------------... |
48fab5152fef84955a7001c527d973a1163bc851 | 9c2de20c3b1c88ab18324bccafe3948f8a6bf8d2 | /PycharmPorjects/mail/new_file.py | d40b8bde0c8cd80ed189b2b09ca4e2925ea226be | [] | no_license | panluluy/project-name | 4d30f705ed4e1113cb4d2ee4e0cc93757d3be015 | 6604e029215fc0b4ab7520b2793b3e82d1f26d50 | refs/heads/master | 2021-08-23T04:28:43.881781 | 2017-12-03T08:05:45 | 2017-12-03T08:05:45 | 112,909,785 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 307 | py | new_file.py | #coding=utf-8
import os
#定义文件目录
result_dir = '../report'
lists = os.listdir(result_dir)
#重新按时间对目录下的文件进行排序
lists.sort(key=lambda fn:os.path.getmtime(result_dir+"\\"+fn))
print u'最新的文件为:'+lists[-1]
file = os.path.join(result_dir,lists[-1])
print file |
7f0b83a5d179c4d00ca425d9af95129afbb9d254 | 27a4b70860fbc74b3cd8ba11e2f5a6975183e4aa | /src/anki/importing/apkg.py | afdadff940e6f980c33b6e24ad1301979a227aa1 | [] | no_license | DrLulz/alfred-anki | b8255f06e92284eda8340cb50800e537448adcf5 | eda64243ae9c810115f8c675c9b5690f702efdd2 | refs/heads/master | 2021-01-20T20:56:40.400646 | 2015-11-15T13:08:46 | 2015-11-15T13:08:46 | 34,692,800 | 22 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,417 | py | apkg.py | # -*- coding: utf-8 -*-
# Copyright: Damien Elmes <anki@ichi2.net>
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import zipfile, os
import unicodedata
from anki.utils import tmpfile, json
from anki.importing.anki2 import Anki2Importer
class AnkiPackageImporter(Anki2Importer):
def... |
f02cdc3b8987b2111db84ab2621651207671bd4d | 1d2bbeb3fb14fbb634889e2c319fcc41edfd238f | /time code.py | b95e8b90e5a958c840bc2d972c2a10bb90566eb0 | [] | no_license | Iamsmart123/Wesley-PythonandMinecraft | 6b787790c9084cdcb525ac14a99f05bfb8ebe743 | 9dbabedd882171af67e37020a22402e51ce337ee | refs/heads/master | 2023-06-02T20:38:04.396566 | 2021-06-26T06:16:20 | 2021-06-26T06:16:20 | 374,041,680 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 151 | py | time code.py | from mcpi.minecraft import Minecraft as mcs
mc = mcs.create()
from time import sleep
while True:
mc.executeCommand("time add 50")
sleep(0.1)
|
01c24b8e16040aed4054a616ca40d84095e05919 | cd2313ee0f063190e2b914c138c936e15e65ac5e | /keepalived_vip.py | b9c7d951d3bc924f363008d6c19c8ea80eb4a3a4 | [] | no_license | lianghx7123/monitor-keepalived-use-zabbix | ee4553e01b579392cbf0e8324c4f764456d70e46 | 551bfe3b45b7495c0fb5679b60f3b49ddfc73197 | refs/heads/master | 2021-01-10T08:44:06.478597 | 2016-03-16T08:27:40 | 2016-03-16T08:27:40 | 53,997,764 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 827 | py | keepalived_vip.py | #!/usr/bin/env python
#coding=utf-8
#date 2016-03-11
#auth :lianghx
import os,commands,sys,time
import json
keepalived_conf_file='/etc/keepalived/keepalived.conf'
if not os.path.exists(keepalived_conf_file):
sys.exit(4)
status,vips=commands.getstatusoutput('''grep '192.168.' %s|awk '{print $1}' ''' %keepalived_con... |
e77ce04dbab70ec02cb329380fa70231819ad843 | f7820f347356ec97d54b4dc81fd4b133371fe364 | /tests/handler.py | 3b4ef50fd64de64b2d202674442ece0c6d8d9e0c | [] | no_license | geospatial-jeff/cognition-pipeline | a029c8009dbceb5605bad5cf0dd418b7091c2235 | 7343e7d18e01a3ac2a1646012e4e67f9d1698bec | refs/heads/master | 2022-12-14T15:46:38.086800 | 2019-01-06T22:36:31 | 2019-01-06T22:36:31 | 161,524,087 | 4 | 0 | null | 2022-12-08T01:31:18 | 2018-12-12T17:43:08 | Python | UTF-8 | Python | false | false | 3,582 | py | handler.py | import json
from pipeline import Pipeline, events, resources
class SNSTopicTest(resources.SNSTopic):
def __init__(self):
super().__init__()
class SQSQueueTest(resources.SQSQueue):
def __init__(self):
super().__init__()
class SQSQueueTest2(resources.SQSQueue):
def __init__(self):
... |
95769ecc756cf202ca8a91e10e0a40ff16b44306 | d0a088d61e2aeadd9042aac8c154d52515240357 | /modules/system.py | 3c58ca8e36e52df58a32405a4d5384fbcf84a108 | [] | no_license | TetVoid/voise_asistent | ad6ee811ef7d1ff5b01db1bad65bbbea93c6a37e | be49687de1df1a1ae6101b2044d82caedb54b600 | refs/heads/master | 2023-03-24T05:12:27.984709 | 2021-03-26T18:57:47 | 2021-03-26T18:57:47 | 351,883,742 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,101 | py | system.py | from tkinter import Tk
import win32clipboard
import os
import pyautogui as pyautogui
from semanic_memory import Node
from semanic_memory import Action
class Delete_node_action(Action):
def __init__(self, node):
self.subject_node = node
self.mode = 0
def run(self, params=None):
if len... |
f811c12af6b4f59fbb4f63ea4b0447bac7e7edfa | e7397a7e45649ceeefa45ab3b50492620bec968a | /code/boruvska.py | 5496866037639d51c56d8ca7becd8211851f5576 | [] | no_license | ysfalh/MST-clustering | fc3e3eb0781b6e03c87c9488c4d5379d1fa8f9c3 | e72ad2b99e9b4753631f8a1afb417d214be0bcf9 | refs/heads/master | 2022-12-29T07:14:27.894883 | 2020-10-02T13:50:15 | 2020-10-02T13:50:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,015 | py | boruvska.py | from unionfind import *
from graph import Graph
import time
def boruvska(in_graph):
parent = []; rank = [];
g = Graph(in_graph)
mst = {key:{} for key in in_graph}
# An array to store index of the cheapest edge of component
cheapest =[]
# Initially there are V different trees (components)
numTrees = g.V
... |
2e8a943a4558598b1810227cb7003387dee8ea6a | 81cc28255f427c71196a2a259d455f1e9b409ddf | /btree_final.py | 18c7857c7dac4ece156f7ca69cfa5935e718c253 | [] | no_license | GitAudaHere/CreateTask | 511a7aeee52ef78cb2f216745c6d537fed6d9716 | 39074160143e7d4352ae7e3164b85f94e160aeb3 | refs/heads/master | 2021-04-15T09:36:32.209057 | 2018-04-28T01:29:14 | 2018-04-28T01:29:14 | 126,755,697 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,931 | py | btree_final.py | class BinaryNode(object):
"""
Has an integer value and a left and right node.
"""
def __init__(self, value):
"""
Initializes with an integer value and left and right nodes
set to None.
"""
self.value = value
self.left = None
self.right =... |
bf76e2856b70505c8872d7f18b105285605a0c75 | 0fe16bca943809997a5492f5b9c8ed8383c33c69 | /scripts/check_pinned_requirements.py | 6d05c0e7bdc9e4dae59a38df98accb964396b99d | [] | no_license | kaustav1996/pi | 557d6301f9542544602e95d79473cf000cfd54b0 | 1ae8ad2dde0f27a74c788f517a31216beb628de2 | refs/heads/master | 2023-06-26T11:44:05.038638 | 2021-07-25T07:25:16 | 2021-07-25T07:25:16 | 389,270,603 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 498 | py | check_pinned_requirements.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
with open(sys.argv[1]) as reqfile:
for line in reqfile.readlines():
# Ignore blank lines and comments
if line.startswith("#") or not line.strip():
continue
# Ensure all dependencies are pinned
if len([part for pa... |
3d45fd7dcb3b382efaefe2797ebeb33216a840fa | 220a50cf3e0b37c2f62b4ae3a7de93e093f78bf1 | /mainapp/forms.py | 2dcbcbe0a4af13ac16d85700f5b325ac88b54732 | [] | no_license | sensactive/resizerImages | 54889f749e6b75c362fdf5e884833255843f059a | 6cdbe6041434bc09a57e894c177ff0d82f211c1e | refs/heads/master | 2022-12-10T22:57:05.475304 | 2019-02-27T18:10:17 | 2019-02-27T18:10:17 | 172,761,721 | 0 | 0 | null | 2022-12-08T01:38:35 | 2019-02-26T17:54:48 | Python | UTF-8 | Python | false | false | 1,285 | py | forms.py | from django import forms
from .models import Picture
class PictureUploadForm(forms.ModelForm):
class Meta:
model = Picture
exclude = ()
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
for field_name, field in self.fields.items():
field.widge... |
d84641ce2854d4af26cd46abbe9557d6006cfc2e | 0c91ef9190865dc7de98b0df8ada69ec75835192 | /testcases/BrowserTest.py | c08a4a236f42bc0ea79d1d901b02594a24c0e1e1 | [] | no_license | DudyShavit/pythonGridProject | 054b871cdaecb88bc9f8c94507d1a1735e99c004 | e68826c16831c1faae162951e2b9af79e4d6314d | refs/heads/master | 2023-07-27T16:07:44.153622 | 2021-09-14T06:23:09 | 2021-09-14T06:23:09 | 406,249,437 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 909 | py | BrowserTest.py | import time
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from webdriver_manager.firefox import GeckoDriverManager
from webdriver_manager.microsoft import EdgeChromiumDriverManager
import os
# caps = {'browserName': os.getenv('BROWSER', 'firefox')}
# browser = webdriver.Remo... |
bad719d968b4e358f863b7ef13bc12127f726806 | 0e4c97e84e5aec6ac01e2134f11b75ba559c1a69 | /tests/constants.py | 4db79585f4077983c7ec83b339937820398054c5 | [
"MIT"
] | permissive | bio2bel/flybase | 80c9a7730d78ec38283597babf41f4351c594cf6 | f57c20e5f7a0e811e104f55ea3d2e6c8d9a5589c | refs/heads/master | 2021-03-22T00:59:55.506767 | 2019-11-13T14:06:46 | 2019-11-13T14:06:46 | 100,053,858 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 253 | py | constants.py | # -*- coding: utf-8 -*-
"""Testing constants for Bio2BEL FlyBase."""
import logging
import os
log = logging.getLogger(__name__)
dir_path = os.path.dirname(os.path.realpath(__file__))
TEST_FILE = os.path.join(dir_path, 'test_gene_map_table.tsv.gz')
|
0ff6e22f8704a0c6c0ffff3c53761b9d3a531b6d | b64a57186b1e698dd6b2be58df3e69a927e26e19 | /Tubes_GUI/main.py | 01fffac76e38b6dbcf0bad2eb226a16ef1680749 | [] | no_license | ditobr/TugasBesar_GUI | 1467ad1fbccf5685ac6ad57ee8f93c2d822cbb91 | 7531b8f5502d19d882bc090653d8ae03fe2b58ea | refs/heads/main | 2023-06-24T17:02:41.811550 | 2021-07-30T03:28:16 | 2021-07-30T03:28:16 | 390,903,273 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,110 | py | main.py | # This is a sample Python script.
# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
from PyQt5 import QtWidgets, uic
import sys
import pymysql
import mysql.connector
class Ui_Login(QtWidgets.QDi... |
5ff7a3843314dfd3914c5e96164385d61fbe7fa5 | f85389287e7c6032daf3bc60105e7420f598aacc | /octoprint_piled/templates/strip.py | a56c9847f0605a701f01bfc41798f47ea313b738 | [] | no_license | Bill-Sullivan/OctoPrint-PiLed | 06a143e3aa94a4c0a5d6ff75c17619daf14e1ec3 | daedf9b30042e3cf6f57c7822d9017bcba288a08 | refs/heads/master | 2020-04-16T16:07:09.910059 | 2018-01-23T06:55:34 | 2018-01-23T06:55:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,150 | py | strip.py | import sys
import time
import math
from neopixel import *
count = int(sys.argv[1])
percent = int(sys.argv[2])
# LED strip configuration:
LED_COUNT = count # Number of LED pixels.
LED_PIN = 18 # GPIO pin connected to the pixels (must support PWM!).
LED_FREQ_HZ = 800000 # LED signal frequency in he... |
07d574060ded0d98734b4f184dcba7377b3a5480 | 0cae7f0f000cbcf2bef5fb2bea854d87a047e53b | /t2.py | f77fc63da6fea2358a6b4ae3e96d15017f52d142 | [] | no_license | swethasureshs/DETECTION-OF-MALICIOUS-WEBLINKS | 5c5e93d6159cdfc2eafebea96dae01b7005b0f7f | 4ae572618a2561215e8de9b9a71f55478932250c | refs/heads/main | 2023-05-20T22:30:46.382102 | 2021-06-13T15:23:18 | 2021-06-13T15:23:18 | 376,570,005 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 471 | py | t2.py | from datetime import datetime
import whois
def age_domain(url):
try:
w = whois.whois(url)
if(w):
for l in w.expiration_date:
d1 = datetime.date(l)
print(d1)
for l1 in w.creation_date:
d2 = datetime.date(l1)
print(d2)
diff = (d1 - ... |
a4db12fee72989f983c1069839dc0a5ede4561a3 | a5cad190f8aa98049308cc94aedad6060536b61c | /app/praise/models.py | 0cb429d5429d206fb411d097452120a4e4e8df68 | [] | no_license | stnoah1/ionicapp | f6dadc918be5dcbf63a8d37acffa6e15b7a96782 | 350655cd3d153cf07a53e2895739abaa724ef429 | refs/heads/master | 2022-12-13T06:55:09.203864 | 2019-04-01T01:09:54 | 2019-04-01T01:09:54 | 178,761,073 | 0 | 0 | null | 2022-12-08T17:22:44 | 2019-04-01T01:05:01 | TypeScript | UTF-8 | Python | false | false | 780 | py | models.py | from django.contrib.postgres.fields import JSONField
from django.db import models
from service.models import TimeStampedModel
class Praise(TimeStampedModel):
class Meta:
verbose_name = '칭찬'
verbose_name_plural = verbose_name
content = models.CharField(verbose_name='내용', unique=True, max_leng... |
c70aa1a373530ac73553753e62d3989f5bc79287 | a97483bd9de20f1501c05cea7d812266a79ac24c | /includes/Licencer.py | 31f5c7bcf2a7f9a1407dcfe1e9f5229a04dee137 | [] | no_license | gaccardo/canchas | 328672143315859ed4ad998754027374d224ec96 | 3a764c75cdb57d2aad35472ca534ef2ad488aefc | refs/heads/master | 2021-01-01T17:31:33.905657 | 2013-05-17T16:04:03 | 2013-05-17T16:04:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,130 | py | Licencer.py | #!/usr/bin/env python
import urllib
class LicenseChecker( object ):
def __init__( self ):
self.url = 'http://logon.guidoaccardo.com.ar/'
self.count_offline = 15
def __countTimes( self ):
ff = open( 'times.ehead', 'r' )
bb = ff.read()
ff.close()
return int( bb )
... |
8680c033662a89ed6fc73e65ec544b93558c4208 | 1b028b4bbc61ce01c880f18b190a5b32c002e2fd | /__init__.py | e3dd6923f74f7cbcbbe4842c986c36fb3b627e7d | [] | no_license | jongwony/md2ppt | 91b7172eb799c80bbd9be71255a98261b6a7957e | a06d3c944f484340f47354e96c12a5cc7b8ac435 | refs/heads/master | 2020-05-20T08:48:28.802371 | 2019-05-19T17:48:11 | 2019-05-19T17:48:11 | 185,482,679 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 96 | py | __init__.py | from .feature import slide_show
def main(args=None):
if args:
slide_show(args[0])
|
56892e125934d5de937b92a08bd7707c12c70928 | e7f9602a1b9ec15274e14e78bd18aaef3f6b6cc5 | /LeetCodePractice/course_schedule_topological_sort.py | 5e49dadbd8f18442d08cfe22fee338736d0ede13 | [] | no_license | AishwaryaRK/Code | 00417a342adc280cfdae95f3cd507fe9927014fd | a8497e33bfe34ac431a42ac9ea6440f5a7da1aa6 | refs/heads/master | 2020-06-13T15:51:55.679242 | 2019-07-04T23:34:47 | 2019-07-04T23:34:47 | 75,363,279 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,109 | py | course_schedule_topological_sort.py | # 4, [[1,0],[2,0],[3,1],[3,2]]
# 3->1->0
# \ ^
# \ |
# \> 2
# 1,0,2,3
# stack 3
#
# 0 1 2 3
# 1,0
# stack 1
# 0
#
# def findOrder(numCourses, prerequisites):
# if len(prerequisites) == 0:
# order = []
# for i in range(0, numCourses):
# order.append(i)
# return or... |
603135cfb9e4e7f1fe0132611e263c7e0bd796ba | 2335f147eb45887c9340428fa9bd06b24fe4d077 | /partners_paper/create_annotation_notes.py | e4a4be0d13d6517b2a219412f87d0828e0694434 | [] | no_license | pateli18/healthcare_finance_notes | 38e031d3b42adec99a6ce087f79a92442ce98b73 | 677e6c97308813f5a63018f4ece56aafbc7c585f | refs/heads/master | 2020-04-04T14:16:55.573462 | 2019-05-24T18:05:49 | 2019-05-24T18:05:49 | 155,993,332 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,099 | py | create_annotation_notes.py | import pandas as pd
from notetagger import constants
def _get_text_snippet(full_note_text,
word_tags=constants.TAGS,
text_window_before=300,
text_window_after=300):
for word_tag in word_tags:
word_tag_index = full_note_text.lower().find(wo... |
76a6acf4499b2bacfd0002f500535881c492c6b8 | ae6042978489b559f538a57f9590091c3d4676f4 | /slayer/io/io.py | 01110987dc51e1d4e3911a105213d6d0d557da7a | [
"MIT"
] | permissive | ajduberstein/slayer | 3972d546714b4740829ecdeb7b0a63611bca55c1 | e4f2b6e0277ac38fe71ec99eaf3ee4769057b0ea | refs/heads/master | 2020-03-22T06:44:19.244709 | 2019-08-01T18:23:43 | 2019-08-01T18:23:43 | 139,654,368 | 2 | 0 | MIT | 2019-02-25T23:22:18 | 2018-07-04T01:40:04 | Python | UTF-8 | Python | false | false | 3,309 | py | io.py | from __future__ import print_function
import os
import os.path
import jinja2
import tempfile
import time
import webbrowser
from IPython.display import IFrame
TEMPLATES_PATH = os.path.join(os.path.dirname(__file__), '../templates/')
j2_env = jinja2.Environment(loader=jinja2.FileSystemLoader(TEMPLATES_PATH),
... |
d3485f10b560477b2651a46541f142cd6e33da20 | b62fa1922e854e6dea48ddb959bfdcac007dd28c | /external/__init__.py | e58059f80b58638e0c381941544bdcda114711d8 | [
"MIT"
] | permissive | leptoid/anime-dl | 18276d402110568d8a4bf51b89e8208f2348d459 | d72825c64ea06e1800e32b16dc95a8f3aee41c9a | refs/heads/master | 2020-03-13T09:26:39.431909 | 2020-01-30T00:14:48 | 2020-01-30T00:14:48 | 131,064,567 | 2 | 0 | MIT | 2018-04-25T21:19:40 | 2018-04-25T21:14:57 | Python | UTF-8 | Python | false | false | 83 | py | __init__.py | from . import aes
from . import compat
from . import socks
from . import utils
|
84b723fef289bfe0a0fdce42de470e0197c2845e | 1b66bdc3f8dc44464edcdbe59966e3a6c6009b20 | /ex7.pg38 sir de caractere.py | 4187b23cdbca86d4584dca6fc60f4a6e223f85d3 | [] | no_license | Artiom12341/ex8.pg38-sir-de-caractere | 702f9fa6a48126d8ed9f6a9621decba230a0568f | 34c915c98eb5a154b789b2b16d9253755472e22c | refs/heads/main | 2023-08-21T17:37:21.189077 | 2021-10-24T10:48:17 | 2021-10-24T10:48:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,250 | py | ex7.pg38 sir de caractere.py | """ REZOLVĂ! Elaboraţi un program care citeşte de la tastatură şirul de caractere
S şi afişează pe ecran:
a) numărul de apariţii ale caracterului ’A’ în şirul X;
b) şirul obţinut prin substituirea caracterului ’A’ prin caracterul ’*’;
c) şirul obţinut prin radierea din şirul X a tuturor apariţiilor caracterului ’... |
43b346e80089edcce944c7af5bc2d91aa1865a98 | 9fcc8e0ea57ea55ecc541b4613214885e668e3d1 | /jmetal/problem/multiobjective/unconstrained.py | ba102408c2832cb0e1d9c9e758b4081fcfe767b9 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | GitHubChengPeng/jMetalPy | b1e10ff75fad3556d9180ea8453481b67075d9e5 | c6007cad8aa0e12ddd6f8d2f749e3d2cfb6b1367 | refs/heads/master | 2023-08-03T07:42:38.251667 | 2023-06-30T05:48:49 | 2023-06-30T05:48:49 | 260,875,778 | 0 | 0 | MIT | 2020-05-03T10:00:48 | 2020-05-03T10:00:47 | null | UTF-8 | Python | false | false | 9,772 | py | unconstrained.py | import random
from math import exp, pow, sin, sqrt
from jmetal.core.problem import BinaryProblem, FloatProblem, Problem
from jmetal.core.solution import (
BinarySolution,
CompositeSolution,
FloatSolution,
IntegerSolution,
)
"""
.. module:: constrained
:platform: Unix, Windows
:synopsis: Unconstr... |
b8639e7335c35a7ffb3b7dd1ddf6d8c37523b47e | e5f4d8869368588603741a021a0a693bd817f86a | /avaliacao/urls.py | ead90f3285e0d5198fb3c72992624c358387cde1 | [] | no_license | GlauCartaxo/escolaraimundo | ccc4c47f6ed2dc809a154c4a9933c6b808f5edd0 | 2c10150fd6ce313e8d21a58af6116175a9813aa7 | refs/heads/master | 2023-04-26T18:16:53.634029 | 2019-09-02T22:19:02 | 2019-09-02T22:19:02 | 204,837,705 | 0 | 0 | null | 2023-04-21T20:36:00 | 2019-08-28T03:10:44 | Python | UTF-8 | Python | false | false | 198 | py | urls.py | from django.urls import path
from avaliacao.views import AvaliacaoCreateView
app_name = 'avaliacao'
urlpatterns = [
path('addavaliacao', AvaliacaoCreateView.as_view(),name='add_avaliacao'),
] |
eacb5a8368e1632f17e50a96a19c49d02fb5e296 | 50008b3b7fb7e14f793e92f5b27bf302112a3cb4 | /recipes/Python/576757_Shelllike_datprocessing_using_Popen_pipes/recipe-576757.py | 398d18d1f1a698d12fd82ba12489ad19b859a498 | [
"MIT"
] | permissive | betty29/code-1 | db56807e19ac9cfe711b41d475a322c168cfdca6 | d097ca0ad6a6aee2180d32dce6a3322621f655fd | refs/heads/master | 2023-03-14T08:15:47.492844 | 2021-02-24T15:39:59 | 2021-02-24T15:39:59 | 341,878,663 | 0 | 0 | MIT | 2021-02-24T15:40:00 | 2021-02-24T11:31:15 | Python | UTF-8 | Python | false | false | 1,765 | py | recipe-576757.py | from io import BytesIO
from subprocess import Popen, PIPE
from os import pipe, fdopen
from threading import Thread
class Pipeable( object ):
def __init__( self ):
self.output = None
def _output( self, input = None ):
return self.output
def __or__( self, right ):
if not isinstance( right, Pipeable ): return No... |
f6de72fbd4119ff765981dd804e280d4e4d065fe | dd0af3b76ec45551b7537c35d543064e31f5adef | /src/shared/directory.py | d13da3c47378fd6fe5aa1faa3c4e20d5584157e0 | [] | no_license | DanishVaid/Custom-Encrypted-FTP | 7c8e0c00cc18804e9e4145a53f02c493d43875cc | 7c676c58a1d6afe4944c4c005bccdfe5db5cf708 | refs/heads/master | 2021-03-24T10:25:13.982673 | 2019-03-16T23:24:46 | 2019-03-16T23:24:46 | 123,208,519 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,733 | py | directory.py | import os
# Manages navigating through directory
class Directory(object):
# Set virtual home directory, indicated by user type
def __init__(self, user_type):
self.home_directory_prefixes = self.get_home_directory_prefixes(user_type)
self.current_directory_prefixes = self.home_directory_prefixes
# Eq... |
5107b117726cc0e2b3163ea3e125ec1cb4428deb | 949cb46f1032985a4a83059887cae1f32a925bd5 | /goban/math/geometry.py | 94d60e5723fb8864bcf7c8a2a6ace6b27f971f50 | [] | no_license | xieren58/goban-1 | 47810b7d78cac088237cd4d2b51ed8fbe905789c | 541d0732fad5940ce2e6f358c1e2bb030c7f2192 | refs/heads/master | 2021-06-15T18:34:26.869454 | 2017-04-08T16:06:11 | 2017-04-08T16:06:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,360 | py | geometry.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 5 17:35:01 2017
@author: taras
"""
from math import atan2, sqrt
def lineCoefs(p1, p2):
A = (p1[1] - p2[1])
B = (p2[0] - p1[0])
C = (p1[0]*p2[1] - p2[0]*p1[1])
return A, B, -C
def intersection(L1, L2):
D = L1[0] * L2[1] - L1[1... |
2c77911b52bc4408dd19de49a7826c51ac79d010 | a6c7e6748c51d1e9aa7bbea78004f8a500531d5e | /scripts/align_text.py | 03bed4fa1e399759f6759bdd8ff6a9032c8979db | [] | no_license | pkerpedjiev/code-seq | 672de12239246e16487a87242c59e2611b1b52af | 2ce06d3fad948829478e2bab13ae6fb49085f638 | refs/heads/master | 2021-01-19T01:52:46.391280 | 2017-04-05T02:33:54 | 2017-04-05T02:33:54 | 87,257,441 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,143 | py | align_text.py | #!/usr/bin/python
import regex as re
import sys
import argparse
def main():
parser = argparse.ArgumentParser(description="""
python align_text.py reads_file reference_file
Align a set of "reads" or chunks of text to a
reference text.
""")
parser.add_argument('reads_file')
parser.add_arg... |