blob_id
large_string
language
large_string
repo_name
large_string
path
large_string
src_encoding
large_string
length_bytes
int64
score
float64
int_score
int64
detected_licenses
large list
license_type
large_string
text
string
download_success
bool
a1bec318cc7e715bee1656bd922740810efa5961
Python
LeafyQ/MIT
/CS6.0002/3Graph.py
UTF-8
111
2.875
3
[]
no_license
# class Vertex(object): def __init__(self, name): self.name = name def __str__(self): print self.name
true
abf8ae700b2b37584f7f39bb35d905c56cd19dc6
Python
johnatanbrayan/uri_online_judge_solved_in_python
/uriBeginner/1008_salary.py
UTF-8
1,104
4.625
5
[]
no_license
''' # -*- coding: utf-8 -*- ====1008_salary==== Write a program that reads an employee's number, his/her worked hours number in a month and the amount he received per hour. Print the employee's number and salary that he/she will receive at end of the month, with two decimal places. Don’t forget to print the line's end...
true
b3ba3f2d800701ff86827383f1a05ac8a8e11672
Python
dfs-a/complete--script
/Excel/Excel_script/presell_list.py
UTF-8
9,805
2.859375
3
[]
no_license
import xlwings as xw """ 思路: 1,取出预售表中的项目名称与板块对应表中的项目名称 2,将两张表中的项目名称作比较,取板块对应表中的板块 """ # 实例化应用 app = xw.App(visible=False,add_book=False) # 工作簿 wb = app.books.add() # 工作表 sht1 = wb.sheets["sheet1"] class presell: def __init__(self): # 打开excel表格文件 P_l ---> Presell_list s...
true
d74a1a8bd6fdac187ce256e45da0089e766c2fbb
Python
sarahfulkerson/python-games
/cardlib.py
UTF-8
5,629
3.796875
4
[]
no_license
#! /usr/bin/env python3 # https://projecteuler.net/problem=54 from __future__ import print_function from utillib import values, suits class Card: """ Represents a playing card in a card game. Attributes: value Holds the value of the card. Available values: '2', '3', '4', '5', '6...
true
26d3a94a388bd6ffd9246fa5507bdffe061d3a9c
Python
KorsPav/telegram-bot-1
/bot.py
UTF-8
927
2.796875
3
[]
no_license
import requests import telebot from bs4 import BeautifulSoup from constants import TOKEN bot = telebot.TeleBot(TOKEN) def get_info(): response = requests.get('https://covid19.who.int/region/euro/country/ua') soup = BeautifulSoup(response.content, 'html.parser') res = soup.find_all('span') idx = Non...
true
32110aa75d4afbe3efefdd124b35d1bbceec5905
Python
tilfex/Coursera-Python
/02/regular-expression.py
UTF-8
259
2.71875
3
[]
no_license
import re filehandle = open('regex_sum_1252287.txt') calcsum = 0 for line in filehandle: if len(re.findall('[0-9]+', line))>0: x = re.findall('[0-9]+', line) for num in x: calcsum = calcsum + int(num) print(calcsum)
true
f8f4b9972bee530577c8095fddae05290e724f90
Python
happa64/AtCoder_Beginner_Contest
/AGC/AGC003/AGC003-C.py
UTF-8
569
2.78125
3
[]
no_license
# https://atcoder.jp/contests/agc003/submissions/15716116 # C - BBuBBBlesort! import sys from collections import defaultdict sys.setrecursionlimit(10 ** 7) input = sys.stdin.readline f_inf = float('inf') mod = 10 ** 9 + 7 def resolve(): n = int(input()) A = [int(input()) for _ in range(n)] A_S = sorted(A...
true
e8e46ba5bc4b36d31ecab3c9669ff4f709f759b9
Python
ionvision/frnn
/analysis/build_gifs_readme.py
UTF-8
2,719
2.6875
3
[]
no_license
import imageio import glob import scipy.ndimage as ndim import scipy.misc as sm import numpy as np def preprocess_predictions(frames, height=66, width=82): frames = [(f if len(f.shape) == 3 else np.expand_dims(f, axis=2)) for f in frames] frames = [(f if f.shape[2] == 3 else np.concatenate([f, f, f], axis=2))...
true
20fa7153852ecaa54a4a6e82fac49a46eef61e72
Python
playdafuture/YouDMC
/docker/api/rest_api/resources/rating.py
UTF-8
2,023
2.65625
3
[]
no_license
from flask_restful import Resource, reqparse from rest_api.models.rating import RatingModel from flask_jwt_extended import ( jwt_required, get_jwt_identity ) class RateComment(Resource): parser = reqparse.RequestParser() parser.add_argument( 'comment_id', type=int, required=True, help="comment_...
true
58c479082e58e2edb00b312361671593ce7e642a
Python
Walter213/PythonCode
/PythonForFunStuff/Translate.py
UTF-8
3,277
2.84375
3
[]
no_license
import os import io import textwrap from tkinter import * from tkinter.ttk import * from tkinter import ttk from googletrans import Translator class Translate(object): def __init__(self, master): frame = Frame(master) frame.grid() tabControl = ttk.Notebook(root) tabControl.configure...
true
21e8fddf18b52c9198aef800246e90c92ec98315
Python
manionan/project-euler
/problem45.py
UTF-8
637
2.921875
3
[]
no_license
import math def is_power(n): int_root = int(math.sqrt(n)) if int_root*int_root == n: return True else: return False def find_common(max_r): for r in range(144,max_r): c = 2*r*(2*r - 1) sq1 = 1 + 4*3*c if is_power(sq1) == False: continue q_n...
true
38715d04eae7ea3f69e446ad24dc611deb690439
Python
joosm/convertcloud
/convertcloud/converter.py
UTF-8
3,438
2.8125
3
[]
no_license
#! /usr/bin/env python import os import sys import struct import io import numpy as np from .formats import Load, Header class Converter: def __init__(self): self._rgb = None self._rgba = None self._decode = None self.points = None self.fields = None def _get_name(...
true
a2a2249e942ac5dce2033c72dcf32083ee0a92e6
Python
ChunqiWang/UdacityProject2
/submission/code/project2.py
UTF-8
22,650
2.703125
3
[ "MIT" ]
permissive
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Aug 6 23:11:10 2019 @author: chunqi """ import numpy as np import cv2 import glob import matplotlib.pyplot as plt import matplotlib.cm as cm from moviepy.editor import VideoFileClip class advancedLaneFinding: def __init__(self): self.left...
true
b69da94f8ac06d2633d72c374bbecf3f8e75d9cb
Python
oakyuez/master-thesis
/Data Import/03_Join.py
UTF-8
2,606
3.40625
3
[]
no_license
import pandas as pd # Laden der Datensatz aus 01_importData.py nela = pd.read_csv("C:/Datasets/nela2018.csv", index_col=None, low_memory=False) kaggle = pd.read_csv("C:/Datasets/kaggle.csv", index_col=None, low_memory=False) # Laden der csv, welche im Expose die Tabelle 12 ist. Sie enthält nur die Quellen und das pol...
true
e855b6bd886bf3d2ec576f9da77bc366a7d87646
Python
siva237/python_classes
/regular_expressions/search_match.py
UTF-8
294
3.515625
4
[]
no_license
import re # string = "cake and cookies" # pattern = "cake" # # out = re.search(pattern,string) # print(out.group()) string = "icecream" pattern = "c" out = re.match(pattern,string) print(out) string1 = "cake and cookie" pattern1 = "cake" out1 = re.match(pattern1,string1) print(out1.group())
true
5475d4a50df242f133dae21b7bf55f7ceff617f3
Python
Edgeeeeee/pycode
/code/select_student.py
UTF-8
839
3.3125
3
[]
no_license
''' # 重名的被覆盖了! f = open('students.txt',encoding = 'utf-8') tup = ([],) for line in f.readlines(): t = line.strip().split("\t") dic[t[0]] = t while True: name = input("请输入姓名") if name in dic: print(dic[name]) else: print("不存在") f.close ''' f = open('students.txt',encoding = 'utf-...
true
2d01f18bc2b45ad6c71fbc4210950d6172329509
Python
IEP/submissions
/ch08/ch08p23.py
UTF-8
259
3.390625
3
[]
no_license
#!/bin/python def prime(x): limit = int(x**0.5) for i in range(2,limit+1): if x % i == 0: return False return True for i in range(int(input())): if prime(int(input())): print('YA') else: print('BUKAN')
true
0b9c0e902242519279c6790fd1fb912f1590395e
Python
KaggleBreak/daejun_kagglehackathon
/part1/차금강/Reinforcement_Policy_Gradient_Keras/policy_gradient.py
UTF-8
3,710
2.78125
3
[]
no_license
import copy import numpy as np from game import Game from keras.layers import Dense from keras.optimizers import Adam from keras.models import Sequential from keras import backend as K EPISODE = 20000000 class REINFORCEMENTAgent: def __init__(self): self.load_model = True self.action_space = [0,1,...
true
fbffdce5c659c124a52fbcec600a017ab1738d1f
Python
pikinder/unupervised-bci
/decoder/legacy.py
UTF-8
12,491
2.96875
3
[]
no_license
""" Re-use of the original (research) code for unsupervised BCI. This code has a wrapper in the erp_decoder.py """ import numpy as np from scipy.misc import logsumexp def mv_normal_cov_like(labels, data, sigma_t): """ Compute the likelihood of a gaussian...]: :param labels: :param data: :p...
true
7a2560e578d20c2ae19cb69491fae30370b9c72b
Python
cenanypirany/2048_Solver
/algo_class.py
UTF-8
801
3.390625
3
[ "MIT" ]
permissive
import random class Sequence(): def __init__(self, sequence): sequences = { 'cclkwise': ['up','left','down','right'], 'clkwise': ['up','right','down','left'], 'weighted_pattern': [random.choices(('up','down','left','right'), weights=(.1,.4,.4,.1))[0] for i in r...
true
b50ad6698115bbb6ad5f7095c824092f4a4f0f91
Python
silnrsi/palaso-python
/lib/palaso/sfm/style.py
UTF-8
9,573
2.59375
3
[ "MIT" ]
permissive
""" The STY stylesheet file parser module. This defines the database schema for STY files necessary to drive the SFM DB parser and pre-processing to remove comments, etc. """ __author__ = "Tim Eves" __date__ = "06 January 2020" __copyright__ = "Copyright © 2020 SIL International" __license__ = "MIT" __email__ = "tim_e...
true
5fc87b6d9e310edc0351b34067e0cbaaa62d04e5
Python
tomijarvi/kerrokantasi
/kerrokantasi/settings/util.py
UTF-8
1,952
2.671875
3
[ "MIT" ]
permissive
import copy import os from importlib.util import find_spec def load_local_settings(settings, module_name): """ Load local settings from `module_name`. Search for a `local_settings` module, load its code and execute it in the `settings` dict. All of the settings declared in the sertings dict are thus...
true
356beca1dfe9ae65744715dfc1b42153d8292c11
Python
dr-dos-ok/Code_Jam_Webscraper
/solutions_python/Problem_97/1664.py
UTF-8
1,435
3.0625
3
[]
no_license
from itertools import permutations as pnr, combinations as cnr def isRe(x, y): a, b = list(str(x)), list(str(y)) for i in range(len(a)): a.insert(0, a.pop()) if a == b: return True return False if __name__ == "__main__": fi = open("input.txt", "r") fo = open("o...
true
dc3abdfa4e0a14d2ac979558843307482b690bd3
Python
KamilRuchala/kodyNadmiarowe
/Hamming/operacje.py
UTF-8
944
3.21875
3
[]
no_license
import numpy # trzeba doinstalowac def suma(wiersz): suma=0 for i in xrange(len(wiersz)): suma=suma+wiersz[i] if suma %2 == 0: return 0 else: return 1 def mnozenie(m1,inf): inf2=[] for x in inf: tmp=int(x) inf2.append(tmp) l_k=len(m1[0]) # liczba kolumn l_w=len(m1) # liczba wierszy wynikowa=numpy...
true
811135b16042eb8023b1741bd87d599830e237d2
Python
jonasgrebe/pt-deep-image-colorization
/trainer.py
UTF-8
13,908
2.984375
3
[]
no_license
from typing import Tuple, List, Callable, Dict, Any import torch import numpy as np import os import cv2 import log class Trainer(): def __init__(self, logger: log.Logger, generator: torch.nn.Module, discriminator: torch.nn.Module, g_optimizer: torch.optim.Optimizer,...
true
bcc96f0986620073c9ff2f0d602daf70f0179e74
Python
mhfowler/slack-to-arena
/slack_to_arena.py
UTF-8
3,685
2.546875
3
[]
no_license
import sys import os import re from time import sleep from slacktoarena.utils.constants import PROJECT_PATH, RATE_LIMIT_SLEEP_TIME from slacktoarena.utils.parse_slack_export import parse_slack_export from slacktoarena.utils.arena_syncer import ArenaSyncer def slack_to_arena(path_to_slack_export, arena_username, save...
true
dba72f3bde83a9eac766611b69869e078a67f506
Python
zmoog/alchemy
/alchemy/cash/models.py
UTF-8
1,930
2.59375
3
[]
no_license
# -*- encoding: utf-8 -*- from django.db import models from django import forms from django.contrib.auth.models import User import datetime ACCOUNT_TYPES = ( ('as', 'Asset'), ('cc', 'Conto corrente'), ('eq', 'Equity'), ('ex', 'Expenses'), ('in', 'Income'), ('cr', 'Carta di credito'), ) cla...
true
1a0feb417908d77098edd03a564ae1e1c32afe4f
Python
bentaljaard/orchestrator
/job.py
UTF-8
82
2.59375
3
[ "Apache-2.0" ]
permissive
def printTaskName(task): key=next(iter(dict(task))) print(key) return "success"
true
98e272815d97fa9101635c6781609de27b70ac84
Python
wrightsteven/insuranceProject
/insuranceProject.py
UTF-8
5,076
3.171875
3
[]
no_license
import tkinter as tk countryList = ["US", "Mexico", "Switzerland", "Turkey", "Brazil", "Sudan", "Cambodia"] lowRiskDict = {"US":.01, "Mexico":.02, "Switzerland":.005, "Turkey":.011, "Brazil":.015, "Sudan":.022, "Cambodia":.022} smokerOnlyDict = {"US":.02, "Mexico":.04, "Switzerland":.02, "Turkey":.03, "Brazil":.03, "...
true
2038004dd9a3627ad3d003fe85c301907061057c
Python
LucasNote/hyperskill-python
/SimpleBankingSystem/project1/project11.py
UTF-8
6,045
3.953125
4
[]
no_license
# Work on project. Stage 1/4: Card anatomy """ The very first digit is the Major Industry Identifier (MII), which tells you what sort of institution issued the card. 1 and 2 are issued by airlines 3 is issued by travel and entertainment 4 and 5 are issued by banking and financial institutions 6 is issued by merchandi...
true
a425936460dbe758dbf936f5deab3d2ecad5650d
Python
mintheon/Practice-Algorithm
/Jaehwan-Hong/baekjoon/beginner_100th/10998.py
UTF-8
53
2.84375
3
[]
no_license
# A x B A, B = map(int, input().split()) print(A * B)
true
5e63ed8e5a1cfbfa9d138d680bd4d5e53b5a93ff
Python
galihsetyaawan/latian-python1
/fundamental2-tipe-data.py
UTF-8
478
3.890625
4
[]
no_license
#tipe data skalar -> tipe data sederhana anak1 = 'Eko' anak2 = 'Dwi' anak3 = 'Tri' anak4 = 'Catur' print(anak1) print(anak2) print(anak3) print(anak4) #tipe data list/array anak = ['Eko','Dwi','Tri','Catur'] print(anak) anak.append('Panca') print(anak) print('\nsapa anak kedua') print(f'Hai {anak[1]}!') print('\ns...
true
2b89200ca578ae3c848276ed9fbd5476816a38f3
Python
UnifoxPythonSquad/realsung
/Section4/read_write_files.py
UTF-8
817
3.3125
3
[]
no_license
#문제1 f1 = open("test.txt", 'w') f1.write("Life is too short!") f1.close() f2 = open("test.txt", 'r') print(f2.read()) f2.close() #문제2 i = input("저장할 내용을 입력하세요 :") f = open('test.txt', 'a') f.write(i) f.close() #문제3 f = open('abc.txt', 'r') lines = f.readlines() f.close() rlines = reversed(lines) f = open('abc.txt'...
true
fb76817188710587616327c6af52b96d127665e1
Python
DevParapalli/JEE-Mains
/jee_mains/calculation.py
UTF-8
4,757
2.53125
3
[ "MIT" ]
permissive
# CUSTOM ABBR USED # PSC = Physics Single Correct # PSN = Physics Single Not Correct # PSL = Physics Single Left # PHYS = Physics Single import json from .constants import BASE_DIR from .generation import generate def section_calculate_marks(section_dict, answer_dict): CORRECT = {} NOTCORRECT = {} LEFT ...
true
c0cd7ac4bc08fef577fa8d19c1dd3acc90d15b0f
Python
tpham393/ec503PacmanBot
/Game without GUI/game_test.py
UTF-8
5,073
3
3
[]
no_license
# A version of the game with a GUI you need to have pygame to run this # pip install pygame import pygame import math import random import time import game_funcs as g from random import randint as ri import threading pacman_x, pacman_y = 1, 3; ghost_x, ghost_y = 3, 3; goal_x, goal_y = 3, 1; moves = []; ...
true
3c82cab9a5dd4f4b182b2a48515df0393f0352a3
Python
Igorxyz/Simple_password_generator
/Simple_password_generator.py
UTF-8
865
3.28125
3
[]
no_license
#!/usr/bin/python3 import sys import random import getpass import time start = time.time() password_options = ["1234567890", "abcdefghijklmopqrstxyz", "!@#$%", "abcdefghijklmopqrstxyz".upper()] print("CLI PASSWORD GENERATOR") print("*" * 80) print() try: password_length = int(input("Choose password length: ")) ...
true
0d10a96b0c8c97152194f5b26e867faa44956a5a
Python
XifeiNi/LeetCode-Traversal
/python/string/swap_adjacent_LR_string.py
UTF-8
532
3.125
3
[]
no_license
class Solution: def canTransform(self, start: str, end: str) -> bool: l = 0 r = 0 for i in range(len(start)): if start[i] == 'R': r += 1 if end[i] == "L": l += 1 if start[i] == 'L': l -= 1 if end[...
true
9bf0cee10404884b3971ec91999c7a1b875e9285
Python
runningfire/Projects
/golem_data.py
UTF-8
1,848
2.75
3
[]
no_license
#!/usr/bin/python2 # -*- coding: utf-8 -*- from numpy import * from urllib2 import urlopen import shutil import os def golem_data(shot, diagn): """ Simple interface for GOLEM database Use: obj = golem_data(10011, 'loop_voltage') plot(obj.tvec, obj.data) d - object containing all availible inform...
true
9950177e449ee6439924bbd2eb73b2b50fdd13d4
Python
bashia/Holdem
/tester/bot_wrapper.py
UTF-8
559
2.53125
3
[]
no_license
from messages import Action class BotWrapper(object): def __init__(self, bot, *args, **kwargs): self.id = kwargs['id'] self.credits = kwargs['credits'] self.bot = bot(*args, **kwargs) @staticmethod def filter_action(input_action): return input_action de...
true
1ee9b7679ad23d1bc6c828fc26ba878896485a55
Python
carlosevmoura/courses-notes
/programming/python-curso_em_video/exercises/ex003.py
UTF-8
289
3.9375
4
[ "MIT" ]
permissive
numero1 = input('Digite um número: ') numero2 = input('Digite mais um número: ') soma = numero1 + numero2 print('A soma (errada) destes números vale {}.'.format(soma)) soma = int(numero1) + int(numero2) print('A soma entre os números {0} e {1} vale {2}.'.format(numero1,numero2,soma))
true
71108e7ce493ec00fac86cda10d1faa4eaed4adb
Python
Jordan-type/Simple-python-GUI-Applications-using-tkinter
/app.py
UTF-8
2,694
2.78125
3
[]
no_license
import tkinter as tk from tkinter import filedialog, Menu, Text import os root = tk.Tk() root.title("Favarite Apps") apps = [] if os.path.isfile('save.txt'): with open('save.txt', 'r') as f: tempApps = f.read() tempApps = tempApps.split(',') apps = [x for x in tempApps if x.s...
true
388241697edf092f55a8b6c57351dfadb40f8bf3
Python
TomographicImaging/CIL
/Wrappers/Python/cil/framework/BlockDataContainer.py
UTF-8
26,006
3.015625
3
[ "Apache-2.0", "BSD-3-Clause", "GPL-3.0-only" ]
permissive
# -*- coding: utf-8 -*- # Copyright 2019 United Kingdom Research and Innovation # Copyright 2019 The University of Manchester # # 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 # # htt...
true
00c15fb7c9931b31453e3b6d0b710bbb3e2b9d9f
Python
m2cci-NMZ/sasview
/src/sas/sasgui/plottools/PropertyDialog.py
UTF-8
4,290
2.859375
3
[ "BSD-3-Clause" ]
permissive
""" """ import wx class Properties(wx.Dialog): """ """ def __init__(self, parent, id=-1, title="Select the scale of the graph"): wx.Dialog.__init__(self, parent, id, title) self.parent = parent vbox = wx.BoxSizer(wx.VERTICAL) sizer = wx.GridBagSizer(5, 5) x_size = 7...
true
255df1daae883de1ddae9b9316ae244a181b86d9
Python
Dominik12345/Masterarbeit
/arbeiten/Masterarbeit/Python/alpha_running_afix4.py
UTF-8
3,721
2.65625
3
[]
no_license
#name of the figure import matplotlib.pyplot as plt import numpy as np import pylab as p import scipy.constants as const import itertools ##################################################### # Definition of the parameters and initial value ---> amz = 0.1185 Nc = 3. Nd = 2. nfc = 6. nsc = 0. nfd = 0. nsd = 1. n...
true
c2e652c3bfc5eee1edd8efd8eee920b281cbbfeb
Python
betoma/advent-2018-python
/04/advent-04.py
UTF-8
2,335
3.40625
3
[]
no_license
from collections import defaultdict from collections import Counter def takeFirst(elem): return elem[0] list_of_actions = [] with open("input.txt") as f: for line in f: the_line = line.split("]", 1) date = the_line[0][1:] action = the_line[1].strip() list_item = [date, actio...
true
b20bcf51582c74da76c445b445161f201ba7a1d8
Python
udemirezen/xitorch
/xitorch/_impls/interpolate/extrap_utils.py
UTF-8
1,376
2.53125
3
[ "MIT", "BSD-3-Clause", "BSD-2-Clause" ]
permissive
import torch def get_extrap_pos(xqextrap, extrap, xmin=0.0, xmax=1.0): # xqextrap: (nrq,) xqnorm = (xqextrap - xmin) / (xmax - xmin) if extrap == "periodic": xqinside = xqnorm % 1.0 elif extrap == "mirror": xqnorm = xqnorm.abs() xqnorm_ceil = xqnorm.long() + 1 ...
true
2a65503cdadd4f82ca12afdf70660be04f6d64b6
Python
dazzle111/python
/0122/pachong5.py
GB18030
611
3.109375
3
[]
no_license
#ٶ import string,urllib2 def baidu_tieba(url,begin_page,end_page): for i in range(begin_page,end_page+1): sName = string.zfill(i,5)+'.html' print 'ص'+str(i)+'ҳ洢Ϊ'+sName+'...' f= open(sName,'w+') m = urllib2.urlopen(url+str(i)).read() f.write(m) f.close() ...
true
cf8e71b71928995f4bdddf39f87e3e2bd51177ab
Python
popina1994/faculty-network
/Social Networks/language/language_converter.py
UTF-8
1,424
3.65625
4
[]
no_license
class CyrilicToLatin: CYRILIC_ALPHABET = ['а', 'б', 'в', 'г', 'д', 'ђ', 'е', 'ж', 'з', 'и', 'ј', 'к', 'л', 'љ', 'м', 'н', 'њ', 'о', 'п', 'р', 'с', 'т', 'ћ', 'у', 'ф', 'х', 'ц', 'ч', 'џ', 'ш', 'А', 'Б', 'В', 'Г', 'Д', 'Ђ', 'Е', 'Ж', 'З', 'И', 'Ј', 'К', '...
true
195f2b590cce340da4b6e708ad20953ba63537ab
Python
Pangeamt/nectm
/tools/mosesdecoder-master/scripts/ems/support/defaultconfig.py
UTF-8
1,653
2.875
3
[ "LicenseRef-scancode-warranty-disclaimer", "LGPL-2.1-only", "LGPL-2.0-or-later", "GPL-1.0-or-later", "LGPL-2.1-or-later", "LicenseRef-scancode-other-copyleft", "GPL-2.0-only", "Apache-2.0" ]
permissive
#!/usr/bin/env python2 # # This file is part of moses. Its use is licensed under the GNU Lesser General # Public License version 2.1 or, at your option, any later version. """Version of ConfigParser which accepts default values.""" import ConfigParser class Config: """Version of ConfigParser which accepts def...
true
3d7f1cb6d5095a6cb3bf0dc2aee4b7df7f62c524
Python
BigRLab/dict_db
/dict_db/dict_db.py
UTF-8
1,241
2.609375
3
[ "MIT" ]
permissive
from redis_ds.redis_hash_dict import JSONRedisHashDict from redis_ds.redis_list import JSONRedisList from elastic_ds.doc_dict import ElasticDocDict # DB Types class Consts(object): DB_REDIS = 'redis' DB_ELASTIC = 'elastic' DS_DICT = 'dict' DS_LIST = 'list' SER_JSON = 'json' class DictDbFactory...
true
93d3760e96df84591cc47f1b37e9f39549780bbf
Python
sailesh083/Website-Phishing
/svc.py
UTF-8
1,367
2.859375
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Fri Jul 19 23:47:01 2019 @author: shashikant, sailesh, chirayu """ # -*- coding: utf-8 -*- """ Created on Fri Jul 19 19:36:49 2019 @author: shashikant, sailesh, chirayu """ import numpy as np import matplotlib.pyplot as plt import pandas as pd from sklearn.ensemble import Rand...
true
ed44b098fcea892f2f3bb19abb121bbaf04c97c2
Python
neophytecoder/SpeechRecognitionDataSelection
/recognition_comparison/add_to_datadir.py
UTF-8
1,341
2.71875
3
[]
no_license
#!/usr/bin/python # This script appends utterances dumped out from XML to a Kaldi datadir import sys, re basename=sys.argv[1] outdir = sys.argv[2] if len(sys.argv) > 3 and sys.argv[3]!="all" : pmer_thresh=float(sys.argv[3]) else: pmer_thresh = None # open the output files in append mode segments_file = ope...
true
a21b9f8aee3066d3717da9039531cccefc47cbd2
Python
hjia10/tigis_assignment3
/web_visual_db/main.py
UTF-8
8,557
2.6875
3
[]
no_license
#! /usr/bin/env python3 from jinja2 import Environment, FileSystemLoader import cx_Oracle import cgi import cgitb cgitb.enable(format='text') class GraphicsArea: def __init__(self, width, height, viewBox_x, viewBox_y, viewBox_width, viewBox_height): self.width = f"{width}cm" self.height = f"{he...
true
3d955fc513666c6f39c4c0d22a395300352c4bcd
Python
alapha23/GutInstinct
/verify/linear_actuator.py
UTF-8
667
2.5625
3
[ "BSD-2-Clause" ]
permissive
import RPi.GPIO as GPIO import time PIN_1 = 15 PIN_2 = 23 try: GPIO.setmode(GPIO.BCM) GPIO.setup(PIN_1, GPIO.OUT) GPIO.setup(PIN_2, GPIO.OUT) if True: GPIO.output(PIN_1, GPIO.LOW) GPIO.output(PIN_2, GPIO....
true
1e2339d225a14cda2f45aecbfe1998fb5ea1fdac
Python
lili-n-f/Nobrega-Liliana-2021-2
/RandomNumber.py
UTF-8
4,530
3.859375
4
[]
no_license
from Game import Game import random class RandomNumber(Game): def __init__(self, requirement, name, award, rules, questions): super().__init__(requirement, name, award, rules, questions) def ask_for_clues(self, player, range_upper_limit, number, guess): """Método para dar al usuario la opción ...
true
d56a8b77870cbe576f02d254ff228a0e752d8ebc
Python
weatherhead99/ibroute
/ibroute/geolayer.py
UTF-8
1,631
2.75
3
[]
no_license
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Apr 14 21:17:16 2019 @author: danw """ from waypointdata import waypoint_in from abc import abstractmethod from typing import Tuple from collections import namedtuple from geopy.geocoders import Nominatim from geopy.distance import geodesic waypoint_...
true
eac2b0524feca1063fecd19f5cfb4d30661c3356
Python
Targetcatcherinc/mbti-net
/src/load_data.py
UTF-8
1,614
3.328125
3
[]
no_license
# Author: Anthony Ma # Date: 03/04/17 # load_data.py import os import sys import numpy as np USAGE_STR = """ # Usage # python load_data.py <DATA_FILE> <PERCENTAGE_TRAIN> # Arguments # <DATA_FILE> Absolute path to shuffled data file with each row being a data point # <PERCENTAGE_TRAIN> Percentage of rows to use f...
true
495ee3c918fb056ff21c5412c7fca9e02c7ddceb
Python
hariketsheth/PyGrams
/col_named_tup.py
UTF-8
1,444
4.0625
4
[]
no_license
from __future__ import print_function from collections import namedtuple '''Collections-NamedTuple (100 Marks) Named tuples assign meaning to each position in a tuple and allow for more readable, self-documenting code. They can be used wherever regular tuples are used, and they add the ability to access fields by name ...
true
f3bb99747463a89c814c7873232a676fd7aadfd5
Python
Tahmeed156/Numerical-Methods-Sessional
/1-root-finding/1.py
UTF-8
2,407
3.671875
4
[]
no_license
import numpy as np from matplotlib import pyplot as plt def ln(z, n=5): x = z-1 """ Returns the values of ln(1+x), iterated over n times """ prev = x sum = prev # Assigned first value, iterating 2 to n for i in range(2, n+1): term = prev * x * ((i-1)/i) if i % 2 == ...
true
bc15adc8aa7d761d4b68b537e6b62ec4c8473fb5
Python
PFZ86/LeetcodePractice
/Array/0275_HIndexII_M.py
UTF-8
754
3.6875
4
[]
no_license
# https://leetcode.com/problems/h-index-ii/ # Solution 1: binary search # find the largest h s.t. citations[N-h] >= h # --> find the smallest i s.t. citations[i] >= N-i class Solution(object): def hIndex(self, citations): """ :type citations: List[int] :rtype: int """ ...
true
b447a56e5f431033bdb2c3a12ff21d9a9caca40b
Python
Pellizzon/ItalianProgrammingLanguage
/components/symbolTable.py
UTF-8
683
3.4375
3
[]
no_license
class SymbolTable: def __init__(self): self.symbols = {} def set(self, key, val): if key in self.symbols: self.symbols[key] = val else: raise ValueError(f"Cannot set value of undeclared variable '{key}'.") def get(self, key): if key in self.symbols: ...
true
31f50382ba3836f3e438753c21e30a01839f381e
Python
hrizantema-st/Programming_101solutions
/week3/3-Panda-Social-Network/panda_testing.py
UTF-8
5,180
2.828125
3
[]
no_license
import unittest from panda import Panda from panda import PandaSocialNetwork from panda import PandaAlreadyThere from panda import PandasAlreadyFriends class TestPandaClass(unittest.TestCase): def setUp(self): self.test_obj = Panda("Ivo", "ivo@pandamail.com", "male") self.test_obj2 = Panda("Rado",...
true
d27666490d6238f7e2ea22246e084ceb19469f68
Python
changediyasunny/Challenges
/leetcode_2018/248_strobogrammatic_numer_III.py
UTF-8
2,066
4.15625
4
[]
no_license
""" 248. Strobogrammatic Number III A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down). Write a function to count the total strobogrammatic numbers that exist in the range of low <= num <= high. Example: Input: low = "50", high = "100" Output: 3 Explanation: 69, ...
true
bbcb62ce77052d484f84e14183f48de43cad36ab
Python
laqinfan/Latent-Semantic-Analysis-for-news-articles-clustering
/project-final/document-clustering.py
UTF-8
7,578
2.609375
3
[]
no_license
import numpy as np import pandas, os, sys, umap from PIL import Image import matplotlib.pyplot as plt import seaborn as sb from sklearn.datasets import fetch_20newsgroups from nltk.corpus import stopwords from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.decomposition import TruncatedSVD from ...
true
3eee2c10acce88554e3e069dd8485de7f732f2ba
Python
mdmims/AzureIngester
/azure_ingester/helpers/azure_helper.py
UTF-8
1,824
2.640625
3
[]
no_license
import requests import json import time MAX_API_RETRY = 5 def fatal_code(response) -> bool: """ Return True/False if error response status code is within fatal http range """ return 400 <= response.status_code < 500 class AzureApp: """ Use Azure AD credentials to auth to Azure services ...
true
703f06bd61c770f09b0a9a42098667873f4f438c
Python
BranGuzmen/ProgrammingPortfolio
/Python/ClassifierEvaluation/SourceCode/HW3_ClassifierEvaluation.py
UTF-8
13,098
3.21875
3
[]
no_license
import sys import time import warnings import numpy as np import matplotlib.pyplot as plot from matplotlib.colors import ListedColormap from sklearn.model_selection import train_test_split from sklearn.model_selection import cross_val_score from sklearn.preprocessing import StandardScaler # Scoring for classifiers fro...
true
b5a0b54de0019d0d69ce93bf38dafbaa1ddfe634
Python
FabioMenacho/backend
/semana1/dia2/06-juego01.py
UTF-8
1,116
3.671875
4
[]
no_license
# importo no toda la libreria random sino solamente choice para que no pese, ver documentación de pyhton # random viene instalada en python from random import choice # JUEGO DE PIEDRA PAPEL O TIJERA # Definir variables de entrada y salida opciones = ("piedra", "papel", "tijera") jugador = input("ingresa tu jugada: ...
true
984e31d7e2846266839b458530db1f034d536b7b
Python
xiaosean/leetcode_python
/Q28_Implement-strStr.py
UTF-8
359
3.125
3
[ "MIT" ]
permissive
class Solution: def strStr(self, haystack: str, needle: str) -> int: if needle == "": return 0 if len(needle)-len(haystack)>0: return -1 for idx, letter in enumerate(haystack[:len(haystack)-len(needle)+1]): if haystack[idx:idx+len(needle)] == needle: ...
true
89b170d74d9e234daa71ebdf1f1af83739ed17d8
Python
hiyounger/sdet05_demo
/qsong/uiauto0712/test_page.py
UTF-8
4,409
2.5625
3
[]
no_license
#encoding:utf-8 import unittest import json from selenium import webdriver from webdriverdemo.locationpage import LocationPage class MyTestCase(unittest.TestCase): @classmethod def setUpClass(cls): cls.driver = webdriver.Firefox() def setUp(self): # url_indexPage = "http://47.92.220.226:8...
true
c16ecf6827bf9c0b72d5759ea74c947987888fc9
Python
leemengwei/GNRX
/trading/dependency_make_strategy.py
UTF-8
4,056
2.703125
3
[]
no_license
import pulp import pandas as pd import sys,os from IPython import embed import config import numpy as np import dependency_compute_income class StrategyAgent(object): '''The StrategyAgent will put its strategic declaration to its strategic_fore_power column for later income-computing''' def __init__(self, cap,...
true
8a968aa793a24410d0b6d6bbbaa594a23626bec7
Python
stjohn/stjohn.github.io
/teaching/seminar4/s17/cw4.py
UTF-8
873
2.65625
3
[]
no_license
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Feb 24 11:17:29 2017 @author: stjohn """ import folium from folium.plugins import MarkerCluster import pandas as pd #import numpy as np cuny = pd.read_csv('cunyLocations.csv') print (cuny) mapCUNY = folium.Map(location=[40.75, -74.125]) coords = [] ...
true
384169bed84ac2b731f25102214fa6aca0564ed1
Python
brettdh/pyinstaller-signal-handling
/main.py
UTF-8
561
2.765625
3
[]
no_license
#!/usr/bin/env python import signal import time from signal import SIGHUP, SIGUSR1, SIGUSR2 import requests running = True def handler(sig, *args): print(' | got signal {}; exiting cleanly'.format(sig)) global running running = False signals = [SIGHUP, SIGUSR1, SIGUSR2] for sig in signals: signa...
true
14175c0db55b9a42b1bb478e4639ae2c3412dc67
Python
mridullpandey/faq-bot
/faq-publish-api/tests/unit/test_user_service_map_user.py
UTF-8
1,073
2.578125
3
[ "MIT" ]
permissive
import unittest import os import uuid import names import random from datetime import datetime, timedelta from services.user_service import UserService from dotenv import load_dotenv load_dotenv() class TestMapUser(unittest.TestCase): LOCAL_DB_FILE = '/data//datastores/local_test.sqlite3' def setUp(self): ...
true
7a4a4e9ef297288df80797cefe13ddaddaad24dc
Python
semensorokin/educational-nlp-projects
/py_prog/XML_/XML.py
UTF-8
1,176
3.015625
3
[]
no_license
import xml.etree.ElementTree as ET tree = ET.parse('xml_test.xml') root = tree.getroot() print(root.tag) for students in root: print (students.tag) print(students.attrib) if (len(students))!=0: for subjects in students: print(subjects.attrib['name']+ ':'+ subjects.text) #student= ET.Sub...
true
a9d65b92cb743b4f42d35f4e226d861528d901a4
Python
kuceran3/thesis
/readChunk.py
UTF-8
231
2.8125
3
[]
no_license
import sys import struct if (len(sys.argv) < 2): print("Usage: python readChunk.py <INPUT_FILE>") exit() with open(sys.argv[1], 'rb') as inp: while(True): a = inp.read(1) if(not a): break print(struct.unpack('b', a))
true
7de4898884d46bf9f6dc49d16412583876b94610
Python
chrigu6/python_webserver_from_scratch
/server.py
UTF-8
698
2.796875
3
[]
no_license
import socket import typing from Request import Request HOST = "127.0.0.1" PORT = 9000 RESPONSE = b""""\ HTTP/1.1 200 OK Content-type: text/html Content-length: 15 <h1>Hello!</h1>""".replace(b"\n", b"\r\n") with socket.socket() as server_sock: server_sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) ...
true
5b459df85685c1a98adbdbf26ceecf8d0cd482a9
Python
rafaelbattesti/poster-kata
/svc-datagen/core/data_access.py
UTF-8
2,767
2.515625
3
[]
no_license
""" Author: Rafael Battesti - rafaelbattesti.com Since: 2019-11-20 Module to provide data access, from and to external or internal persistence(i.e. csv for loading) """ import csv import os import swapi import psycopg2 as pg # DBs # TODO: Investigate docker-compose .env PG_HOST = os.getenv("POSTGRES_HOST", "svc-pos...
true
a4f74afc9b33046af4766af2a1a480645b3d419b
Python
manishbhusal16/CE_lab2_09
/MergeSort.py
UTF-8
1,766
3.515625
4
[]
no_license
import random import unittest from time import time import matplotlib.pyplot as plt class TestMergeSort(unittest.TestCase): def testSort(self): data = [7,8,1,4,2,5,3] merge_sort(data) self.assertListEqual(data,[1,2,3,4,5,7,8]) def merge_sort(alist): if len(alist)>1: ...
true
28457b390d6921e8de0837a9febd42291e27c3af
Python
69SomeoneElse69/Homework
/Task2.py
UTF-8
665
3.984375
4
[]
no_license
# Пользователь вводит время в секундах. User_Seconds = int(input('Введите количество секунд: ')) # Переведите время в часы, минуты и секунды и выведите в формате чч:мм:сс. Hourse = str(User_Seconds//3600) Minutes = (User_Seconds // 60) % 60 Seconds = User_Seconds % 60 # Используйте форматирование строк. if Minutes...
true
3d67f8f246f1640f4a7066cebb133b1178a772c4
Python
RC1595/fizzbuzz
/app.py
UTF-8
511
3.734375
4
[]
no_license
number = [3, 5, 15, 60, 37, 48, 61, 88, 95, 70, 235, 540, 125, 444, 655] def fizz_buzz(number): if number % 3 == 0 and number % 5 == 0: print("FizzBuzz") elif number % 5 == 0: print("Buzz") elif number % 3 == 0: print("Fizz") else: print(number) fizz_buzz(3) fizz_buzz(...
true
8706471b662e844f9fb57cb59c0655df1b311c2a
Python
Leslieaj/Opacity_for_RTA
/normalform.py
UTF-8
4,532
2.6875
3
[]
no_license
#define normal form from projection import * class NForm: def __init__(self, x1, x2, k, N): self.x1 = x1 self.x2 = x2 self.k = k self.N = N class WNForm: def __init__(self, x1, x2, k): self.x1 = x1 self.x2 = x2 self.k = k def gcd(a, b): #assert a...
true
9db301f72c7a759bdc88384e4dbeab62f8957afa
Python
Bobinar/aoc2019
/day_3.py
UTF-8
1,712
3.515625
4
[]
no_license
def build_set_from_ops(ops): first_set = set() current_position = (0, 0) distance = 0 position_to_distance = dict() for op in ops: if op[0] == 'R': direction = (1, 0) if op[0] == 'L': direction = (-1, 0) if op[0] == 'U': direction = (0, 1)...
true
faf477695a6bc146a012df9e7171a9585e126d49
Python
sjaca10/paho-basic-orm
/source/ORM_example_client.py
UTF-8
2,986
2.734375
3
[]
no_license
from pymongo import MongoClient import MySQLdb import paho.mqtt.client as mqtt import json import psycopg2 def on_connect(client, userdata, rc): print "Client connected with result {0}".format(rc) client.subscribe("mongodb/company/ping") client.subscribe("mysql/company/ping") client.subscribe("redis/company/ping")...
true
0735a3e5be4318bd29a5fc16dc99c2b6bcf2dadc
Python
Luolingwei/LeetCode
/BitManipulation/Q1404_Number of Steps to Reduce a Number in Binary Representation to One.py
UTF-8
1,209
3.890625
4
[]
no_license
# 思路1: 直接将数字用二进制表示进行操作 # 思路2: 对string进行操作, 从后往前扫描, 除以2为往右移1位, 加1为在尾部加1, 如果尾部为1那么为奇数,否则为偶数 # 如果当前数字s[i]+carry=0, 需要1步操作(除以2), carry置为0 # 如果当前数字s[i]+carry=1, 需要2步操作(加1, 除以2), carry置为1 # 如果当前数字s[i]+carry=2, 需要1步操作(除以2), carry置为1 # 扫描到头部时停止,如果carry=1, 则还需要1步(除以2)完成 class Solution: # def numSteps(self, s: str): # ...
true
f5debc861c5afd7371071c1a3255eaee794d363d
Python
PennyLaneAI/pennylane
/pennylane/transforms/specs.py
UTF-8
6,583
2.671875
3
[ "Apache-2.0" ]
permissive
# Copyright 2018-2021 Xanadu Quantum Technologies 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...
true
6e3e6ef297dc4ca9598613aedcee3e2100dd93c3
Python
kmac3063/Training
/ACMP/75.py
UTF-8
29
2.796875
3
[]
no_license
n = int(input()) print(45**n)
true
76c2b1cab0757909de6c390d4380a64a57ea1747
Python
Aasthaengg/IBMdataset
/Python_codes/p03502/s694767468.py
UTF-8
65
3
3
[]
no_license
X = input() print(['No','Yes'][int(X)%sum(int(T) for T in X)==0])
true
406799c427b6410201352983769bd3972f7aa53b
Python
sunbo449/wms
/utils/test.py
UTF-8
230
2.71875
3
[]
no_license
""" 本文件测试使用 """ info = [ {'k1':(1),'k2':{'k9':'oldboy','k10':'一天天'}}, (11,22,33,44), {199,2,3,4,5}, True, ['武沛齐','景女神',{'extra':("alex",'eric',[18,20])}] ] print(info[1][3])
true
d225255c6f12654d53a09d7ebb6ae06f433d1172
Python
reallinfo/proyectoIV
/old/tests/test_recurso.py
UTF-8
2,349
3.359375
3
[ "MIT" ]
permissive
""" Tests del archivo src/recurso.py """ # Modificación del path para incluir las demás carpetas, por comodidad a la hora de importar. import sys, platform if platform.system is 'Windows': sys.path.append(".\src") else: sys.path.append("./src") import unittest from recurso import Recurso class FallaStr(object): ...
true
f811f6dd5d2c0877d18fc6be314b52e020ca8559
Python
infra-ops/cloud-ops
/ansible-1/training/rhca-410/aws/plugins/callback/boto.py
UTF-8
330
2.875
3
[]
no_license
import boto import json # Create an SNS client sns = boto3.client('sns') # Publish a simple message to the specified SNS topic response = sns.publish( TopicArn='arn:aws:sns:us-east-1:758637906269:notify-me:1e1955f1-ff4b-4784-82ca-19c31e152740', Message='Hello World!', ) # Print out the response print(...
true
157b567adf79c92800d60f931fa0f5aa58071068
Python
immaxchen/python-msgbox
/msgbox.py
UTF-8
1,237
2.609375
3
[]
no_license
import os if os.name == "nt": import ctypes def MessageBox(text, caption="", options=0): return ctypes.windll.user32.MessageBoxW(0, text, caption, options) else: import textwrap import tkinter from PIL import Image, ImageTk def MessageBox(text, caption="", options=0): if no...
true
954867f2b544f24d9a031604487ed338d604fbf2
Python
amit000/flask_api
/tests/Integration/test_order.py
UTF-8
1,748
2.515625
3
[]
no_license
from tests.Integration.base_test import BaseTest from schemas.order import ItemsToOrderSchema from schemas.order import OrderSchema from schemas.item import ItemSchema from models.item import ItemModel from models.order import OrderModel from models.order import ItemsToOrders class TestOrder(BaseTest): items_to_...
true
7340ef155e1f3cf5fd407faf392fb3229704ffee
Python
childe/leetcode
/add-two-numbers/solution.py
UTF-8
903
3.28125
3
[]
no_license
# Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def addTwoNumbers(self, l1, l2): """ :type l1: ListNode :type l2: ListNode :rtype: ListNode """ head...
true
835d5c49ddd4f2ef17a5307595288aad47109b91
Python
huy-hng/Sandbox
/python/tests/huys_logging_test.py
UTF-8
643
2.6875
3
[]
no_license
import __init__ from huys_python.templates.logging import configure_loggers, get_logger configure_loggers('debug') def basic_decorator(function): logger = get_logger('decorator') def wrapper(*args, **kwargs): # do decorator stuff result = function(*args, **kwargs) logger.debug(functi...
true
e79e6655aa9445578e9c96cf48060026cd56a24f
Python
PaulTomchik/MillionSongDataset_ETL
/etl-docker/scripts/JSON_to_CSV.py
UTF-8
990
2.828125
3
[]
no_license
#!/usr/bin/env python import os import csv import json # Based on code found here: http://stackoverflow.com/a/1872081 # For running on the host. PATH_TO_DIR = '../../data/projections/data_A/' # For using the docker container. # PATH_TO_DIR = '/data/projections/data_A' def convert_JSON_to_CSV (): fields = [ ...
true
0009f9213067c1a3db47813851e5fd9322fac9b1
Python
sohils/Catadioptric-Object-Detection
/hog_omni.py
UTF-8
2,292
2.703125
3
[]
no_license
import numpy as np import cv2 from matplotlib import pyplot as plt from scipy.interpolate import RectBivariateSpline # def get_omni_gradient(): # # Calculate gradient # gx = cv2.Sobel(im, cv2.CV_32F, 1, 0, ksize=1) # gy = cv2.Sobel(im, cv2.CV_32F, 0, 1, ksize=1) # mag, angle = cv2.cartToPolar(gx, gy...
true
e8a060ccc0c851b0168da47a74e0685d967ca8a0
Python
gobboo/MCsniperBOT
/database/users.py
UTF-8
2,632
2.640625
3
[]
no_license
from ast import literal_eval as make_tuple from database.postgres_handler import execute_sql from database.postgres_handler import query_sql """ Generic / Reusable Queries """ async def increment_column( table: str, column: str, amount: int, condition: str ) -> None: execute_sql(f"UPDATE {table} SET {column...
true
805e80d07f2eae3c33160d7d95e6d674797a54a1
Python
YiZheWangTw/VPythonTutorial
/03.等速度直線運動/3_1DMotion.py
UTF-8
1,292
3.65625
4
[]
no_license
""" VPython教學: 3.等速度直線運動 Ver. 1: 2018/2/18 Ver. 2: 2019/9/5 作者: 王一哲 """ from vpython import * """ 1. 參數設定, 設定變數及初始值 """ size = 0.1 # 木塊邊長 L = 1 # 地板長度 v = 0.03 # 木塊速度 t = 0 # 時間 dt = 0.01 # 時間間隔 """ 2. 畫面設定 """ scene = canvas(title="1D Motion", width=800, height=600, x=0, y=0, center=vec(...
true
c11000c8c130334f6c5153ba9b5d866f4a109ce9
Python
gmaze/argodmqc_owc
/ow_calibration/change_dates/cal2dec/cal2dec_test.py
UTF-8
2,236
3.390625
3
[]
no_license
""" -----cal2dec Test File----- Written by: Edward Small When: 26/09/2019 Contains unit tests to check functionality of the `cal2dec` function To run this test specifically, look at the documentation at: https://gitlab.noc.soton.ac.uk/edsmall/bodc-dmqc-python """ import unittest from ow_calibration.change_dates.cal...
true
abd36f4c899df2253c2c005d0b07894d8344e61d
Python
1zjz/Beam-Deflection-Visualiser
/Beam-Deflection-Visualiser-master/choice4.py
UTF-8
2,490
3.109375
3
[]
no_license
#--------------------------Initialization-------------------------------------------- import pandas as pd import numpy as np import os from display_menu import * #defining menu options to display save_menu_options= np.array(["Change Directory", "Stay in the current directory", ...
true