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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79c05d8170490158b9ea0ca5523b0acc7956115a | 071258f303a39c0bc5157b2aff6814246fce9f6a | /Utils/Data.py | 25785181fd5d48626abbcc1586468377f0921b7d | [] | no_license | zibrahim/KD-OP | 2ba0ce57f1c6e3f12dcaa5e96377e1ad9a646cd6 | 29ebb61c891d46e495ea33ce07cde3eee2734a50 | refs/heads/main | 2022-12-30T23:38:20.961068 | 2020-10-18T19:41:49 | 2020-10-18T19:41:49 | 305,126,244 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,768 | py | Data.py | from collections import Counter, defaultdict
import random
import numpy as np
import pandas as pd
from sklearn.preprocessing import MinMaxScaler
from sklearn.experimental import enable_iterative_imputer
from sklearn.impute import IterativeImputer
from sklearn.metrics import f1_score
import pandas as pd
#from kmeans_sm... |
9ee3a7d51d74cb4efe80b5f835e5141ed8f01167 | 475a988a5059dce21ecb56b6908152a076cb82ed | /d1/bubbleSort.py | 20dbcb2388c6012c738d9554314390ca7328a20b | [] | no_license | jeklen/algorithms | 7ea74ac49a9e55724a7884054bad644990b8ac6c | 509d8c4b3e9a9da7450068bf15ef94b276ab4c37 | refs/heads/master | 2021-01-18T16:49:37.209406 | 2017-10-19T00:30:02 | 2017-10-19T00:30:02 | 100,471,014 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 406 | py | bubbleSort.py | def bubbleSort(List):
flag = True
while(flag):
j = 0
flag = False
while j < (len(List) - 1):
if List[j] > List[j+1]:
List[j], List[j+1] = List[j+1], List[j]
j = j + 1
flag = True
else:
j = j + 1
... |
df39f2be94903e3296b533af7241d2f030bed621 | cabee2e6e11ab02009447eccda4fa2ee4f1bf58d | /scrape_sephora_to_live.py | e858b20a0d4e8c24c70a6cf27327f263323b61c9 | [] | no_license | ecnalyr/whats_new_scraper | 8be4c051efb2d830675e16000cf31463fb23fafd | 5f83cf134ed45f0e102f6207440715fdad369507 | refs/heads/master | 2020-03-30T17:11:02.531403 | 2013-02-03T02:03:45 | 2013-02-03T02:03:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,465 | py | scrape_sephora_to_live.py | from bs4 import BeautifulSoup
import urllib2
import re
import datetime
import json
from scraper_tools import soupify, getHtml, buildJsonPostRequest
__author__ = 'ecnalyr'
def stripTags(item):
"""Uses regex to remove xml tags from something
that can be turned into a string"""
stringVersion = str(item)
... |
498e2c71cfc805c1aaf1ef4ec261ce8e692f3ac7 | 9b312b61e0fa10a95159eca218a44b91b56ec454 | /lotteryProbability.py | cb8aacd09025164a9a7b602c0f6c650cb1138dae | [] | no_license | Jce1231/Dfes3work | 9814a45a169bab1f8f1be332655b55976bf859bc | 033dc01e6710208ec7c1bc0bed913091034dc5de | refs/heads/main | 2023-08-18T19:39:31.876155 | 2021-10-08T14:53:10 | 2021-10-08T14:53:10 | 409,536,533 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,776 | py | lotteryProbability.py | import random
#pdb.set_trace()
# Goal: “Create a lottery ball, or Hat,
#
# - that takes a variable number of arguments that specify the
# number of balls of each color that are in the hat.
#
# input 1 { red: 6, blue: 10, puce: 3}
# input 2 { mahogany: 5, teal: 23, saddlebrown: 40, mint_green: 1 }
#
class Hat():... |
e1c16486dd5072687c63faa55eddcfbcfc41bdd7 | 9ef1f17f00aaa68a0aa35e578173371a540e7ef6 | /model/module/grad_scaler.py | a0e0e19fb9a0293f3eb826d5990a28b2884a93d4 | [] | no_license | ufal/perin | e7cf7d743414d3d0aeb858f2a39bb6fe84be3789 | 7a98ba828d9f7ca18119d5f4d4c194643ec882b7 | refs/heads/main | 2023-07-05T11:27:21.590517 | 2021-10-05T13:13:23 | 2021-10-05T13:13:23 | 292,811,963 | 43 | 6 | null | 2021-03-21T23:38:38 | 2020-09-04T09:51:37 | Python | UTF-8 | Python | false | false | 755 | py | grad_scaler.py | #!/usr/bin/env python3
# conding=utf-8
#
# Copyright 2020 Institute of Formal and Applied Linguistics, Faculty of
# Mathematics and Physics, Charles University, Czech Republic.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
#... |
3987a725ce229a5ee7ba7faa9a271915bd9844e9 | 2829825dc7e4d118e37e76924af9355983b02283 | /src/abaqus/TableCollection/TableCollectionStep.py | 1fe1465329e54af0f8336a1aa38ec4ad45453a8d | [
"MIT"
] | permissive | haiiliin/pyabaqus | 99a841a3b68f3727eacde46b7224a1d1e453ca21 | ac102b854857961d957f35f5a0ac5f305193c5c8 | refs/heads/main | 2023-03-11T23:59:15.479591 | 2023-03-04T08:20:35 | 2023-03-04T08:20:35 | 441,457,233 | 34 | 15 | MIT | 2022-08-05T16:43:44 | 2021-12-24T12:12:13 | Python | UTF-8 | Python | false | false | 1,857 | py | TableCollectionStep.py | from ..Step.StepBase import StepBase
from ..TableCollection.ActivateElements import ActivateElements
class TableCollectionStep(StepBase):
"""The Step object stores the parameters that determine the context of the step. The Step
object is the abstract base type for other Step objects. The Step object has no ex... |
d527b58ae6b138e208c6819d34271087b9dda360 | 9481542dabc4559f5d8e84ceef20aa936c7d5a55 | /nn/test_nodes.py | 25ea111bf35c9a42b2577c88980c6b0f56426ee8 | [] | no_license | Arjuna-Menon/NYC-Property-Evaluation-Capstone-Project | 9e50c27a379c394fc0a90e48a1934001a6cb9f59 | f463f1533cb1824c023285d41e0414852137442f | refs/heads/master | 2020-07-04T22:37:32.212237 | 2019-08-15T00:31:51 | 2019-08-15T00:31:51 | 202,444,373 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,471 | py | test_nodes.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jul 29 14:36:39 2019
@author: mikaelapisanileal
"""
import pandas as pd
import numpy
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import MinMaxScaler
import tensorflow as tf
import matplotlib.pyplot as plt
import nump... |
8deec0900c7acb316b38e2ef81950d235dc39178 | b0b4d1af785433a05f10ed57bd6930c465b58310 | /objects/kodi/kodi.py | c59403f071fe7ed6431d8a743fbe9b6e5caf3f24 | [] | no_license | MediaBrowser/plugin.video.emby.objects | ef78b016be7a5dbcabdd4fce2ac6b8d9099b5d82 | 8a9e6738869065aaa77bb421631e881d2a8eefb0 | refs/heads/develop | 2021-06-26T00:33:02.742267 | 2020-11-06T19:51:23 | 2020-11-06T19:51:23 | 177,463,201 | 3 | 6 | null | 2020-11-06T20:25:58 | 2019-03-24T20:05:47 | Python | UTF-8 | Python | false | false | 9,334 | py | kodi.py | # -*- coding: utf-8 -*-
##################################################################################################
import logging
import xbmc
from objects.kodi import artwork, queries as QU
from helper import values
###########################################################################################... |
59b4ae5226bf6cc6b05f14dac0725c836620a76b | a12bb43ccfbacb623442be6c734635d8c1736c8c | /visualizers/visualizer.py | 04a71a50ad56f0ca48a31abf670b14cf225c3086 | [
"Apache-2.0",
"BSD-3-Clause",
"ISC",
"MIT",
"Python-2.0"
] | permissive | liuguoyou/deblur-devil | 5dec7bbb0d1b163a54b8e652a7b63496f7154739 | 53cc4c72a4ddb9dcede5ee52dc53000c39ff5dab | refs/heads/master | 2022-03-27T05:08:18.537752 | 2019-11-01T15:08:43 | 2019-11-01T15:08:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,481 | py | visualizer.py | # Author: Jochen Gast <jochen.gast@visinf.tu-darmstadt.de>
from torch import nn
# ------------------------------------------
# That is how a Visualizer looks like
# ------------------------------------------
class Visualizer(nn.Module):
# ------------------------------------------
# on epoch initialization
... |
1b5dbfa3918c753539bfb7ea217a2b3785717ae0 | 287c034569e0f22e6b1219b80dec6284f948e73c | /cogs/general/statistics.py | f8d36024cedfcbe51664c37c38210f78b2c3a206 | [] | no_license | mahilion/BroDiscordBot | d9a9d12297c19ae84189a5b8335b3ad20d00645b | d948bd88e8d8685401ed33d7abfe08851831845d | refs/heads/master | 2023-08-31T12:17:23.313931 | 2021-10-11T05:37:31 | 2021-10-11T05:37:31 | 385,578,454 | 0 | 0 | null | 2021-07-13T11:22:31 | 2021-07-13T11:22:31 | null | UTF-8 | Python | false | false | 9,570 | py | statistics.py | import discord
import nltk
from discord.ext import commands
from discord_slash import cog_ext, SlashContext
from discord_slash.utils import manage_commands
from config import stats_brief, COMMAND_PREFIX, ADDITIONAL_STOPWORDS
from base_logger import logger
from collections import Counter
from nltk.corpus import stopwor... |
fe5e82c0412f71edad3462a0a6f95055f0b43d29 | dab715664467f7bab83f7c7c78888c63f327971e | /users/urls.py | db2081320c735126086e238a4f99bf2d4c1c6314 | [
"MIT"
] | permissive | mfurga/web-password-manager | d9da542b646cc4269ecaba875c816ad9c99cff6e | 82bc35ae32d6fc89d2e2e37fad79c0e25f575edb | refs/heads/master | 2023-08-30T18:55:17.502864 | 2023-08-29T12:46:19 | 2023-08-29T12:46:19 | 156,667,319 | 4 | 4 | MIT | 2023-08-29T12:43:55 | 2018-11-08T07:30:35 | Python | UTF-8 | Python | false | false | 230 | py | urls.py | from django.urls import path
from users.views import SinginView, LogoutView
app_name = 'users'
urlpatterns = [
path('signin/', SinginView.as_view(), name='signin'),
path('logout/', LogoutView.as_view(), name='logout')
]
|
472e0df4f4157f99a089a3156f2d378ebc5792e8 | 4526d9af42bfde3434e123f45f433e9240c66b44 | /scripts/utilis.py | 6f5e6d397b9ed2a58e1ac56b6f5cf427044d0ed1 | [] | no_license | FloBys/python-novice | 76a39375029307ddef3c0d7928567269b768083c | cad6fdc0792bbbce000410a56782c1c5a9015ff9 | refs/heads/master | 2020-04-02T17:45:43.893993 | 2018-10-25T14:31:39 | 2018-10-25T14:31:39 | 154,670,851 | 0 | 1 | null | 2018-10-25T14:22:19 | 2018-10-25T12:55:28 | Python | UTF-8 | Python | false | false | 168 | py | utilis.py | def print_hey():
"""This function provides me a hello"""
print("hey")
def print_goodbye():
"""This function provides me a hello"""
print("goodbye") |
348a57f4747942212fffc84e5c15daf09a3edbdf | d59cc60e50d947d1b22ede2c834b407f65f30081 | /iris-flask-app/predict_app/app.py | d93d29587f9336f07e2e5bb71bacc308b7730623 | [] | no_license | midhun1998/ML-Flask-GUnicorn | 3078747262018148e48225e874611cd60375623b | 395647a5c3c3454b7836954fe94a8b8b3f1224b6 | refs/heads/master | 2022-12-23T22:08:42.574588 | 2020-10-05T08:31:04 | 2020-10-05T08:31:04 | 297,374,721 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 684 | py | app.py | import numpy as np
from flask import Flask, request, jsonify
import pickle
load_model = pickle.load(open('iris_model.pkl', 'rb'))
server = Flask(__name__)
@server.route('/',methods=['POST'])
def predict():
data = request.get_json(force=True)
predict_request=[[data['sepal_length'],data['sepal_width'],data['pe... |
7401f3c2c948d84468b152f12cc727b13563bb31 | fb2446e3069ad08fff13ed025dd79afce9413e90 | /writeList.py | 1901e0a4c23f985bdfb2da1d76eee4e16146c1be | [] | no_license | josenavarro-leadps/class-sample | 91f2ec2d9fdc81294dafe14f846c2020e3681e90 | 11dc46b819f0bef3b81fd4b504ffadf6bbf643c3 | refs/heads/master | 2021-01-21T04:47:17.365230 | 2016-06-13T06:21:49 | 2016-06-13T06:21:49 | 48,134,472 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 175 | py | writeList.py | myFile = open("numList.txt","w")
#createa list to write to my file
nums = range(1,501)
# write each item to thefile
for n in nums:
myFile.write(str(n) + '\n')
myFile.close()
|
b60acd715346c736fb4edbce2866173823b9cfdd | e47cc7689390dd58f49ade18472ced5d14f484fd | /pbxplore/analysis/clustering.py | 588bc446910092bad8d855b3dc58aa9b4a42dd66 | [
"MIT",
"CC-BY-4.0"
] | permissive | jbarnoud/PBxplore | 52ea3b38dfa031707b8b2dce60c772c5bbaa4d1e | ad588dc86a4fbd7259ec5f304851b6c99df29993 | refs/heads/master | 2020-04-05T23:27:04.565004 | 2016-04-08T14:33:52 | 2016-04-08T14:33:52 | 10,975,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,777 | py | clustering.py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function, absolute_import
# Standard module
import subprocess
import sys
# Third-party module
import numpy
# Local module
from . import utils
class RError(RuntimeError):
"""
Exception raised when something fails with a R script.
... |
8b059ff576ec15c9ccc98e190d76b5c28ff1cf87 | 747c476f9c3553a6c020163184d4d320711b180e | /app/migrations/0012_auto_20200422_1536.py | f7da456d2a3d716afb2940cec12a6bbe8da5e4ea | [] | no_license | rgienko/appealsMasterv2 | 4e90507c3aad99986aceb4ffe55c87da82c6d037 | 2cedf771ea879276c49f72d312b7a6b98d296520 | refs/heads/master | 2021-05-26T23:26:08.295357 | 2020-05-05T21:46:04 | 2020-05-05T21:46:04 | 254,177,679 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 585 | py | 0012_auto_20200422_1536.py | # Generated by Django 2.1.15 on 2020-04-22 20:36
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0011_auto_20200421_1536'),
]
operations = [
migrations.AlterField(
model_name='issue_master',
name='category... |
cc51b09ff1c963baa0c59e228e44a7e770799419 | cd03b4aeeee50b84f984fe748e71e442f0a25c98 | /replace_f0.py | 48fd2e268f544da9117f47a916647702132b3122 | [] | no_license | saikrishnarallabandi/Frame_Replacement | 84ca4182f81a2b96c391b5f730519cb9da3378cb | 85d3ee885c03364dc30be6836087c6a4ac9586a3 | refs/heads/master | 2021-01-23T12:52:42.999672 | 2017-10-11T16:12:39 | 2017-10-11T16:12:39 | 93,201,263 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 749 | py | replace_f0.py | #!/usr/bin/python
import numpy as np
import os
telugu_f0_frames = np.loadtxt("tamil_f0")
english_f0_frames = np.loadtxt("english_f0")
mu_telugu = np.mean(np.sort(telugu_f0_frames))
mu_english = np.mean(np.sort(english_f0_frames))
std_telugu = np.std(telugu_f0_frames)
std_english = np.std(english_f0_frames)
f0_fi... |
809c0e10d2f47e2a9a0d77942669e428c96636a6 | 588113cb4288d6b3137d96192442067da9d4672b | /athena-project/python/mdp_hack.py | 7b481162458a989881592137adae5f3551d4838a | [
"MIT"
] | permissive | gunalankarun/mobiLert | 38ab545872f8c50f8c4a195ba0cbc8973f4e921f | 31bdf7b4208d62b532f38e21ed1daa1454b70ba0 | refs/heads/master | 2021-01-19T20:18:47.371247 | 2016-08-17T21:11:51 | 2016-08-17T21:11:51 | 40,498,891 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 547 | py | mdp_hack.py | #!/usr/bin/python2.7
import numpy as np
from sklearn.decomposition.PCA import PCA
from sklearn.cluster.KMeans import KMeans
def processFFT(byteMe):
fftData = np.fft.fft(byteMe, 32)
Mean = fftData[0]
return(fftData, Mean)
def mPipelineTrain(xP, yP, zP):
pca = PCA(n_components=32)
data = np.array([... |
e50049d51ce395a49dd252ba67a47bf9fd3d7906 | 5ed6a0f060e2bb395e3ce6557a2f73176b22fbec | /recipe/tests/test_tag_api.py | b9e59ed454a9cbc13e7f9faf7ccf1ccdef413e9a | [
"MIT"
] | permissive | hadiforoughi/recipe-rest-API | f94b001c6fe1dc336403177680ce0bbada69e5b0 | cfa71dae74182eebca3fd391acc6911588e1ba63 | refs/heads/master | 2022-12-12T07:36:47.923217 | 2020-09-10T14:34:44 | 2020-09-10T14:34:44 | 292,679,576 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,153 | py | test_tag_api.py | from django.contrib.auth import get_user_model
from django.urls import reverse
from django.test import TestCase
from rest_framework import status
from rest_framework.test import APIClient
from core.models import Tag, Recipe
from recipe.serializers import TagSerializer
TAGS_URL = reverse('recipe:tag-list')
class Publ... |
17391c9d0e0ca2ab5fcf28007fd05b6cf0107d5a | 2f6196d1d6dca474dbf9305761e1f5f5503d6e5b | /problem/higgs/higgs_geant.py | 9fcdaed17da2a20c36031b791b9ba5baf8c9fc7f | [
"MIT"
] | permissive | victor-estrade/SystGradDescent | f3db6acc38a9e5a650982022c2d3cb22948f3d33 | 822e7094290301ec47a99433381a8d6406798aff | refs/heads/master | 2021-07-24T14:29:04.400644 | 2021-07-01T06:47:13 | 2021-07-01T06:47:13 | 174,348,429 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,573 | py | higgs_geant.py | # -*- coding: utf-8 -*-
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
import numpy as np
from datawarehouse import load_higgs
def load_data():
data = load_higgs() # Load the full dataset and return it as a pandas.DataFrame
data = handle_missing_... |
b4ee195e28f28e3c97492a4b8cd638cf1c9910ee | 2204bfd4c89766a9cf274e71697c840da74d1293 | /src/gocept/package/tests/test_doc.py | 5b9c9aadf479b4743d8bd50ed956b9cbcfb1685a | [
"ZPL-2.1",
"MIT"
] | permissive | gocept/gocept.package | 529b50fcec8ecbd0c6b1ada2dd1e5487da17a97c | 64d490d8909476cdc18fa025b9b1c701e27ab07c | refs/heads/master | 2020-12-03T14:38:11.970314 | 2019-04-01T12:13:08 | 2019-04-01T12:13:08 | 231,356,637 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,008 | py | test_doc.py | import gocept.package.doc
import gocept.testing.assertion
import os.path
import shutil
import subprocess
import sys
import tempfile
import unittest
class DocBuildEndtoend(unittest.TestCase, gocept.testing.assertion.Ellipsis):
def setUp(self):
self.tmpdir = tempfile.mkdtemp()
self.cwd = os.getcwd(... |
9b2cd34fd7ac5481c93550340eaaf4418ed5ce54 | b53fc2afc8fe498a0f15ec504a2898c4ab3c4a41 | /MBsandbox/mbmod_daily_oneflowline.py | 1f8429f5e3c05dd6c0f1b9a73a6a91766316cbe9 | [
"BSD-3-Clause"
] | permissive | pat-schmitt/massbalance-sandbox | f891929a9472cf410ca787d438bb6af030b3ac42 | 89e4a1877677caaa8399e921e8b506ba9b51dd3e | refs/heads/master | 2023-04-21T07:25:45.842828 | 2021-05-12T08:19:44 | 2021-05-12T08:19:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 84,043 | py | mbmod_daily_oneflowline.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Dec 24 12:28:37 2020
@author: lilianschuster
different temperature index mass balance types added that are working with the Huss flowlines
"""
# jax_true = True
# if jax_true:
# import jax.numpy as np
# import numpy as onp
# else: problem: nan ... |
44f011a5c2f2e4bc47bf72d2160d25d00c3e1906 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02957/s329649120.py | 340abd1275d9fa8508c9102d6dfb8a259133092e | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 107 | py | s329649120.py | a, b = map(int, input().split())
ans = a+b
if ans % 2:
print("IMPOSSIBLE")
else:
ans //= 2
print(ans) |
88394dfacc03d5cc17e8e52e89979e95e4d269fd | b441b1e868b8efef80149d14b1cf8438f49b8948 | /lab1task4.py | 665d20d832f61bc1bdf8dbb1af3de377dd43bd67 | [] | no_license | tatyanashashalina/Python-C | 24995669c0fd8e0ffb40c933645dd269731eb0a5 | e4f393c45be0ecb0da548b100c63da20d26b8d66 | refs/heads/master | 2023-02-07T10:47:57.073738 | 2020-12-28T17:45:08 | 2020-12-28T17:45:08 | 316,467,931 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,266 | py | lab1task4.py | # Написать программу, которая переводит рост из американской системы (футы, дюймы) в европейскую (сантиметры).
# Данные вводятся в виде двух целых чисел, выводятся в виде вещественного числа с точностью до 1 знака.
# 1 фут = 12 дюймов. 1 дюйм = 2.54 см
def int_r(num):
num = round(num*10 + (0.05 if num*10 > 0 else ... |
0def715c7e171937b8f99629200e4bc01e5e786d | c4bfd8ba4c4c0f21bd6a54a9131f0985a5a4fa56 | /crescent/resources/kinesis/stream_consumer/stream_consumer.py | 8a08cf7824875d3a321bcb33466d22debbd8726e | [
"Apache-2.0"
] | permissive | mpolatcan/crescent | 405936ec001002e88a8f62d73b0dc193bcd83010 | 2fd0b1b9b21613b5876a51fe8b5f9e3afbec1b67 | refs/heads/master | 2022-09-05T04:19:43.745557 | 2020-05-25T00:09:11 | 2020-05-25T00:09:11 | 244,903,370 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,128 | py | stream_consumer.py | from crescent.core import Resource
from crescent.functions import AnyFn
from crescent.resources.kinesis import StreamArn
from .constants import ResourceRequiredProperties
from typing import Union
class StreamConsumer(Resource):
__TYPE = "AWS::Kinesis::StreamConsumer"
def __init__(self, id: str):
supe... |
94704b9c147f3a9143b60983dd9cee6d37d72a02 | 6689c67620eaab900809c0cce761a9c046b389b3 | /Codechef/March Long/jain.py | 9201ed8639766f544f1c71e6ff141ee5ece7f76c | [] | no_license | manmeet17/Competitive-Coding | 33ecf0d56ca4a17c1adf6e96bbce69d40afe06cf | e161623eb5a4c4610663fadade6523b9ae87407d | refs/heads/master | 2020-12-30T14:44:26.708633 | 2019-05-24T12:49:30 | 2019-05-24T12:49:30 | 91,076,872 | 0 | 1 | null | 2017-10-28T19:19:32 | 2017-05-12T09:49:41 | C | UTF-8 | Python | false | false | 3,109 | py | jain.py | '''
aeiou
10010
11111
-----
01101
01101
11110
11111
e = 10010
X-e = 01101
We need to calculate submasks of (X-e)
submasks of X-e -
aeiu
11101 k=2
eiou
01111
aeiou
11111
eiu
01101
10010
00001
[a,e,i,o,u]
[2,2,2,2,1]
'''
from collections import defaultdict
h = {
'11111': [],
'00001': ['00011', '00101', ... |
12a8f1400ebb04da3b802f7f0e8e2bcbcd861acf | 16a6f23911e093abe72fa617c28ff5db58054eba | /test.py | f49ae9af060750e3307f05ee59069af387ddbebc | [] | no_license | wennho/gazetracker | f364935386f42e9c07b267aabbf2a174a76889c7 | 50263498739ab74811ebe3399b8b5364d4320a24 | refs/heads/master | 2021-01-01T18:22:41.483572 | 2014-03-20T03:51:23 | 2014-03-20T03:51:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,145 | py | test.py | import numpy as np
import cv2
from subprocess import check_call
import pdb
cap = cv2.VideoCapture(0)
# print cap.get(cv2.cv.CV_CAP_PROP_FRAME_WIDTH)
# print cap.get(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT)
cap.set(cv2.cv.CV_CAP_PROP_FRAME_WIDTH, 640)
cap.set(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT, 480)
# check_call('v4l2-ctl --set-... |
c63f6317b270bd5cf2db154db4f8df9fc80eb099 | 9834875740c6fa5218dd26a75b12a8fbc2ed39d2 | /study/curso-em-video/exercises/013.py | d4cd3b1550e78ba9ed1b72cb1ab9a62c9b03886e | [
"MIT"
] | permissive | jhonatanmaia/python | 802dcde7964b6672903a6bb1c4e34cf64f21e9be | d53c64e6bab598c7e85813fd3f107c6f23c1fc46 | refs/heads/main | 2023-01-19T05:49:14.749716 | 2020-11-26T19:50:19 | 2020-11-26T19:50:19 | 302,282,292 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 117 | py | 013.py | n11=float(input('Digite o salario do funcionario: '))
print('O salario com 15% de aumento fica: {}'.format(n11*1.15)) |
7b9d8d7eceec1816e2404533497cf660311e3a37 | a4466ab8f446bfaf8327cf46b37f6e2675c1e14f | /pychemia/code/abinit/output.py | b80f8800f70475cf058840102d8f8312a5da307c | [
"MIT"
] | permissive | zeledon14/PyChemia | e0865792d29370db4e54f3b8a96b769161a7bdf3 | cbc78b7bac6b22b8e811de7b889e0ece7b26442e | refs/heads/master | 2021-01-16T22:55:01.475156 | 2016-06-10T16:32:11 | 2016-06-10T16:32:11 | 60,863,455 | 1 | 0 | null | 2016-06-10T16:54:52 | 2016-06-10T16:54:51 | null | UTF-8 | Python | false | false | 3,084 | py | output.py | import re
import os
import numpy as np
from scipy.io import netcdf_file
class AbinitOutput:
def __init__(self, filename='abinit.out'):
self.filename = filename
rf = open(self.filename)
self.data = rf.read()
def reload(self):
rf = open(self.filename)
self.data = rf.rea... |
a974fb5dd4188d0241475c5ed8d5f6d576e962f7 | 70c68c114ced059f530cf1feb922d7db47cb542f | /word2vec.py | 0d6647083f111f947e9ef4d70b4721ad514e580b | [] | no_license | xsongx/DeepNLP | 6d7e05713ab0db61b1e1f8702b596bb21a97a4e1 | f6c37a0758336071fa34f09fc24ddca3fe8cee62 | refs/heads/master | 2021-07-11T03:27:41.175388 | 2017-10-09T02:59:01 | 2017-10-09T02:59:01 | 106,501,831 | 1 | 0 | null | 2017-10-11T03:37:50 | 2017-10-11T03:37:50 | null | UTF-8 | Python | false | false | 2,761 | py | word2vec.py | # -*- coding: UTF-8 -*-
import tensorflow as tf
import numpy as np
import math
from transform_data_w2v import TransformDataW2V
class Word2Vec:
def __init__(self, output, batch_size=128, skip_window=1, embed_size=100,dict_path='corpus/emr_ner_dict.utf8',
num_sampled=64, steps=25000):
self.output =... |
729d69db49b9227f3b1f7f8c64180220b6d1d955 | 49e048412ddd0bbb0470117bef4d2e7807169c92 | /selfpass.py | 4d5d929ad19661827003e70b201ef5aa884f7515 | [] | no_license | ALSchwalm/selfpass | ac1ee77c787d1fb7375dff950d7baf978cf9939f | 4cf30c5778bb529dbcc92daef136aa9459dcc274 | refs/heads/master | 2020-04-17T17:21:14.227193 | 2016-10-09T21:44:07 | 2016-10-09T21:44:07 | 66,176,277 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 615 | py | selfpass.py | import threading
from selfpass.store import Store
from selfpass.crypto import generate_key_pair
from selfpass.external import run as run_external
from selfpass.management import run as run_management
def main():
db = Store("test.db")
# generate initial keys if necessary
if not db.have_server_keys():
... |
2d68eb7d8519fe18de0202c95617f185d8d4ade0 | 9655094a0d593574e9e07de681251999d574fb5e | /blog/migrations/0002_auto_20160606_1625.py | d4e55500dc7ccbbe52d933ba8ba041dbe39f7eef | [] | no_license | zhouhao777/DjangoBlog | ed47eb22f36da11cccd426711aad10f390c28e6c | 358e6d30a2a7d260114dc52844bec9b1cfab990f | refs/heads/master | 2021-01-17T01:55:27.472954 | 2016-06-06T17:15:26 | 2016-06-06T17:15:26 | 59,953,369 | 0 | 0 | null | 2016-06-06T16:18:33 | 2016-05-29T16:36:45 | CSS | UTF-8 | Python | false | false | 3,378 | py | 0002_auto_20160606_1625.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('blog', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='art... |
01ea105b876bb65fa466ff4ec610db822a198366 | ed7fde0483a4836bfc9ef3ab887cf1220559bfc7 | /phd/C2_parse_kraken_output_1.py | 93797dfbacccba336e04bded97dd8c128bda67b8 | [] | no_license | cizydorczyk/python_scripts | 326b3142a3c6ce850237e8b13e229854699c6359 | b914dcff60727bbfaa2b32e1a634ca9ca354eeeb | refs/heads/master | 2023-05-11T14:29:44.548144 | 2023-05-05T19:39:28 | 2023-05-05T19:39:28 | 116,588,201 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 630 | py | C2_parse_kraken_output_1.py | import argparse
parser = argparse.ArgumentParser()
parser.add_argument("input_kraken_output", help="file to parse")
parser.add_argument("parsed_kraken_file", help="parsed file ready to be input to krona")
args = parser.parse_args()
output_lines = []
with open(args.input_kraken_output, 'r') as infile:
for line i... |
88181579adb7d018b8f4fdb5c6b15e0165938c24 | cf15fd1a437677421f42fe33c03cc85933b5d426 | /src/dtdseg.py | f5db26a18a3692f0b47b1cca1cdbd27666b4c071 | [
"MIT"
] | permissive | CSAILVision/NetDissect | 7df3321e96f64ec4436e24b00ef4b6d9f48bd509 | 20ce6f887607aadc04ab9fb3d452e4723685cbbb | refs/heads/release1 | 2023-08-20T10:31:57.226803 | 2018-01-19T00:30:36 | 2018-01-19T00:30:36 | 89,392,815 | 496 | 134 | MIT | 2018-06-04T05:04:49 | 2017-04-25T18:19:56 | Python | UTF-8 | Python | false | false | 2,034 | py | dtdseg.py | import os
import numpy
import colorname
from loadseg import AbstractSegmentation
from scipy.misc import imread
class DtdSegmentation(AbstractSegmentation):
def __init__(self, directory=None):
directory = os.path.expanduser(directory)
self.directory = directory
with open(os.path.join(directo... |
03144f133469518d351b538c10c7fdf3d2843b4a | 50dd2a43daa8316fc11e0c176b5872738fcc5dde | /Learning/130_Fluent_Python/fp2-utf8/freeinteractive/freeinteractive 81.py | bc1cca3ea7eb745d34a8e831b0342d8e892ee998 | [] | no_license | FrenchBear/Python | 58204d368e3e72071eef298ff00d06ff51bd7914 | b41ab4b6a59ee9e145ef2cd887a5fe306973962b | refs/heads/master | 2023-08-31T18:43:37.792427 | 2023-08-26T15:53:20 | 2023-08-26T15:53:20 | 124,466,047 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 121 | py | freeinteractive 81.py | >>> l1 = [3, [55, 44], (7, 8, 9)]
>>> l2 = list(l1)
>>> l2
[3, [55, 44], (7, 8, 9)]
>>> l2 == l1
True
>>> l2 is l1
False
|
4cd8463fff13de32c1ec658c86928c94da66fcb6 | 9ea10f2fec05cb784d9234d693f8ddc239bfaef3 | /core/modeleprevision.py | f2084de1bd903e3656b62ab2120954a91633773d | [] | no_license | sebromon/libhydro | fdd21f7d5e4f525dadf7e158618d738d4370034d | ca8e7c5957e5bb31cdbb55fb8b800c04ebd94f45 | refs/heads/master | 2020-06-12T10:14:49.737591 | 2019-03-15T13:39:21 | 2019-03-15T13:39:21 | 194,268,571 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,628 | py | modeleprevision.py | # -*- coding: utf-8 -*-
"""Module modeleprevision.
Ce module contient une seule classe:
#Modeleprevision
"""
#-- imports -------------------------------------------------------------------
from __future__ import (
unicode_literals as _unicode_literals,
absolute_import as _absolute_import,
division as ... |
24f53f9b9bc2f30ecd71538510e6204d77a368d7 | 8e2e250dbb83237a901f67a358f05de84e9d0402 | /weekly_materials/Lecture04_Manipulating_Plotting_2DArrays/tests/q3_1e.py | 97861f4779c6e32083578e3927510c176d157564 | [] | no_license | praveer08/cogneuro-connector | 005f7c9aff2ec7964cf54fca03a4668b5c61863b | 0b4895114a328591bc7103c41cb9e9e8b4b0be92 | refs/heads/master | 2021-01-25T14:22:17.314926 | 2018-02-27T21:59:59 | 2018-02-27T21:59:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 738 | py | q3_1e.py | test = {
'name': '1E',
'points': 1,
'suites': [
{
'cases': [
{
'code': r"""
>>> # It seems like you may have not yet created the name 'ts_means',
>>> # which is required in order for this cell to be graded prop... |
d8a783a93e17b383ca45379036652a4bb1ad41a5 | 40749c58d842936782a24b18342eedd3c934cf19 | /ex4/exercise_3.py | 19fd4d259649fefbad10a6ad91f14c1364cbadce | [] | no_license | misch/nlp | 815052682a5de2a974331921b5d03fcf23626008 | 5af7941fba85fecd534548a41bcdfd9a5d5074dd | refs/heads/master | 2020-06-06T09:19:10.505086 | 2014-05-19T21:20:07 | 2014-05-19T21:20:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,220 | py | exercise_3.py | #!/usr/bin/python
import re
import collections
import matplotlib.pyplot as plt
import numpy as np
##############
# Parse file #
##############
word_expression = re.compile("<?/?[a-zA-Z.,]+>?")
f = open('input_ex3.txt','r')
initial_split = word_expression.findall(f.read())
f.close()
words = []
# filter out the "<...... |
e037a1a911e50d25354ce031ee875d82e2a5f686 | b996364ba8b6dacdfaa614c3f6a51f99aed27bba | /NDF/main/admin.py | 45cb82115dd53d09dbec38d23ca0d7264172021a | [] | no_license | AayushAg13/sslProject | bb6a65f1e277b1632c1df4f9b7c3322c930a4da4 | 3fcb5a6486d4c641ea43234345d990e52f299e74 | refs/heads/master | 2021-05-15T09:29:00.291370 | 2018-04-27T12:44:03 | 2018-04-27T12:44:03 | 108,135,980 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 554 | py | admin.py | from django.contrib import admin
from main.models import *
admin.site.register(Faculty)
admin.site.register(Student)
admin.site.register(Stud_Faculty_Status)
admin.site.register(Caretaker)
admin.site.register(Warden)
admin.site.register(Assistant_registrar)
admin.site.register(HOD)
admin.site.register(CC)
admin.site.r... |
5e3b0ceb17c654fbf1b7e62bf29e39b0f3afb712 | ee1f31e9f6b740dde6ac21d9514344c1175c415d | /Analisis de Sistemas Lineales/Documentacion/reforzamiento_2.py | 4772e3ac301c736c7f4dc6feb14a337f58019cd0 | [] | no_license | DotPin/INFO290 | f8561c1fef579d17b068765df68f7a9ffcd543e0 | 48eefaa89a46ecac1644a41ec00ba7d9a81e01b1 | refs/heads/master | 2023-04-03T00:49:22.418917 | 2021-03-31T21:56:56 | 2021-03-31T21:56:56 | 353,183,543 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,465 | py | reforzamiento_2.py | def suma(lst,lst1): # a = 1"_"2"_"3"_"4"_"5
ln = len(lst) # b = 6"_"7"_"8"_"9"_"0
n1 = ""
n2 = ""
rst = ""
print(lst)
print(lst1)
for i in range (ln):
if lst[i] != " ":
n1 = n1 + lst[i]
n2 = n2 + lst1[i]
else:
n1 = int(n1)
n2 = int(n2)
rst = rst + (" ") + str(n1 + n2) + (" ")
n1 = ""
... |
607fc97c4520c7f54ee44e768776ceae2b70c378 | 08ddd083ac36216b9ae1d82a49991a137dc8e551 | /flaskserver.py | 4ffa9e0c7ca95ebb710e668fbec7d73affcd1140 | [] | no_license | KushalP1/SnapCrop-flaskserver | 525ad8d9f8a8e912489ccb948800a2ec546220f0 | acae20938ad233abe11f38f54cc781a72396a509 | refs/heads/master | 2021-05-02T12:59:21.693745 | 2018-02-08T11:14:49 | 2018-02-08T11:14:49 | 120,751,123 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,871 | py | flaskserver.py | import os
from flask import Flask
from flask import request
result=""
app = Flask(__name__)
@app.route('/postjson', methods = ['POST'])
def postJsonHandler():
global result
#print (request.is_json)
content = request.get_json()
#print (content)
#print ("true")
#print (content["encode"])
#p... |
247e352b7772a1da74a26f007228355f5af8d3b3 | 772225f5442ead6c184793a5808f1326429aafcf | /printingLcs.py | a401bbf63e7cd45f30129140f1dcf6319ff21017 | [] | no_license | ashish-5209/Dynamic-Programming | 918c69b413ecdc165579c9ac9528927b33b65ec8 | e0e08564d90d78d9ba9f8db45a77ac392c92ab94 | refs/heads/master | 2020-12-10T20:00:46.525431 | 2020-01-13T21:17:55 | 2020-01-13T21:17:55 | 233,695,156 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 662 | py | printingLcs.py | def lcs(X, Y, m, n):
dp = [[0]*(n+1) for i in range(m+1)]
for i in range(1,m+1):
for j in range(1,n+1):
if X[i-1] == Y[j-1]:
dp[i][j] = 1 + dp[i-1][j-1]
else:
dp[i][j] = max(dp[i-1][j], dp[i][j-1])
index = dp[m][n]
s = ""
... |
5ac4dd62d8e56c7baf38f9fe9f8b4a5034f1cb80 | e664e34055684db5ac4632a2d014a83ccd1576fe | /Python/SubtreeOfAnotherTree/SubtreeOfAnotherTree.py | 38637e646ba96270d73735db871ac20c07d67d08 | [] | no_license | Phoenix-Z/LeetCode | d30091ac21c99864146add7cf02291a51aef4947 | 2b0d3ab4c7c1b74d75e674c5139c446f121f1ac1 | refs/heads/master | 2020-12-05T23:06:01.941306 | 2017-07-19T06:35:01 | 2017-07-19T06:35:01 | 67,194,653 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 742 | py | SubtreeOfAnotherTree.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):
# (119ms)
def isSubtree(self, s, t):
"""
:type s: TreeNode
:type t: TreeNode
:rtype: bool... |
daccc5aafb3e250e7fa7ac9db69a147b7e916736 | cd98bbac1975aa190826041f8436b539f9f70f6e | /task5.py | 768be018b5cdd822260704f15d9d933718a70185 | [] | no_license | k1lv1n/comp_math | 6f60732b703db95a3adfaf0c84dbde4a929d27e8 | b67e98f5a17eee594b893cd316e1e3a4f8e9bffe | refs/heads/main | 2023-03-12T18:53:32.942951 | 2021-02-09T12:04:26 | 2021-02-09T12:04:26 | 307,295,579 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,771 | py | task5.py | import numpy as np
import matplotlib.pyplot as plt
def f(x:float,y:np.ndarray) -> np.ndarray:
"""
Работает с вектором { y , y'}
"""
# return some function result
return np.array([y[1], np.sqrt(abs(-np.exp(y[1])*y[0] + 2.71*y[0]**2/np.log(x)+1/x**2))])
# return np.array([y[1], -y[0]... |
18b43ea8696e2e54f4c1cbbece4cde1fd3130145 | fa76cf45d7bf4ed533e5a776ecd52cea15da8c90 | /robotframework-ls/src/robotframework_ls/server_api/server.py | cbbaddf1362bd9468a12ddabbc85e50b746512db | [
"Apache-2.0"
] | permissive | martinRenou/robotframework-lsp | 8a5d63b7cc7d320c9fed2372a79c8c6772d6481e | 5f23b7374139e83d0aa1ebd30675e762d7a0db86 | refs/heads/master | 2023-08-18T22:26:01.386975 | 2021-10-25T13:46:11 | 2021-10-25T13:46:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 29,295 | py | server.py | from robocorp_ls_core.python_ls import PythonLanguageServer
from robocorp_ls_core.basic import overrides
from robocorp_ls_core.robotframework_log import get_logger
from typing import Optional, List, Dict
from robocorp_ls_core.protocols import IConfig, IMonitor, ITestInfoTypedDict, IWorkspace
from functools import parti... |
6ad36f2b115c822a50a38e88a8d7d524fc5b045b | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03730/s994878709.py | c35749796ff48fa0408557467ee1e2d973b56d95 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 120 | py | s994878709.py | a,b,c=map(int,input().split())
frag='NO'
for i in range(b-1):
if (i+1)*a%b==c:
frag='YES'
break
print(frag)
|
02182f0379e58b64bbe17cc5f433e8aae7814976 | e8a53a50411b1e815c716b0a25230013522407e8 | /app/web/__init__.py | 0c164a14f6bd2e4090c6a1188f563657dbee7d0b | [] | no_license | SuperTotoroOS/flask-demo-01 | 1397f083b0f01ed7de42e59c64dcbd6675219d7a | e4a0be87af5609cf712ca1287e46020532410953 | refs/heads/master | 2020-08-10T08:30:45.257006 | 2019-10-24T07:45:30 | 2019-10-24T07:45:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 139 | py | __init__.py | from flask import Blueprint
web = Blueprint('web', __name__)
from app.web import auth
from app.web import user
from app.web import book
|
074defa92c8bc5afc221c9c19842d808fbf1e112 | b516bf8a0a93267082b5530192914938517b454c | /18-ahorcado.py | a566c3e079f175210673a953bb89dea622bf72f8 | [] | no_license | JavierSLX/Python-Platzi | be92f2daea64a638c3f668c314551bbf6c6d65e8 | adefe72c67d32dd46d73ba1a414e4745267af90c | refs/heads/master | 2022-12-05T06:04:41.103830 | 2019-09-01T23:30:45 | 2019-09-01T23:30:45 | 204,742,460 | 0 | 1 | null | 2022-11-29T13:31:46 | 2019-08-27T16:17:21 | Python | UTF-8 | Python | false | false | 2,270 | py | 18-ahorcado.py | # -*- coding: utf-8 -*-
import random
IMAGES = ['''
+---+
| |
|
|
|
|
=========''', '''
+---+
| |
O |
|
|
|
=========''', '''
+---+
| |
O |
| |
|
|
=========''', '''
... |
c879230efe12bde9042159da221a2b9b4c1d8349 | 26c12a2790cf2ff121d249a6ca8ac25e8c6b2da5 | /CNN/fastText/test.py | 64425e56df10559c928848bf29951d2d0f6be2c1 | [] | no_license | JeffWang3/Fine-grained_SA | a5cd249420821574193413fbcda571b6afac8286 | 1327524b8f9b48dba980a089dbe74a7f91888012 | refs/heads/master | 2021-09-27T19:57:48.822162 | 2018-11-11T08:23:08 | 2018-11-11T08:23:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,465 | py | test.py | #-*- coding: utf-8 -*-
import re
import sys
import os
import pandas as pd
import jieba
import logging
import argparse
from sklearn.externals import joblib
from sklearn.svm import SVC
from sklearn.naive_bayes import MultinomialNB
from sklearn.metrics import f1_score,accuracy_score
from sklearn.feature_extraction.text im... |
7525691ece4fe66bb175e470db3ac78f701e3730 | 5f79f653985fb61b5176bb0d9053aed3e9885fc7 | /app.py | 9ad7eb929e4823f8f1905a5c14468755d9f26040 | [] | no_license | tdhv/store | b1ddf9371f3fde73ba65a38eed16d8584466a4e1 | 96d6a586737ce8b77febd619c65ebd0936ac23cd | refs/heads/master | 2020-03-22T04:17:19.693540 | 2018-07-03T18:05:20 | 2018-07-03T18:05:20 | 139,487,622 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,064 | py | app.py | # create item based on name using post method, get specific item or list of items using get method, update item using put and delete item using del method.
import os
from flask import Flask
from flask_restful import Api
from flask_jwt import JWT, timedelta
from security import authenticate, identity
from resources.us... |
6b0b6f80d009311e07097925b17fa197e917226e | a4e0ececd5e55d67af59fd262ab4673b55998912 | /mantisshrimp/core/__init__.py | 9b883ad4c09e45c9a53847dc365ed7ff8622c7d6 | [
"Apache-2.0"
] | permissive | JCustin/mantisshrimp | 4f7d76eaf412c9b3a2ab3c8e726010c889ee366e | af24828515258e068da22d2e95412081385af710 | refs/heads/master | 2022-11-21T08:13:53.370185 | 2020-07-27T14:55:45 | 2020-07-27T14:55:45 | 283,005,733 | 0 | 0 | null | 2020-07-27T20:14:02 | 2020-07-27T20:14:01 | null | UTF-8 | Python | false | false | 155 | py | __init__.py | from mantisshrimp.core.id_map import *
from mantisshrimp.core.class_map import *
from mantisshrimp.core.mask import *
from mantisshrimp.core.bbox import *
|
4589a3e4c67b9c89d7ab7a78b3e1584280c36002 | 36a5929605d8b8854f0afc54afc3319face5594a | /code/week3/visualize_detections.py | 0e408840ca63fb737f5a903559139a7fa93b1961 | [] | no_license | mcv-m6-video/mcv-m6-2019-team6 | e42fe9c208a6721271fcdb023874e22b1d000f04 | f0b1966913bae5f5de904104811b0c24d533ee79 | refs/heads/master | 2020-04-25T10:16:04.905022 | 2019-04-17T07:48:15 | 2019-04-17T07:48:15 | 172,702,967 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,352 | py | visualize_detections.py | import numpy as np
import cv2
import pickle
from coco_class_names import class_names
import argparse
import os
import random
from utils import read_xml_annotations
parser = argparse.ArgumentParser()
parser.add_argument('--video_dir', type=str, default='../datasets/AICity_data/train/S03/c010/vdo.avi',help='')
parser... |
8db2d00fc65a6a950e95c96a4d0928c658751530 | afb5200ad2f6a7b786ac8a048c5c9f0ff5ba4391 | /10b.py | 17cfb503096cdb2b68624ffa2d4adf3d4d2f7b8b | [
"BSD-3-Clause"
] | permissive | znuxor/adventofcode2017 | 3863c9e15490cd1eac964f57de767c7f1f81c4c8 | 79d0df07f24ea8d2793df3b1c853a85b760791c1 | refs/heads/master | 2021-09-01T05:52:06.602025 | 2017-12-25T06:48:24 | 2017-12-25T06:48:24 | 112,811,599 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,675 | py | 10b.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import numpy as np
from collections import defaultdict
with open('10a_data.txt', 'r') as problem_input:
data_input_text = list(problem_input.read())[:-1]
# data_input_text = ""
# data_input_text = "AoC 2017"
# data_input_text = "1,2,3"
# data_input_te... |
4e03ff5414fb844cb64753333cd1dd92049e658b | 330dbbefb2e7d6283c812888c89e58498f0b4188 | /_Dist/NeuralNetworks/_Tests/AutoNN/Test.py | 49a4eaa115554709fed1bc7649bd99be6f95be9e | [
"MIT"
] | permissive | leoatchina/MachineLearning | 93dd3e6c91911f5743617dde1873bf60493171a2 | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | refs/heads/master | 2023-04-23T02:36:36.809015 | 2021-04-29T15:06:00 | 2021-04-29T15:06:00 | 286,432,406 | 0 | 1 | MIT | 2020-08-10T09:30:34 | 2020-08-10T09:30:34 | null | UTF-8 | Python | false | false | 421 | py | Test.py | import os
import sys
root_path = os.path.abspath("../../../../")
if root_path not in sys.path:
sys.path.append(root_path)
from _Dist.NeuralNetworks.f_AutoNN.NN import AutoAdvanced
AutoAdvanced(
"Adult",
model_param_settings={"n_epoch": 3},
data_info={"file_type": "csv", "data_folder": "../_Data"}
).f... |
ec39bcbd0a1da8abdbbaab3ebd3d5e996f9b1b3b | 494fc35b2dbe5705bdf81e6b5d2615d1198c8559 | /TrackerAlignment/scripts/mergesteer.py | d807655f5c62ff6719086270a8ee7b799a6e39db | [
"Apache-2.0"
] | permissive | shadowbehindthebread/Offline | 36f71913ac789b9381db5143b0fc0bd7349c155e | 57b5055641a4c626a695f3d83237c79758956b6a | refs/heads/master | 2022-11-05T17:44:25.761755 | 2020-06-15T18:07:16 | 2020-06-15T18:07:16 | 273,599,835 | 1 | 0 | Apache-2.0 | 2020-06-19T22:48:25 | 2020-06-19T22:48:24 | null | UTF-8 | Python | false | false | 1,043 | py | mergesteer.py | import sys
# merge steering files into one where
# all input files (.bin) are included
def main():
files=sys.argv[1:]
file_lines=[]
nlines = -1
for filename in files:
with open(filename, 'r') as f:
lines = f.readlines()
if nlines == -1:
nlines = len(lin... |
571cd9d254adb6b25b6e42ef2c8ed95c3d1d3c58 | 6b3de1872534f3ac1470892b3b00ce767c2efd4c | /Movie_Reviews/training.py | 5679d48ce4928f160fb07fdc9b280474ce7f4198 | [] | no_license | anu2kool/NLP_Projects | 7f954c3fd6283c24bccb111178a3ad4d85f45eed | 9526cc58b8f5707c5b0a97e473be5a99653d8278 | refs/heads/master | 2023-08-03T16:43:12.423721 | 2021-09-25T18:11:14 | 2021-09-25T18:11:14 | 410,348,042 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,323 | py | training.py | import pandas as pd
data=pd.read_csv('Train.csv')
texts=list(data['text'])[:6000]
labels=list(data['label'])[:6000]
import re
import nltk
from nltk.corpus import stopwords
from nltk.stem.porter import PorterStemmer
from nltk.stem import WordNetLemmatizer
ps=PorterStemmer()
corpus=[]
for i in range(len(texts)):
... |
b528f78362754b352912dcdeea1e3df8412a76a4 | 098aedade8fc1abf6d8c1f802083d3bbe2ce2b52 | /main.py | 0afbcef50ccc7de8e740111526d1ebb1241d1ea3 | [
"BSD-3-Clause"
] | permissive | regro/conda-forge-sparta | 6bd3bf24c85668bc68f826180a0055895bd2f1f3 | 1d55095a931da893507037f1bcc696ad3ed94bae | refs/heads/master | 2022-12-02T06:34:45.658498 | 2020-08-14T23:04:59 | 2020-08-14T23:04:59 | 287,547,167 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,938 | py | main.py | import os
import requests
import threading
import gc
from fastapi import FastAPI, HTTPException
from fastapi.responses import RedirectResponse
# https://stackoverflow.com/questions/12435211/python-threading-timer-repeat-function-every-n-seconds
def setInterval(interval):
def decorator(function):
def wrap... |
fd7cca0d6c86e708208a1d54f85b1c86bac9293d | 65ca528fbb4f5ed5d62806b6225c861dcf420084 | /list.py | a4066f197904caebba72f6607b7da092da11a257 | [] | no_license | pradeepganesamoorthy/python-basics | 35bb3b7ac4fb382089f91cad7935f146760b4503 | a0ac602d48167c72e3d6b85fd652d1893ba511dc | refs/heads/main | 2023-03-09T06:23:47.410073 | 2021-03-03T05:28:45 | 2021-03-03T05:28:45 | 342,138,970 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,376 | py | list.py |
"""LENGTH"""
List1 = [1, 4, 5, 7, 8]
print "Length of the list", len(List1)
counter =0
for i in List1:
counter = counter + 1
print "Length of the list using loop:",counter
"""DELETE ELEMENTS"""
#del List1[1:3]
List1.remove(1)
List1.remove(5)
print "Removed list", List1
#Merge
List1 = [1, 4, 5, 7, 8]
List2 ... |
a37820cff7f55fd1fb6ef9684a8191664b29610a | 41f6a4c13e85dc75318a6d8fba8e3f5908da156a | /upload_and_publish_from_geojson.py | 6b5235cb53d517526e6daa126644a391d7a754a2 | [] | no_license | jeffgaucho/TWC-Esri | 439ea49afd12c95daf5ad7c4ddc5ba4a55c115dd | 0bb0fbca67760c4d788212d47b47eafeef733139 | refs/heads/master | 2021-04-09T12:02:37.059128 | 2018-03-27T13:37:58 | 2018-03-27T13:37:58 | 125,545,243 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 906 | py | upload_and_publish_from_geojson.py | from arcgis.gis import GIS
from getpass import getpass
# i'm using the `getpass` library here but you can hard-code your u/p if you like
username = getpass('Username: ')
password = getpass()
arcgis_url = 'https://www.arcgis.com'
# create your `gis` instance
gis = GIS(arcgis_url, username, password)
# where is the i... |
70ab232c4a15c07051fcd5264e5b0156a89a5901 | ba4399bae083700b322ed089cb66f5293a413085 | /train.py | a56bf5665f3d0438b04fd0817797eb5cb3a8454f | [] | no_license | ahernandez105/armyDataChallenge2020 | 7272f8bc25e34a5801cf0e0e2a99015cbb13d244 | 492e90ab1ce61c87edf23889afe0807434b66e46 | refs/heads/main | 2023-04-15T08:15:15.492704 | 2021-05-03T16:46:27 | 2021-05-03T16:46:27 | 352,460,414 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,774 | py | train.py | import argparse
import enum
import os
import logging
import re
import sys
from datetime import datetime
from math import ceil
from pathlib import Path
from progress.bar import IncrementalBar
import torch
from torch import storage
from torch.utils.data import DataLoader
import torch.nn as nn
import models
from models ... |
7dba4b7f931a77c0b7df34b367785ae10dc2cdf5 | 44fc0ac30126992f2ca9aebfb30d3206ac375f1f | /src/main/python/salary.py | 3ac2ba2825df1807fd16cfce1ad88f56863b9629 | [
"MIT"
] | permissive | newinone/mis500_m1 | 5d1757b91da29eaae893d0d740d2247ebedd4bc0 | 7e01ee89d9a5febfa7308bc238a12b31a8436fff | refs/heads/master | 2020-04-22T01:33:04.050330 | 2019-02-21T00:30:25 | 2019-02-21T00:30:25 | 170,017,658 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 908 | py | salary.py | SALARY_RAISE_FACTOR = 0.05
STATE_CODE_MAP = {'WA': 'Washington', 'TX': 'Texas'}
# This is the beginning of the script
class Salary:
def update_employee_record(rec):
old_sal = rec['salary']
new_sal = old_sal * (1 + SALARY_RAISE_FACTOR)
rec['salary'] = new_sal
state_code = rec['stat... |
780d96c4b8bdc04f556454128033da64129cf553 | 7a6e60fdfca1abf0881612f1d8eaf1d4aaef3db3 | /preproc.py | 22adffe44ce131be1edf57e511f9dc151823908a | [] | no_license | robert-tien/pachira | a355875a898919c454081a14f071d7e9ff9709b4 | e97ecbedf6a3eab55e76a626271a866db361c6c5 | refs/heads/master | 2020-12-24T06:03:34.964637 | 2016-11-09T01:23:44 | 2016-11-09T01:23:44 | 73,232,770 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 375 | py | preproc.py | #! /usr/bin/env python
import pdb
import tensorflow as tf
import numpy as np
import os
import time
import datetime
import data_helpers
# Load data
print("Loading data...")
#pdb.set_trace()
x_text, y = data_helpers.load_data_and_labels()
dictionary = data_helpers.build_dict(x_text)
res = []
for sent in x_text:
res... |
b126869927fb5d80b4c72fe04b6f405481c84dc2 | cdf7cfe0d9e3c7be83ce021cd2a33736ffa3209b | /main.py | 04c9d58f0922233422f0b67b28acc3490fd058a4 | [] | no_license | zyining/MovieQA_benchmark | 9a6fc822c545cb3cb0dd22706cb0519b591048cd | e6d8ba9e47e25373f9e6a59aa3a4ca5100a40cbb | refs/heads/master | 2021-06-10T05:37:49.691241 | 2017-01-16T01:04:23 | 2017-01-16T01:04:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,005 | py | main.py | import MovieQA
from src.tfidf import TfIdf
from src.htmloutput import HtmlOutput
import datetime
import logging
import math
import nltk
import numpy as np
from sklearn.metrics.pairwise import cosine_similarity
from scipy import sparse
import tensorflow as tf
# TODO: Perform Cross Validation
# TODO: Plot a histogram ... |
520459a4ad928576e410b1276a2944733b302495 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03285/s221888511.py | 6047ed76113807a805f83ce797da85a4c36c2e7a | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 220 | py | s221888511.py | import sys
n = int(sys.stdin.readline().rstrip("\n"))
l = [False]*101
for a in range(26):
for b in range(15):
if 0<(4*a+7*b)<=100:
l[4*a+7*b] = True
if l[n]:
print('Yes')
else:
print('No') |
f1496700d9504ded72808d910e220f48fd70b0c9 | f5de163623c0e1f2207104a69fea499b2d4b3948 | /nikola/utils.py | 24addc845f812f76e0185f785c1177d819eaa2f0 | [
"MIT"
] | permissive | getnikola/nikola | cbc233706ebd52fe76bc14b2ff3c5a7c27678275 | 2b10e9952bac5a1119e6845c7a2c28273aca9775 | refs/heads/master | 2023-09-03T12:52:22.617757 | 2023-08-05T19:24:18 | 2023-08-05T19:24:18 | 4,025,121 | 2,142 | 467 | MIT | 2023-09-13T12:38:11 | 2012-04-14T13:53:22 | Python | UTF-8 | Python | false | false | 79,106 | py | utils.py | # -*- coding: utf-8 -*-
# Copyright © 2012-2023 Roberto Alsina and others.
# Permission is hereby granted, free of charge, to any
# person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the
# Software without restriction, including without limitation
# the rights t... |
42d4f2596498996122edcc26702caf548d72c70c | 636ec7f0044b0de409108979b85b54f1e39bc454 | /app/migrations/0005_room_description.py | 3f16eca27a7b85389910f80d01fe197e085d0109 | [] | no_license | facevedom/QRAccess | 88951903840b22ce04f93b7e563a3cc52c2cd5f8 | f8c2be149be24b91f975c21c8e708fe64233bd7f | refs/heads/master | 2021-03-19T08:52:51.355654 | 2017-06-08T16:11:25 | 2017-06-08T16:11:25 | 82,941,404 | 0 | 0 | null | 2017-03-09T19:54:45 | 2017-02-23T15:32:31 | HTML | UTF-8 | Python | false | false | 476 | py | 0005_room_description.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-08 03:49
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0004_auto_20170307_2157'),
]
operations = [
migrations.AddField(
... |
7f4880c17901c8f552f7116e5cd39b8712f18c86 | 1ea6c65225f873cb73646b9e3d99ef3940ae95a3 | /adapters/tests/test_brokerAdapter.py | 74bed0e9ad82e767471ac0b3bcb22f1281a9a483 | [] | no_license | Kirkirillka/GPS_Tracker | 6e20af30801276f9a2c999cc32ef65d8243b1201 | 3be441c1362d9f652d1fc35cba84645282b8ac55 | refs/heads/master | 2022-04-08T08:16:28.061294 | 2020-03-19T14:45:39 | 2020-03-19T14:45:39 | 217,415,943 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,648 | py | test_brokerAdapter.py | from unittest import TestCase
from adapters import MQTTBrokerAdapter
class TestBrokerAdapter(TestCase):
TOPICS = {
"one/two/three": lambda x, y, z: print(x, y, z),
}
def test_get_topics(self):
"""
Test get_topics() returns exactly the same topic list
:return:
... |
4c9697f1ab6e2a6305fb4a3f5696af1d3d1e17d3 | 7006c4907c0c7418b8894f824d1cc823984cdc8b | /app/main/views.py | 3ed7dd733785798478280b0e759ad1cfead64c0f | [] | no_license | Wall-Street/Hospital | ed02d8eeb77f8bc5a20bae11e0797c4891d63f9a | 4e1ff967753279d0b1058211b505bb50f0d305a6 | refs/heads/master | 2020-04-01T20:49:59.673685 | 2019-10-07T09:11:05 | 2019-10-07T09:11:05 | 153,622,808 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,883 | py | views.py | # 主业务逻辑中的视图和路由的定义
from flask import render_template, request, session,redirect
from sqlalchemy import or_ , and_
# 导入蓝图程序,用于构建路由
from . import main
# 导入db,用于操作数据库
from .. import db
# 导入实体类,用于操作数据库
from ..models import *
import os
import time
import datetime
@main.before_app_first_request
def first():
... |
24157958b672dbd939c074b944beb62ed6c32e79 | e9d9d424bb1fa7d25327f73b91f4db9e56d39c19 | /CostOptimization.py | 5b494aeded69127ae12d651f44c57104698e2b7c | [] | no_license | sumirk/AWSCostOptimization | de933048651ae96aecaa97f80217f30582fe0eae | 40601a958d88e49c41dbd9dc341760adc3d7b6fc | refs/heads/main | 2023-08-23T01:29:24.648265 | 2021-09-12T10:56:37 | 2021-09-12T10:56:37 | 394,873,709 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,537 | py | CostOptimization.py | import json
import boto3
import botocore
from pprint import pprint
import pandas as pd
import os
from os import path
from datetime import datetime
import numpy as np
import argparse
import uuid
parser = argparse.ArgumentParser()
parser.add_argument('--months',
dest='months',
h... |
d41411428eac71a4f30db61583475ead6771e62b | bffa6838f709cdaaef9db30395bc9ce373e6970c | /kerasplotlib/traininglog.py | 40992f29b2f1691585b5466582e8f075af15e227 | [
"MIT"
] | permissive | autonomio/kerasplotlib | c4960e3034ec0210ef47fd8ed723dad2517edf52 | 12ccc3045420d7e4de77d62b55e55564c17775e2 | refs/heads/master | 2022-05-20T10:12:17.259576 | 2022-04-14T19:50:50 | 2022-04-14T19:50:50 | 140,093,354 | 10 | 1 | MIT | 2022-01-26T19:05:32 | 2018-07-07T14:57:52 | Python | UTF-8 | Python | false | false | 2,634 | py | traininglog.py | from tensorflow.keras.callbacks import Callback
class TrainingLog(Callback):
def __init__(self,
figsize=None,
cell_size=(6, 4),
dynamic_x_axis=False,
max_cols=2,
y_max=1,
metrics=None):
self.figsize... |
010c6b1b80f3841e7b8c7d9d175179a7650efd85 | 7ae4667ddc78e8a5193deb3b11dc7f103f69aa29 | /plot_nJet_fractions.py | 6c7bae1464b5b608e7cbcef7573399248138928e | [] | no_license | kimmokal/susyDNN | fd686ced38a58dd0f3d0917db4d36d0fb44bd459 | 04f00c584f6c16425b336caa8fbbf2a4f19536ac | refs/heads/master | 2023-04-13T04:56:36.701850 | 2020-07-22T11:10:49 | 2020-07-22T11:10:49 | 193,734,443 | 1 | 1 | null | 2023-03-24T23:40:51 | 2019-06-25T15:25:43 | Python | UTF-8 | Python | false | false | 2,573 | py | plot_nJet_fractions.py | import numpy as np
import pandas as pd
import root_numpy
import root_pandas
import random
import matplotlib.pyplot as plt
# Local library
# For saving purposes, the sample names are encoded in the files as numbers
import utilities_parametric as u
# Path to the working directory and the output directory
work_dir = '/w... |
407f2b0dfddb530e4daf1a1213f1f9ef6b158228 | 35c52909c58ba64816f6403ce6529f9ab702cbe1 | /sougou_pic/mzitu.py | 5a869030852c02eddc568e05d013271229c69ef0 | [] | no_license | zzf7720/spider | 7021d5825131ed600dc8ad9a78e51a662b971d1f | ce8f42aa18330a482ef91f3176e8a217645f26a6 | refs/heads/master | 2022-11-18T21:16:18.463644 | 2020-07-15T02:28:04 | 2020-07-15T02:28:04 | 271,770,606 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,832 | py | mzitu.py | import requests
import queue
from lxml import etree
from threading import Thread
import time
import random
import json
from fake_useragent import UserAgent
class Mzitu(object):
def __init__(self):
self.base_url = 'https://www.mzitu.com/page/{}'
self.page_url_queue = queue.Queue()
self.det... |
ba7e13b98dab8ff160d07926f287a012f791f6e4 | d6cb702fd36f83824b597075a51271660fa9cf5d | /qrlibs/FileHandle.py | b0b5225ac45d1fc0aa21b5b4a1be887cf6e64ecb | [] | no_license | sivaCode/RPiQR | 1fd5e7cc5debe751809f5c9b059afec239d68b1c | 97ccf4c537a8c8f477df058293d13b12cafd4700 | refs/heads/master | 2021-01-01T03:32:39.015447 | 2016-04-13T04:24:13 | 2016-04-13T04:24:13 | 56,115,267 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,451 | py | FileHandle.py | __author__ = 'siva'
import os
import sys
import time
import csv
import threading
import signal
import datetime
import subprocess
def getParentPath():
return os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
def createPath(sPath) :
if not os.path.exists(sPath) :
os.makedirs(sPath)
else ... |
32944bc2793a8d567b97c77cee4bb0208bdcf84d | 7346b696da2a4f2c6848cc973f1fccf9c2a4a3d9 | /constants.py | ad7e1e2cf3711bde0a348907aecbbdd565108d3c | [] | no_license | DrunkCynicalUnicorn/OC_P3 | da98584adb3bba0dfc6d579d71dc2672a1bd34b2 | 8abcf8e886d6aea931af3f9d8641179a89ddcffc | refs/heads/master | 2020-03-29T19:42:04.586790 | 2018-10-20T11:02:03 | 2018-10-20T11:02:03 | 150,276,642 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 983 | py | constants.py | SPRITE_SIZE = 40
NUM_SPRITE = 15
WINDOW_WIDTH = SPRITE_SIZE * NUM_SPRITE
WINDOW_HEIGHT = WINDOW_WIDTH + SPRITE_SIZE
maze_structure = "maze_structure.txt"
mac_sprite = "resources/player.png"
guardian_sprite = "resources/guardian.png"
blood_sprite = "resources/blood.png"
wall_sprite = "resources/wall.png"
floor_sprit... |
dd34c7a6d8b02af0ea4ce4fa3dab99be3b5da9cf | cb0894c8b8b7cbb4cab3681e06d4b63187ab7a0a | /Assignments/Module03/SupportCode/Framework-3-PyTorch.py | 3253452989021e03267c7567700d9a74e8210334 | [] | no_license | abhijit10m/MachineLearningCourse | e1304aecc9f79ac150a9610e7ed756ccc4ae6ef6 | a0caf38de649ea453eae5695a02931b4167797c6 | refs/heads/main | 2023-03-29T11:15:58.017932 | 2021-03-23T16:06:55 | 2021-03-23T16:06:55 | 310,378,945 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,524 | py | Framework-3-PyTorch.py | import MachineLearningCourse.MLProjectSupport.Blink.BlinkDataset as BlinkDataset
(xRaw, yRaw) = BlinkDataset.LoadRawData()
import MachineLearningCourse.MLUtilities.Data.Sample as Sample
import MachineLearningCourse.Assignments.Module03.SupportCode.BlinkFeaturize as BlinkFeaturize
(xTrainRaw, yTrain, xValidateRaw, yV... |
e8121be9ab2dd4ee47aa27eed521a21ab74967d9 | 065e05c4b737f44b4208b11126fde51832b75b9a | /data_structure/single_cycle_link_list.py | b368441e7793b7ec83b05e28467166369c681fe5 | [] | no_license | FSwordArt/python-learn | 8adb0b9807cee19b16c2e2e1ecf3715a83471f7c | 71c9e1673f9f0985e0125cdfd29ff80e83547437 | refs/heads/master | 2022-12-04T15:41:08.384259 | 2020-08-15T03:32:39 | 2020-08-15T03:32:39 | 287,670,219 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,599 | py | single_cycle_link_list.py | #coding = utf-8
'''单向循环链表'''
class Node(object):
def __init__(self, item):
self.elem = item
self.next = None
class SingleCycleLinkList(object):
def __init__(self, node=None):
self.__head = node
if node:
node.next = node
def is_empty(self):
"""链表是否为空"""
... |
d4f4d9100a2ea5d2a3dad31bccebaa0632ef3f37 | 3e63259ddb208078a3c78a0887caa89ee1082548 | /smtm.py | 4e44477797e479e724d48ad1c16eb3dd873aa080 | [] | no_license | brunoseivam/smtm | 8701687603f7310f229e12992b4668d731f7f895 | 4523cf483e598678ded253986cc08003165a1b4f | refs/heads/master | 2016-08-04T21:08:04.125371 | 2014-12-15T03:35:31 | 2014-12-15T03:35:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,244 | py | smtm.py | import sys
sys.path.insert(0, 'lib')
import flask
from flask.ext import restful
from flask.ext.restful import reqparse
from functools import wraps
from google.appengine.api import users
from google.appengine.ext import ndb
import datetime
app = flask.Flask(__name__)
api = restful.Api(app)
class Message:
ERR_NOT_... |
56f09b389a7a792c880657216b13ea3d0f59ad52 | 20ed5d29189cc61f0aceb01c69d097cf036c764e | /week4.py | 1fb0095c5a7f168c91b287529de9b957fb1de7e2 | [] | no_license | dayoungl/sva-ixd-hello-world-2022 | 3c51b9d80a67a450429720db0983b6cca96f84c9 | e635df2368d8ec99ca1e22337bced00d5240b742 | refs/heads/main | 2023-01-14T02:47:23.342819 | 2020-11-18T19:04:00 | 2020-11-18T19:04:00 | 303,881,950 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,082 | py | week4.py | #Week 4 Assignment
#Sharon Lee
#dlee71@sva.edu
import random
#variables
numberOfBags = 0
departureTime = 7
departure = str(departureTime)
#an object describing our player
gamePlayer = {
"name" : raw_input("Your Name: "),
"location" : "home",
}
#Input Info
destination = raw_input("Destination: ")
airline= ra... |
76c95050b58a186e9ceba889a97cf4c0112d1fc8 | 5c61990fc1a79f389111a3e449c1fadf65fc1b8c | /portnet_invoicing/wizards/account_change_code/account_change_code_wizard.py | e866535ab000bec67a000778ba163e52e4623c18 | [] | no_license | brahim94/portnet | 3befb64009fd014b74e01151cc429a613d3d2f11 | f1120ce4806ba2fd7e26132ca918d1ce8b9ad32c | refs/heads/master | 2023-04-14T07:17:40.956207 | 2021-04-27T16:37:48 | 2021-04-27T16:37:48 | 356,211,308 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 464 | py | account_change_code_wizard.py | # -*- encoding: utf-8 -*-
from openerp import models, fields, api, exceptions, _
import datetime
import os
class account_change_code_wizard(models.TransientModel):
_name = 'account.change.code.wizard'
@api.multi
def action_change(self):
accounts = self.env['account.account'].search([('id','in',se... |
8811a48d856926050a2ff18514247689d087cef8 | e2d311bc7115a6022a099cce6e4b63ccaf0c24b2 | /tests/test_blockexplorer.py | e0862bcf8ae0c60d42dfe816657423c07209c852 | [
"MIT"
] | permissive | 84adam/blockstream | a33fa68875141ae4a50caa87ea8db417c9549c9e | 4795794851beb909338b25185df1aa31aab71847 | refs/heads/master | 2021-07-16T00:26:14.995140 | 2020-09-04T14:34:11 | 2020-09-04T14:34:11 | 205,158,136 | 0 | 0 | MIT | 2019-08-29T12:24:20 | 2019-08-29T12:24:20 | null | UTF-8 | Python | false | false | 2,110 | py | test_blockexplorer.py | import unittest
from blockstream import blockexplorer, util
from blockstream.blockexplorer import (
Block, BlockStatus, Transaction, Mempool, MempoolRecent, Mempool,
Address, TransactionMerkleProof, TransactionOutput, TransactionStatus
)
class UtilTests(unittest.TestCase):
"""
Tests for util.py
""... |
8cdcfb3753e1b9ade412779f3d0f61f497fd37b8 | ce317077cd36e8c2b4fc94621b7efb1aa605de3e | /setup.py | fdcf8f617cb5c3111b1c3752c059237614f68f2c | [
"MIT"
] | permissive | quantum5/purge-static | caab7f8994b231ab5fa6d5065c7044b06e8c99eb | 02b8a57f42926a19d39810f9f61784e232b4282c | refs/heads/master | 2022-02-11T08:02:42.115862 | 2022-01-28T03:31:32 | 2022-01-28T03:31:32 | 160,268,683 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,566 | py | setup.py | import os
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as f:
long_description = f.read()
setup(
name='purge-static',
version='0.2.0',
packages=find_packages(),
entry_points={
'console_scripts': [
'purge-static = p... |
d188ab129e799e3f1bcde392710a87a02276669e | 06a50c3f425423bc054a585e563e92cc7e5db007 | /EPAM_python_tests/bin/prepare_env.py | 72024d5363f7655b4c2512a7129c665496d2c857 | [] | no_license | eugene-marchenko/pycharm | a4ee1729ef84510603902c128adb12ca67ab060c | c141873342e3c7a3e9f224e856cf1046ef2197eb | refs/heads/master | 2021-07-06T20:34:48.722600 | 2020-09-12T16:48:46 | 2020-09-12T16:48:46 | 31,311,149 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 258 | py | prepare_env.py | from classes.fs_operations import FSOperations
'''
Prepare environment
'''
FSOperations().delete_files()
FSOperations().create_files(5)
FSOperations().get_file_permission()
FSOperations().change_file_permissions(0777)
FSOperations().get_file_permission()
|
7308a3ab958c028e53d8cab266a7fb65cafaa65a | 4388d0bc20e216ba2887109caf20145eb5d8b3d5 | /app/urls.py | e9dfa7e494a70833b4c75d46460ef3ec499195d4 | [] | no_license | obinnamaduabum/nigeria_locations_api | 33532f28edf9206752ef1ae340aa3d0de80cb28a | c1771ff7da6d6674e10f8404a1f1018f6ea03c40 | refs/heads/master | 2023-07-14T21:06:46.169105 | 2021-08-25T10:14:00 | 2021-08-25T10:14:00 | 399,370,360 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,146 | py | urls.py | """app URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based vie... |
000be2e77c9ca8504414fd0ecabac7d3381106ce | 399cd83eb04e5938922eb0bbbe65b3c769a46f40 | /Autocorrect-Algorithm/doc_edit.py | 4a7a8ff0c5b40ad774c35556d08fd8e382326ae1 | [] | no_license | naverill/COMP20007-Design-of-Algorithms | 41ee241b4b8af86d7dba15c4063d6d7ecdea8891 | 3ca1ce75383d280a170eb5bdf439a673bfd9903e | refs/heads/master | 2020-03-19T08:54:00.565812 | 2018-06-17T04:54:53 | 2018-06-17T04:54:53 | 136,243,546 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,536 | py | doc_edit.py | """
Python Script to format text documents such that they can be loaded into
Document data structure and parsed by the Autocorrect Algorithm
Required format:
- single word per line
- no punctuation/special characters
- lowercase letters
"""
import shutil
import os
import sys
from os import listdir
from os import path
... |
131735a3c68f569b6978fe996f196d5a50a56262 | 83d98de1341185d98d1753a70d58188b92d52ada | /3-Technical Indicators/renko.py | 937085c4888867ce56b1cbcf59505ef61598df79 | [] | no_license | krishnakaushik25/algo_trading-python | 097589fe1627ad8f305e34a74cfa95d34c32dc57 | 4ce1c0dfd30297fbbab66c20af8bbb93a8f0d569 | refs/heads/main | 2023-08-04T12:30:13.006466 | 2021-09-16T15:10:41 | 2021-09-16T15:10:41 | 407,210,367 | 0 | 0 | null | 2021-09-16T15:06:59 | 2021-09-16T15:06:47 | null | UTF-8 | Python | false | false | 1,856 | py | renko.py | # =============================================================================
# Import OHLCV data and transform it to Renko
# Author : Mayank Rasu (http://rasuquant.com/wp/)
# Please report bug/issues in the Q&A section
# =============================================================================
# Import ... |
33ae67330db90622990047f81d41a1797a98c849 | b7ea6d83fc5da576728df7b840e108cb45ab4dcc | /src/bot/config.py | 8af45d1ea0322ec286bca5f4cc93c688452ff7b5 | [
"MIT"
] | permissive | proyecto-chaucha/bot-template | c7c46454f4c51096e5da5964820c837d22ccaa48 | f7b011b88d21cb59e9aabf1bf8065723af396cee | refs/heads/master | 2020-03-08T16:03:40.220956 | 2018-05-20T00:20:59 | 2018-05-20T00:20:59 | 128,229,221 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 716 | py | config.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from os import environ
from sys import exit
from envparse import env
environment = env.str('BOT_ENV', default='').strip()
# Optional Keys
debug = env.bool('BOT_DEBUG_MODE', default=False)
logger_level = env.str('BOT_LOGGER_LEVEL', default='debug')
name = env.str('BOT_NA... |
5efdd1ada67873e3f99b43aeddb8f3f72bdc25d1 | c7644f32855785c8c1cb4b8ba00ab1732991f691 | /11 - Classes/class_definitions/new_invoice.py | 456844b328fed00175330d1f754dbe60d89c54b4 | [] | no_license | Babkock/python | 6036212b52e989bb10eccd998b7e099cc58521a6 | 73272e448aabf2171c38c5adce1fa19d42009ea9 | refs/heads/master | 2020-07-09T12:53:42.588387 | 2019-12-06T22:55:59 | 2019-12-06T22:55:59 | 203,972,994 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,715 | py | new_invoice.py | #!/usr/bin/python3
"""
Tanner Babcock
November 6, 2019
Module 11, topic 1: More Classes
"""
class Customer:
# Constructor
def __init__(self, cid=1, lname="Test", fname="Test", phone="555-555-5555", address="5 Example Dr.\nExample, CA"):
if (isinstance(cid, int) != True) and (isinstance(cid, float) != T... |
071559e816e1681e549b65af98fcca6a6434702c | bdf9b4e1e501a6173f9ae0e0866bd962024e8653 | /Machine Learning in Action/Support Vector Machine/SVM/SVM.py | ffc4957e43d03e0beb3cbf13dd7d520c8dffc464 | [] | no_license | taojianrong/Machine-Learning | 5d5121e6939f00535c59d196beb0250ba1b65a83 | 3c7eb1a140b4baf6285134e2714f548964e05b96 | refs/heads/master | 2016-09-12T15:55:56.128420 | 2016-04-26T14:06:19 | 2016-04-26T14:06:19 | 57,132,489 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 30 | py | SVM.py | __author__ = 'taojianrong'
|
fe92be3338d626759827764728f5dcc46f2a5775 | 889ce77b4c2355552fde01d86ff7c7938730f088 | /custom_components/heating_radiator/test/HassFacadeStub.py | b4243f72f531a977bacbf7ae4cdef11d94e2af4d | [] | no_license | yanoosh/home-assistant-heating-radiator | 09ab0024164a35899601a4d7eb4bbcf64d05c0ec | 35611063af2f04287f727de8d4bd40564d0b2842 | refs/heads/master | 2023-01-05T23:11:30.001483 | 2023-01-03T16:43:49 | 2023-01-03T16:43:49 | 239,871,368 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 769 | py | HassFacadeStub.py | from typing import List, Optional
from unittest.mock import MagicMock
from homeassistant.core import State
from custom_components.heating_radiator.HassFacade import HassFacade
class HassFacadeStub(HassFacade):
def __init__(self):
self.states = {}
self.actions = {}
self.condition = {}
... |
3b162821dcc557bb08362e49eb9eb8005a896c58 | 936b7c3a40d21797ef30e1febd9f123cfc0d2a3c | /proxy/plugins/tokenpass.py | 2630943ff9e90b930f2d5536b16fdc093a381198 | [] | no_license | BILDQUADRAT/playbackpro-timecode | 7f858f1ea712506598b1129e35b2d03b6de82f07 | ca4be65a64cffac77b6771c45855a9543f8844ba | refs/heads/master | 2020-04-05T23:28:38.207767 | 2017-01-06T15:06:22 | 2017-01-06T15:06:22 | 70,197,058 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 239 | py | tokenpass.py | #!/env/python3
from websockify.token_plugins import BasePlugin
class TokenPassPlugin(BasePlugin):
def lookup(self, token):
params = token.split(':')
if len(params) == 2:
return params
return None
|
3395330d65eb52c1dcbb36ca64acab148d589398 | 48fd93d1fa13aa3e47ca72724164c1bd61391bde | /Drata 0.1.py | 8c94d574e6c52f44b4662ce3a90ebe290a0b20fa | [] | no_license | Adiprogrammer7/Drata-0.1 | 2672e5d8f561dbf998486bca1a8b4165b4c72c7d | 6bec454cf516d042128e10fad25fdff654233403 | refs/heads/master | 2020-04-05T15:07:16.837101 | 2019-05-18T04:24:52 | 2019-05-18T04:24:52 | 156,953,727 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,347 | py | Drata 0.1.py | import pygame
import random
import time
pygame.init() #essential to initialize pygame first.
# game audio setup(wav format of audio works best in pygame)
crash_effect = pygame.mixer.Sound('crash_effect.wav')
pygame.mixer.music.load('background_music.wav') #with music you need to load it too.
# we set ... |
866177407a03e4ae7fcc300752f87cc62ba8d84e | e4507c39b25cbfbed0dbc45fecdb0880235cf164 | /accounts/urls.py | dbaeb69b79fa2251d450c283bf9838ae891bee24 | [] | no_license | Brian-Rojas/RedditClone | 63ab99eacb5db6622b9ffa91303aedd3be35c382 | 29fe04a53a466d6db13727f33afa44d4a0cfb64d | refs/heads/master | 2020-03-10T13:39:02.427999 | 2018-05-27T17:06:14 | 2018-05-27T17:06:14 | 129,404,807 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 259 | py | urls.py | from django.urls import path
from . import views as accView
app_name = 'accounts'
urlpatterns = [
path('signup/', accView.signup, name='signup'),
path('login/', accView.login, name='login'),
path('logout/', accView.logoutView, name='logout'),
]
|
d4badb007f627107850dfe710bb081c5da08ad0d | 16e212e659ca4c962bd2af8acfdb25392f5b00f6 | /linear_regression/main.py | 164919254480053ae81e483ddadf3844f1b0f2b4 | [] | no_license | nubol23/video-animations | d1ce645faf75011425bc1955c113ea65ce655911 | f5acd49baeaac187759502528a6a9604c736a365 | refs/heads/master | 2023-07-09T04:29:30.150508 | 2021-07-27T17:56:42 | 2021-07-27T17:56:42 | 387,668,311 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,657 | py | main.py | from manimlib import *
import numpy as np
from typing import Tuple
def normal_formula(X, Y):
return np.linalg.inv(X.T @ X) @ X.T @ Y
def create_axes(x_range, y_range, height=6, width=10):
axes = Axes(x_range=x_range,
y_range=y_range,
height=height,
width=width... |
ea6ce47db706752f94826aedf8cfd8bf933fd5d7 | 8b035b3c7e2a852953bcffda12b8749c8de3a80e | /Exercícios/Exercícios Mundo 1/ex004.py | 007ce34c0b93665adb55a09444c3fcef8f2fa299 | [
"MIT"
] | permissive | JoaoPedroBarros/exercicios-antigos-de-python | 5f48f20391537c47ea85f1a3a30a7f1c1f96344e | 3094874a36937de3af4ab2d4417b2b371c7c2638 | refs/heads/master | 2022-12-09T21:56:02.678794 | 2020-09-10T02:53:16 | 2020-09-10T02:53:16 | 294,285,024 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 66 | py | ex004.py | n = input('Digite algo:')
print('\033[7;36;40m',type(n),'\033[m')
|
b5042999da8e1b6c576b2cde73052d2d1572460b | 38fe174ce34dcb3e2fd7a11a181aaefc08364d1d | /tests/test_truenth.py | cb9d849b1e7089449e76f08e6f396bba1114ab58 | [
"BSD-3-Clause"
] | permissive | pep8speaks/true_nth_usa_portal | dd226b9924bbe37b243b44f4f8ddc4ac1b7ef9dc | 622e90f54692c6fc9c84468f489ab6f297af0feb | refs/heads/master | 2020-03-23T22:34:36.404913 | 2018-07-13T20:21:36 | 2018-07-13T20:21:36 | 142,183,432 | 1 | 0 | BSD-3-Clause | 2018-07-24T16:13:28 | 2018-07-24T16:13:27 | null | UTF-8 | Python | false | false | 867 | py | test_truenth.py | import sys
import pytest
from tests import FIRST_NAME, LAST_NAME, TestCase
if sys.version_info.major > 2:
pytest.skip(msg="not yet ported to python3", allow_module_level=True)
class TestTrueNTH(TestCase):
def test_portal_wrapper_html(self):
self.login()
rv = self.client.get('/api/portal-wrap... |
092222a8f235637113ee410e9386e2c2ee94a80f | caa446146d9b5a4a4f3ca8b621b03d11eb4489a6 | /q03_split_country/build.py | e2eed1bdb16f4225746c3bd46587aac29cb0b999 | [] | no_license | bhushan45/olympics_project | 062dfec4d25fd7db1916fec37a07693c8a0473cb | 72a14ae4440c0d134b040ad04103945a3414a0ec | refs/heads/master | 2021-04-27T00:14:30.757305 | 2018-03-04T10:30:08 | 2018-03-04T10:30:08 | 123,776,472 | 0 | 0 | null | 2018-03-04T10:04:14 | 2018-03-04T10:04:14 | null | UTF-8 | Python | false | false | 610 | py | build.py | import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from greyatomlib.olympics_project.q02_rename_columns.build import q02_rename_columns
def q03_summer_gold_medals(path):
"write your solution here"
df = q02_rename_columns(path)
country_cols=pd.DataFrame (
... |
20b6690371bf5eb27201b31d7a3f7ed7e292c10f | 208b539204fb7bf33979c27c312772a84fa23c2c | /tests/utils.py | 4a2d50d43aba655c58802b4e31c5bc992131f9c1 | [
"BSD-3-Clause"
] | permissive | strogo/wagtailvideos | bc95f7f9e8eb780affb47ec736b391ee3afe4849 | 287c5fb6a43fd081c20c0b947585680cdef1c2c7 | refs/heads/master | 2023-03-05T07:10:57.615815 | 2021-02-16T23:07:04 | 2021-02-16T23:07:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 358 | py | utils.py | import os
from django.core.files import File
import tests
def create_test_video_file():
video_file = open(os.path.join(tests.__path__[0], 'small.mp4'), 'rb')
return File(video_file, name='small.mp4')
def create_test_vtt_file():
vtt_file = open(os.path.join(tests.__path__[0], 'small.vtt'), 'rb')
re... |
44d47a2c659ddd6465db855b784c537dac91f61a | fb36db0543e8425bc4811d1ac71a0ba09852072d | /ceil.py | 6554ec154005203c61c2458ae36da8286c3540ef | [] | no_license | Isaac2/Analisis_Dis_Cons_Software | b20dc1121f7b331ce9d23aa7509de989c86e8723 | f71aacc579d98a8404445b5503e0d5a936990293 | refs/heads/master | 2023-04-17T11:49:37.301104 | 2021-03-10T10:51:22 | 2021-03-10T10:51:22 | 344,302,663 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 377 | py | ceil.py | import math
def runTest(value):
try:
result = math.ceil(value)
print(result)
except:
print("An error has ocurred")
#Right B I C E P tests
runTest(15.000000000001)
runTest(15.999999999999)
runTest(15.05)
runTest(15 + .05)
runTest(15.05 + 1 - 1)
runTest("15.05")
runTest(-15.05)
runTest(-... |
ac4325bfd7e096e499229554d7e0b3f0423068c5 | b0eced53250bb56c15862f093ddfd4ee4252ed34 | /spidermanage/spidertool/scapytask.py | cae846c17acf3c1626ec69f2d9a950f6af626b8f | [] | no_license | l0kihardt/toolforspider | e34a823688340e0645e6f22655d96fd0c80985ce | b9b8633ed560a7545335e6d49587ae054fd4a88f | refs/heads/master | 2020-12-25T07:14:37.548782 | 2016-06-15T01:01:16 | 2016-06-15T01:01:16 | 61,173,718 | 2 | 1 | null | 2016-06-15T03:11:18 | 2016-06-15T03:11:18 | null | UTF-8 | Python | false | false | 585 | py | scapytask.py | #!/usr/bin/python
#coding:utf-8
from ThreadTool import ThreadTool
import datetime
import time
import connectpool
from TaskTool import TaskTool
import scapytool
class ScapyTask(TaskTool):
def __init__(self,isThread=1):
TaskTool.__init__(self,isThread)
self.set_deal_num(1)
self.add_work(['snif... |
00395e8a93ea270b7db39120927dd9ce32421b88 | e317c681afb444bfaf7000a2f3dd4435ccb2ab21 | /website/views/category_view.py | 46728649234086ac6a3a98dab66158b3aae26a5a | [] | no_license | elated-egrets/bangazon-internal-site-2.0 | 092f554827850d37c3d4aa5010d2effbb769db15 | 4b80c720b28685077e61344889ac8f7632e4d390 | refs/heads/master | 2020-03-26T14:44:17.447639 | 2018-08-23T19:00:48 | 2018-08-23T19:00:48 | 145,002,363 | 0 | 0 | null | 2018-08-23T19:00:49 | 2018-08-16T14:52:58 | Python | UTF-8 | Python | false | false | 740 | py | category_view.py | from django.shortcuts import render
from website.models import Category, Product
def category_view(request):
'''View for category page
Author: Levi Schubert
allowed verbs: GET
returns render of template with categories and links to the first three products from each
'''
... |